From b5de22a1fc9442bbd0b100aeb3ce8369bb21b1da Mon Sep 17 00:00:00 2001 From: Marcus Campbell Date: Mon, 3 Nov 2014 14:10:36 -0800 Subject: [PATCH] Initial commit --- chrome.manifest | 6 ++ chrome/scuttle/content/contents.rdf | 18 ++++++ chrome/scuttle/content/options.js | 39 ++++++++++++ chrome/scuttle/content/options.xul | 57 ++++++++++++++++++ chrome/scuttle/content/scuttle.js | 53 ++++++++++++++++ chrome/scuttle/content/scuttle.xul | 48 +++++++++++++++ chrome/scuttle/locale/en-GB/scuttle.dtd | 18 ++++++ chrome/scuttle/skin/classic/contents.rdf | 27 +++++++++ .../skin/classic/scuttle-button-add-small.png | Bin 0 -> 2168 bytes .../skin/classic/scuttle-button-add.png | Bin 0 -> 3520 bytes .../skin/classic/scuttle-button-my-small.png | Bin 0 -> 2075 bytes .../skin/classic/scuttle-button-my.png | Bin 0 -> 3305 bytes .../skin/classic/scuttle-icon-small.png | Bin 0 -> 639 bytes chrome/scuttle/skin/classic/scuttle-icon.png | Bin 0 -> 1729 bytes chrome/scuttle/skin/classic/scuttle.css | 47 +++++++++++++++ defaults/preferences/scuttle.js | 3 + install.rdf | 27 +++++++++ 17 files changed, 343 insertions(+) create mode 100755 chrome.manifest create mode 100755 chrome/scuttle/content/contents.rdf create mode 100755 chrome/scuttle/content/options.js create mode 100755 chrome/scuttle/content/options.xul create mode 100755 chrome/scuttle/content/scuttle.js create mode 100755 chrome/scuttle/content/scuttle.xul create mode 100755 chrome/scuttle/locale/en-GB/scuttle.dtd create mode 100755 chrome/scuttle/skin/classic/contents.rdf create mode 100755 chrome/scuttle/skin/classic/scuttle-button-add-small.png create mode 100755 chrome/scuttle/skin/classic/scuttle-button-add.png create mode 100755 chrome/scuttle/skin/classic/scuttle-button-my-small.png create mode 100755 chrome/scuttle/skin/classic/scuttle-button-my.png create mode 100755 chrome/scuttle/skin/classic/scuttle-icon-small.png create mode 100755 chrome/scuttle/skin/classic/scuttle-icon.png create mode 100755 chrome/scuttle/skin/classic/scuttle.css create mode 100755 defaults/preferences/scuttle.js create mode 100755 install.rdf diff --git a/chrome.manifest b/chrome.manifest new file mode 100755 index 0000000..172c0b8 --- /dev/null +++ b/chrome.manifest @@ -0,0 +1,6 @@ +content scuttle chrome/scuttle/content/ +locale scuttle en-GB chrome/scuttle/locale/en-GB/ +skin scuttle classic/1.0 chrome/scuttle/skin/classic/ + +overlay chrome://browser/content/browser.xul chrome://scuttle/content/scuttle.xul +style chrome://global/content/customizeToolbar.xul chrome://scuttle/skin/scuttle.css \ No newline at end of file diff --git a/chrome/scuttle/content/contents.rdf b/chrome/scuttle/content/contents.rdf new file mode 100755 index 0000000..797f004 --- /dev/null +++ b/chrome/scuttle/content/contents.rdf @@ -0,0 +1,18 @@ + + + +
  • + + + + + +
  • + + + +
  • chrome://scuttle/content/scuttle.xul
  • +
    +
    \ No newline at end of file diff --git a/chrome/scuttle/content/options.js b/chrome/scuttle/content/options.js new file mode 100755 index 0000000..8b33925 --- /dev/null +++ b/chrome/scuttle/content/options.js @@ -0,0 +1,39 @@ +var scuttle_url_default = "http://scuttle.org/"; +var scuttle_width_default = "730"; +var scuttle_height_default = "465"; + +var scuttle_url; +var scuttle_width; +var scuttle_height; + +var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch); + +function options_load() { + try { + scuttle_url = document.getElementById("scuttle-url"); + scuttle_url.value = prefs.getCharPref("scuttle.options.url"); + + scuttle_width = document.getElementById("scuttle-width"); + scuttle_width.value = prefs.getCharPref("scuttle.options.width"); + + scuttle_height = document.getElementById("scuttle-height"); + scuttle_height.value = prefs.getCharPref("scuttle.options.height"); + } + catch(e) { + scuttle_url.value = scuttle_url_default; + scuttle_width.value = scuttle_width_default; + scuttle_height.value = scuttle_height_default; + } +} + +function options_accept() { + var url = scuttle_url.value; + if ((url.length > 0) && (url.charAt(url.length - 1) != "/")) { + url = url + "/"; + } + + prefs.setCharPref("scuttle.options.url", url); + prefs.setCharPref("scuttle.options.width", scuttle_width.value); + prefs.setCharPref("scuttle.options.height", scuttle_height.value); + return true; +} \ No newline at end of file diff --git a/chrome/scuttle/content/options.xul b/chrome/scuttle/content/options.xul new file mode 100755 index 0000000..b6b2b01 --- /dev/null +++ b/chrome/scuttle/content/options.xul @@ -0,0 +1,57 @@ + + + + + + +