Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yPhil
Pétrolette
Commits
8f3a0e69
Commit
8f3a0e69
authored
Jul 15, 2021
by
yPhil
Browse files
Bookmarklet
- Ensured that we never get the search / query part of the Pétrolette instance URL
parent
0dbf7af5
Pipeline
#433985
passed with stage
in 4 minutes and 42 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
public/js/PTL.dialog.js
View file @
8f3a0e69
...
...
@@ -205,8 +205,11 @@ PTL.dialog = {
PTL
.
dialog
.
kill
(
$dialog
);
});
$
(
this
).
find
(
'
.helpBookmarklet
'
)
.
attr
(
'
href
'
,
'
javascript:void(window.open("
'
+
window
.
location
.
href
+
'
?add=" + window.location.href))
'
);
const
ptlUrl
=
[
location
.
protocol
,
'
//
'
,
location
.
host
,
location
.
pathname
].
join
(
''
);
$
(
'
.helpBookmarklet
'
)
.
attr
(
'
href
'
,
'
javascript:void(window.open("
'
+
ptlUrl
+
'
?add="+encodeURIComponent(location.href)))
'
);
$
(
'
.helpTour
'
).
on
(
'
click
'
,
function
()
{
PTL
.
dialog
.
kill
(
$dialog
);
...
...
public/js/PTL.main.js
View file @
8f3a0e69
...
...
@@ -139,8 +139,10 @@ var PTL = (function() {
$
(
'
button
'
).
button
();
const
ptlUrl
=
[
location
.
protocol
,
'
//
'
,
location
.
host
,
location
.
pathname
].
join
(
''
);
$
(
'
.helpBookmarklet
'
)
.
attr
(
'
href
'
,
'
javascript:void(window.open("
'
+
window
.
location
.
href
+
'
?add="+encodeURIComponent(location.href)))
'
);
.
attr
(
'
href
'
,
'
javascript:void(window.open("
'
+
ptlUrl
+
'
?add="+encodeURIComponent(location.href)))
'
);
$
(
'
body
'
).
on
(
'
click
'
,
'
#menuButton
'
,
function
()
{
PTL
.
sideMenu
(
'
toggle
'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment