summaryrefslogtreecommitdiff
path: root/views/partials/bookmark-bookmarklet.php
blob: ae6ce939d1528f08f18759e0a28c131bec913ac2 (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+'"')+"&name="+encodeURIComponent(document.title)+"&token=<?= $this->token ?>";
})();