]> gitweb @ CieloNegro.org - sugar.git/commitdiff
Auto commit by The Sugar System.
authorPHO <pho@cielonegro.org>
Fri, 20 Jan 2017 02:21:18 +0000 (11:21 +0900)
committerPHO <pho@cielonegro.org>
Fri, 20 Jan 2017 02:21:18 +0000 (11:21 +0900)
IGNORE
dot-files/_vimperator/plugin/mojang-jira_js [new file with mode: 0644]

diff --git a/IGNORE b/IGNORE
index 3a2167e454c6fd5290546011f20c581a3a8f04c7..9ba9a2ecedd618f27af3ffbed76c789f789cb943 100644 (file)
--- a/IGNORE
+++ b/IGNORE
 .config/inkscape
 .config/gmpc
 .config/gtk-2.0/gtkfilechooser.ini
+.config/mimeapps.list
+.config/pavucontrol.ini
+.config/pulse
+.config/wireshark
 .covers
 .cpan
 .cpanplus
@@ -77,6 +81,7 @@
 .gimp*
 .gitk
 .glimpse*
+.gkrellm2
 .gmpc
 .gnome-commander
 .gnome2*
 .trackballs
 .uim.d
 .unison
+.vboxclient-clipboard.pid
+.vim/.netrwhist
 .viminfo
 .vimperator/info
 .w3m/bookmark.bak.html
diff --git a/dot-files/_vimperator/plugin/mojang-jira_js b/dot-files/_vimperator/plugin/mojang-jira_js
new file mode 100644 (file)
index 0000000..f507218
--- /dev/null
@@ -0,0 +1,43 @@
+var INFO = xml`
+  <plugin name="mojang-jira" version="0.1"
+          href=""
+          summary="Search MoJIRA"
+          lang="en-US"
+          xmlns="http://vimperator.org/namespaces/liberator">
+    <author email="pho@cielonegro.org">PHO</author>
+    <license href="http://creativecommons.org/publicdomain/zero/1.0/legalcode">CC0 1.0 Universal</license>
+    <project name="Vimperator" minVersion="3.0"/>
+  </plugin>
+`;
+
+(function () {
+
+var base_URI = 'https://bugs.mojang.com';
+
+function mojira(opts) {
+    if (opts.query) {
+        var URI = base_URI + '/secure/QuickSearch.jspa?searchString=' + encodeURIComponent(opts.query);
+        liberator.open(URI, opts.tab);
+    }
+    else {
+        liberator.open(base_URI, opts.tab);
+    }
+}
+
+liberator.modules.commands.addUserCommand(
+    ['mojira'],
+    'Search MoJIRA',
+    function (args) {
+        mojira({
+            query: args.string.length > 0 ? args.string : null,
+            tab:   args.bang ? liberator.NEW_TAB : liberator.CURRENT_TAB
+        });
+    },
+    {
+        bang:     true,
+        argCount: '*'
+    },
+    true
+);
+
+})();