summaryrefslogtreecommitdiff
path: root/views/partials/bookmark-bookmarklet.php
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2014-09-07 11:48:52 -0700
committerAaron Parecki <aaron@parecki.com>2014-09-07 11:48:52 -0700
commitcf8ecf1fc9942dc00f0a5a11b313f8babbc9c3cd (patch)
treeaf6a3e99b19383ea5642f530451ff450072a9345 /views/partials/bookmark-bookmarklet.php
parent9cfa0ff2c18e25a9c00d80624e6abea487bd9136 (diff)
adds bookmark posting interface with bookmarklet. now any URL can auto-login given a login token.
Diffstat (limited to 'views/partials/bookmark-bookmarklet.php')
-rw-r--r--views/partials/bookmark-bookmarklet.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/views/partials/bookmark-bookmarklet.php b/views/partials/bookmark-bookmarklet.php
new file mode 100644
index 0000000..a4b095d
--- /dev/null
+++ b/views/partials/bookmark-bookmarklet.php
@@ -0,0 +1,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="http://quill.dev/bookmark?url="+encodeURIComponent(window.location.href)+"&content="+encodeURIComponent('"'+t+'"')+"&name="+encodeURIComponent(document.title)+"&token=<?= $this->token ?>";
+})();
+