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 @@
+
+
+
+
+
diff --git a/chrome/scuttle/content/scuttle.js b/chrome/scuttle/content/scuttle.js
new file mode 100755
index 0000000..08c50c1
--- /dev/null
+++ b/chrome/scuttle/content/scuttle.js
@@ -0,0 +1,53 @@
+var scuttle_version = "0.3.1";
+var scuttle_page_my = "login.php";
+var scuttle_page_add = "bookmarks.php";
+
+var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
+
+function scuttle_my(e, mouse) {
+ var scuttle_url = prefs.getCharPref("scuttle.options.url");
+ var url = scuttle_url + scuttle_page_my;
+ if (mouse) {
+ if (e.button == 1) {
+ var browser = document.getElementById("content");
+ var tab = browser.addTab(url);
+ browser.selectedTab = tab;
+ }
+ } else {
+ if (e.ctrlKey) {
+ var browser = document.getElementById("content");
+ var tab = browser.addTab(url);
+ browser.selectedTab = tab;
+ } else if (e.shiftKey) {
+ window.open(url, "scuttleMy");
+ } else {
+ loadURI(url);
+ }
+ }
+}
+
+function scuttle_add(address, title) {
+ var scuttle_url = prefs.getCharPref("scuttle.options.url");
+ var scuttle_width = prefs.getCharPref("scuttle.options.width");
+ var scuttle_height = prefs.getCharPref("scuttle.options.height");
+
+ var _address = (address === undefined) ? window.content.location.href : address;
+ var _title = (title === undefined) ? window.content.document.title : title;
+ var focusedWindow = document.commandDispatcher.focusedWindow;
+ var description = focusedWindow.getSelection().toString();
+
+ description = description.replace(/[\t\n\r\f\v]+/g, " ");
+ description = description.replace(/ {2,}/g, " ");
+
+ var a = encodeURIComponent(_address);
+ var t = encodeURIComponent(_title);
+ var d = encodeURIComponent(description);
+
+ var scuttle_add_window = window.open(scuttle_url + scuttle_page_add + "?action=add&popup=1&address="+ a +"&title="+ t +"&description="+ d +"&src=ffext"+ scuttle_version, "scuttleBookmark", "status=0, scrollbars=1, toolbar=0, resizable=1, width="+ scuttle_width +", height="+ scuttle_height +", left="+ (screen.width-scuttle_width) / 2 +", top="+ (screen.height-scuttle_height) / 2);
+}
+
+function scuttle_menu() {
+ document.getElementById("scuttle-context-page").setAttribute("hidden", document.getElementById("context-bookmarkpage").getAttribute("hidden"));
+ document.getElementById("scuttle-context-link").setAttribute("hidden", document.getElementById("context-bookmarklink").getAttribute("hidden"));
+ document.getElementById("scuttle-context-selection").setAttribute("hidden", document.getElementById("context-searchselect").getAttribute("hidden"));
+}
\ No newline at end of file
diff --git a/chrome/scuttle/content/scuttle.xul b/chrome/scuttle/content/scuttle.xul
new file mode 100755
index 0000000..6e1d0bd
--- /dev/null
+++ b/chrome/scuttle/content/scuttle.xul
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/chrome/scuttle/locale/en-GB/scuttle.dtd b/chrome/scuttle/locale/en-GB/scuttle.dtd
new file mode 100755
index 0000000..909a842
--- /dev/null
+++ b/chrome/scuttle/locale/en-GB/scuttle.dtd
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/chrome/scuttle/skin/classic/contents.rdf b/chrome/scuttle/skin/classic/contents.rdf
new file mode 100755
index 0000000..f714315
--- /dev/null
+++ b/chrome/scuttle/skin/classic/contents.rdf
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ chrome://scuttle/skin/scuttle.css
+
+
+
+ chrome://scuttle/skin/scuttle.css
+
+
diff --git a/chrome/scuttle/skin/classic/scuttle-button-add-small.png b/chrome/scuttle/skin/classic/scuttle-button-add-small.png
new file mode 100755
index 0000000..850f6b2
Binary files /dev/null and b/chrome/scuttle/skin/classic/scuttle-button-add-small.png differ
diff --git a/chrome/scuttle/skin/classic/scuttle-button-add.png b/chrome/scuttle/skin/classic/scuttle-button-add.png
new file mode 100755
index 0000000..b272f6a
Binary files /dev/null and b/chrome/scuttle/skin/classic/scuttle-button-add.png differ
diff --git a/chrome/scuttle/skin/classic/scuttle-button-my-small.png b/chrome/scuttle/skin/classic/scuttle-button-my-small.png
new file mode 100755
index 0000000..2f990d7
Binary files /dev/null and b/chrome/scuttle/skin/classic/scuttle-button-my-small.png differ
diff --git a/chrome/scuttle/skin/classic/scuttle-button-my.png b/chrome/scuttle/skin/classic/scuttle-button-my.png
new file mode 100755
index 0000000..359e3b5
Binary files /dev/null and b/chrome/scuttle/skin/classic/scuttle-button-my.png differ
diff --git a/chrome/scuttle/skin/classic/scuttle-icon-small.png b/chrome/scuttle/skin/classic/scuttle-icon-small.png
new file mode 100755
index 0000000..d5444ca
Binary files /dev/null and b/chrome/scuttle/skin/classic/scuttle-icon-small.png differ
diff --git a/chrome/scuttle/skin/classic/scuttle-icon.png b/chrome/scuttle/skin/classic/scuttle-icon.png
new file mode 100755
index 0000000..f450b78
Binary files /dev/null and b/chrome/scuttle/skin/classic/scuttle-icon.png differ
diff --git a/chrome/scuttle/skin/classic/scuttle.css b/chrome/scuttle/skin/classic/scuttle.css
new file mode 100755
index 0000000..609461a
--- /dev/null
+++ b/chrome/scuttle/skin/classic/scuttle.css
@@ -0,0 +1,47 @@
+/* My Scuttle */
+
+#scuttle-button-my {
+ list-style-image: url("chrome://scuttle/skin/scuttle-button-my.png");
+ -moz-image-region: rect(0px 24px 24px 0px);
+}
+#scuttle-button-my:hover {
+ -moz-image-region: rect(24px 24px 48px 0px);
+}
+#scuttle-button-my[disabled="true"] {
+ -moz-image-region: rect(48px 24px 72px 0px) !important;
+}
+
+toolbar[iconsize="small"] #scuttle-button-my {
+ list-style-image: url("chrome://scuttle/skin/scuttle-button-my-small.png");
+ -moz-image-region: rect(0px 16px 16px 0px);
+}
+toolbar[iconsize="small"] #scuttle-button-my:hover {
+ -moz-image-region: rect(16px 16px 32px 0px);
+}
+toolbar[iconsize="small"] #scuttle-button-my[disabled="true"] {
+ -moz-image-region: rect(32px 16px 48px 0px) !important;
+}
+
+/* Scuttle This Page... */
+
+#scuttle-button-add {
+ list-style-image: url("chrome://scuttle/skin/scuttle-button-add.png");
+ -moz-image-region: rect(0px 24px 24px 0px);
+}
+#scuttle-button-add:hover {
+ -moz-image-region: rect(24px 24px 48px 0px);
+}
+#scuttle-button-add[disabled="true"] {
+ -moz-image-region: rect(48px 24px 72px 0px) !important;
+}
+
+toolbar[iconsize="small"] #scuttle-button-add {
+ list-style-image: url("chrome://scuttle/skin/scuttle-button-add-small.png");
+ -moz-image-region: rect(0px 16px 16px 0px);
+}
+toolbar[iconsize="small"] #scuttle-button-add:hover {
+ -moz-image-region: rect(16px 16px 32px 0px);
+}
+toolbar[iconsize="small"] #scuttle-button-add[disabled="true"] {
+ -moz-image-region: rect(32px 16px 48px 0px) !important;
+}
\ No newline at end of file
diff --git a/defaults/preferences/scuttle.js b/defaults/preferences/scuttle.js
new file mode 100755
index 0000000..0a228e2
--- /dev/null
+++ b/defaults/preferences/scuttle.js
@@ -0,0 +1,3 @@
+pref("scuttle.options.url", "http://scuttle.org/");
+pref("scuttle.options.height", "465");
+pref("scuttle.options.width", "730");
\ No newline at end of file
diff --git a/install.rdf b/install.rdf
new file mode 100755
index 0000000..e08edae
--- /dev/null
+++ b/install.rdf
@@ -0,0 +1,27 @@
+
+
+
+
+ {88c0fe98-8034-efaa-ba61-6d021f798927}
+ 0.3.2
+ 2
+
+
+
+
+ {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
+ 1.0
+ 3.6.*
+
+
+
+
+ Scuttle
+ Store, share and tag your bookmarks.
+ Marcus Campbell
+ http://scuttle.org/
+ chrome://scuttle/content/options.xul
+ chrome://scuttle/skin/scuttle-icon.png
+
+
\ No newline at end of file