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 @@ + + + + + + +