Commits

marg...@marguerite-wolevers-macbook-pro-15.local  committed a847228

Added a bookmarklet for enqueuing the url (with the title) of current page;

  • Participants
  • Parent commits 7a642d7

Comments (0)

Files changed (1)

File bookmarklet.js

+javascript: (
+function() {
+    var windowstatus =
+        "scrollbars=1," +
+        "status=1," +
+        "resizable=1," +
+        "location=1," +
+        "toolbar=1," +
+        "width=340," +
+        "height=300";
+
+    var nq_window = window.open("queue_url", "", windowstatus);
+    nq_window.document.write(
+    "<html>" +
+        "<head>" +
+        "</head>" +
+        "<body>" +
+            "<form method='post' id='nq'>" + 
+                "<input type='text' name='url'/>" +
+                "<input type='text' name='title'/>" + 
+                "<input type='submit'/>" +
+            "</form>" +
+        "</body>" +
+    "</html>");
+    var form = nq_window.document.getElementById('nq');
+    form.action = "http://127.0.0.1:8000/queue/myqueue/enqueue";
+    form.url.value = document.location.href;
+    form.title.value = document.title;
+    form.submit();
+}
+)();