Selection is now limited to 2k characters using bookmarklets

to avoid having too large URL

Fixes #528
This commit is contained in:
ArthurHoaro 2017-05-25 16:45:08 +02:00
parent 3e395a6bc6
commit d6aec9e60b

View file

@ -75,7 +75,7 @@ <h2 class="window-title">Bookmarklets</h2>
window.open(
'{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+
'&amp;title='%20+%20encodeURIComponent(title)+
'&amp;description='%20+%20encodeURIComponent(document.getSelection())+
'&amp;description='%20+%20encodeURIComponent(document.getSelection().toString().substr(0, 2000))+
'&amp;source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1'
);
}
@ -91,7 +91,7 @@ <h2 class="window-title">Bookmarklets</h2>
function(){
window.open(
'{$pageabsaddr}?private=1&amp;post='+
'&amp;description='%20+%20encodeURIComponent(document.getSelection())+
'&amp;description='%20+%20encodeURIComponent(document.getSelection().toString().substr(0, 2000))+
'&amp;source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1'
);
}