summaryrefslogtreecommitdiff
path: root/views/partials/bookmark-bookmarklet.php
blob: 1cd82f7fdf50268149050919e86a332074e9f5f8 (plain)
1
2
3
4
5
javascript:(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 ?>";
})();