Commit 8f3a0e69 authored by yPhil's avatar 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
......@@ -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);
......
......@@ -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');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment