From: Damyan Ivanov Date: Tue, 10 Jan 2012 14:25:42 +0000 (+0200) Subject: an attempt to produce a descent restartless variant X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=8d52f881a1741ea66e981ad59d7c3f4aba8543e7;p=icedeb.git an attempt to produce a descent restartless variant behaves bad in the browser -- the buttons aren't visible in the toolbar editor, right-button clicking is not captured properly --- diff --git a/Magnifying_Glass_1.svg b/Magnifying_Glass_1.svg new file mode 100644 index 0000000..92d2773 --- /dev/null +++ b/Magnifying_Glass_1.svg @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/bootstrap.js b/bootstrap.js new file mode 100644 index 0000000..8ccb4e4 --- /dev/null +++ b/bootstrap.js @@ -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'); + }); +}; diff --git a/build b/build index b993202..80e6c6a 100644 --- a/build +++ b/build @@ -7,4 +7,4 @@ export PKG=icedeb [ ! -e $PKG.xpi ] || rm $PKG.xpi -zip -r $PKG.xpi chrome install* chrome.manifest README res +zip -r $PKG.xpi chrome data install* chrome.manifest README res *.js diff --git a/chrome/content/bts.png b/chrome/content/bts.png new file mode 100644 index 0000000..8923933 Binary files /dev/null and b/chrome/content/bts.png differ diff --git a/data/widget/widget.js b/data/widget/widget.js new file mode 100644 index 0000000..881cb3c --- /dev/null +++ b/data/widget/widget.js @@ -0,0 +1,12 @@ +this.addEventListener('click', function(event) { + if(event.button == 0 && event.shiftKey == false) + self.port.emit('left-click'); + + if(event.button == 1) + self.port.emit('middle-click'); + + if(event.button == 2 || (event.button == 0 && event.shiftKey == true)) + self.port.emit('right-click'); + + event.preventDefault(); +}, true); diff --git a/install.rdf b/install.rdf index f2658d1..cdcfefa 100644 --- a/install.rdf +++ b/install.rdf @@ -1,11 +1,12 @@ + true Debian buttons Collection of buttons for querying Debian-related pages using the text in the clipboard. Place some text in the clipboard (package name, bug number, message-ID) and click on one of the buttons. Clicking with the middle mouse button opens a new tab. Damyan Ivanov {8fb11c5b-84eb-4da0-9128-292eacce2dcb} - 1.5 + 2.0 2 chrome://icedeb/content/icon.png diff --git a/package.json b/package.json new file mode 100644 index 0000000..f44ceab --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "name":"icedeb", + "fullName":"Debian Buttons", + "description":"A collection of handy buttons for searching Debian-related material right from the clpboard.", + "author":"Damyan Ivanov", + "license":"BSD", + "version":"2.0" +} diff --git a/system-search.svg b/system-search.svg new file mode 100644 index 0000000..1a4c1cd --- /dev/null +++ b/system-search.svg @@ -0,0 +1,313 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + Jakub Steiner + + + http://jimmac.musichall.cz + + + + + + + + + + + + + + + + + + + + + + +