summaryrefslogtreecommitdiff
path: root/views/partials/bookmark-bookmarklet.php
blob: 0dfd91614549e957f5cbaba5c53a5697ecbdc013 (plain)
1
2
3
4
5
(function(){
  var t;try{t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));}catch(e){t="";};
  window.location="<?= Config::$base_url ?>bookmark?url="+encodeURIComponent(window.location.href)+"&content="+encodeURIComponent((t == '' ? '' : '"'+t+'"'))+"&name="+encodeURIComponent(document.title)+"&token=<?= $this->token ?>";
})();