aboutsummaryrefslogtreecommitdiff
path: root/modules/pentadactyl
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pentadactyl')
-rw-r--r--modules/pentadactyl/pentadactyl.dot/plugins.link/links.js42
-rw-r--r--modules/pentadactyl/pentadactylrc.dot.link23
2 files changed, 65 insertions, 0 deletions
diff --git a/modules/pentadactyl/pentadactyl.dot/plugins.link/links.js b/modules/pentadactyl/pentadactyl.dot/plugins.link/links.js
new file mode 100644
index 0000000..d0536a1
--- /dev/null
+++ b/modules/pentadactyl/pentadactyl.dot/plugins.link/links.js
@@ -0,0 +1,42 @@
+/**
+ * Links plugin.
+ */
+
+"use strict";
+
+XML.ignoreWhitespace = false;
+XML.prettyPrinting = false;
+
+/* use strict */
+var INFO =
+["plugin", { name: "links",
+ version: "0.1",
+ href: "http://dactyl.sf.net/pentadactyl/plugins#links-plugin",
+ summary: "Scuttle published",
+ xmlns: "dactyl" },
+["author", { email: "rhatto@riseup.net" }, "Silvio Rhatto"],
+["license", { href: "http://opensource.org/licenses/mit-license.php" }, "MIT"],
+["project", { name: "Pentadactyl", "min-version": "1.0" }],
+ ["p", {},
+ "This plugin provides a shortcut command to publish a link to a Scuttle site."],
+ ["item", {},
+ ["tags", {}, ":link"],
+ ["strut"],
+ ["spec", {}, ":link"],
+ ["description", {},
+ ["p", {},
+ "Add the current page into the Scuttle site."
+ ]]]];
+
+group.commands.add(["link"],
+ "Add link to scuttle",
+ function (args) {
+ var instance = 'https://links.sarava.org/bookmarks?action=add&address=';
+ var doc = content.document;
+ var href = encodeURIComponent(doc.location.href);
+ var title = encodeURIComponent(doc.title);
+ var desc = encodeURIComponent(doc.getSelection());
+ var tags = encodeURIComponent(args);
+ commands.execute('tabopen ' + instance + href + '&title=' + title + '&description=' + desc + '&tags=' + tags)
+ },
+ { argCount: "*" }, true);
diff --git a/modules/pentadactyl/pentadactylrc.dot.link b/modules/pentadactyl/pentadactylrc.dot.link
new file mode 100644
index 0000000..7560f55
--- /dev/null
+++ b/modules/pentadactyl/pentadactylrc.dot.link
@@ -0,0 +1,23 @@
+"1.0
+
+" Load plugins
+loadplugins '\.(js|penta)$'
+
+" User defined items
+group user
+
+" Links Saraventos
+command! -nargs=* -description='Add to Links Saraventos' link -javascript javascript:x=content.document;a=encodeURIComponent(x.location.href);t=encodeURIComponent(x.title);d=encodeURIComponent(x.getSelection());c=encodeURIComponent(args);commands.execute('tabopen https://links.sarava.org/bookmarks?action=add&address='+a+'&title='+t+'&description='+d+'&tags='+c);
+
+" Set title and default search
+set defsearch=duck
+set titlestring=Firefox
+
+" Show tab numbers
+" See https://code.google.com/p/dactyl/issues/detail?id=870
+set go+=n
+
+" Avoid theme overwriting during syncs
+"set! general.skins.selectedSkin=rein
+
+" vim: set ft=pentadactyl: