diff options
author | Nick White <git@njw.me.uk> | 2011-06-23 19:30:51 +0100 |
---|---|---|
committer | Nick White <git@njw.me.uk> | 2011-06-23 19:30:51 +0100 |
commit | 575c45e066404a85adbf8112f676ba89c7258daa (patch) | |
tree | b9c718f36451277379d4f54a36756ee820166a03 /gecko | |
parent | a2a6986c2719849d4e794261f29c8689701445e3 (diff) |
Add viable to firefox, improve firefox usage, general cleanups
Diffstat (limited to 'gecko')
-rw-r--r-- | gecko/chrome/content/simplyread.xul | 9 | ||||
-rw-r--r-- | gecko/install.ttl | 4 | ||||
-rw-r--r-- | gecko/viablehook.js | 5 |
3 files changed, 12 insertions, 6 deletions
diff --git a/gecko/chrome/content/simplyread.xul b/gecko/chrome/content/simplyread.xul index 2ed3ac8..87af5ea 100644 --- a/gecko/chrome/content/simplyread.xul +++ b/gecko/chrome/content/simplyread.xul @@ -1,10 +1,11 @@ <?xml version="1.0"?> <overlay id="simplyread" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + <script src="chrome://simplyread/content/viable.js" /> <script src="chrome://simplyread/content/simplyread.js" /> <keyset> - <key id="simplyread" modifiers="accel alt" key="r" oncommand="simplyread()" /> + <key id="simplyread" modifiers="control alt" key="r" oncommand="simplyread()" /> </keyset> - <statusbar id="addon-bar"> - <image id="simplyread-icon" src="chrome://simplyread/content/icon.png" onclick="simplyread()" /> - </statusbar> + <toolbar id="addon-bar"> + <toolbarbutton id="simplyread-btn" image="chrome://simplyread/content/icon.png" label="SimplyRead" oncommand="simplyread()" /> + </toolbar> </overlay> diff --git a/gecko/install.ttl b/gecko/install.ttl index 2ee9aaf..56d8d3b 100644 --- a/gecko/install.ttl +++ b/gecko/install.ttl @@ -8,10 +8,10 @@ em:targetApplication [ em:id "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"; em:minVersion "3.0"; - em:maxVersion "4.0.*" + em:maxVersion "6.*" ] ; em:name "SimplyRead"; - em:description "Stop browsing, start reading. Press Ctrl-Alt-r or click the 'sr' icon in the status bar to toggle SimplyRead."; + em:description "Stop browsing, start reading. Press Ctrl-Alt-r or press the 'sr' button in the addons bar to toggle SimplyRead."; em:creator "Nick White"; em:homepageURL "WEBSITE/"; em:updateURL "WEBSITE/gecko-updates.rdf"; diff --git a/gecko/viablehook.js b/gecko/viablehook.js new file mode 100644 index 0000000..8facf3e --- /dev/null +++ b/gecko/viablehook.js @@ -0,0 +1,5 @@ +function srviable() { + document.getElementById("simplyread-btn").disabled = !simplyread-viable(); +} +window.addEventListener("DOMContentLoaded", srviable, false); +gBrowser.tabContainer.addEventListener("TabSelect", srviable, false); |