]> git.ktnx.net Git - icedeb.git/blobdiff - bootstrap.js
an attempt to produce a descent restartless variant
[icedeb.git] / bootstrap.js
diff --git a/bootstrap.js b/bootstrap.js
new file mode 100644 (file)
index 0000000..8ccb4e4
--- /dev/null
@@ -0,0 +1,24 @@
+const widgets = require('widget');
+const data = require('self').data;
+
+exports.main = function() {
+  var bts = widgets.Widget({
+    id: "icedeb-bts",
+    label: "Query Debian Bug-tracking System",
+    contentURL: data.url('widget/icedeb-bts.png'),
+    contentScriptWhen: 'ready',
+    contentScriptFile: data.url('widget/icedeb-bts.js')
+  });
+
+  bts.port.on('left-click', function() {
+    console.log('left click');
+  });
+  bts.port.on('right-click', function() {
+      console.log('right click');
+  });
+  bts.port.on('middle-click', function() {
+      console.log('middle click');
+  });
+};