[Pkg-mozext-commits] [greasemonkey] 01/03: Imported Upstream version 1.13~beta3

David Prévot taffit at alioth.debian.org
Mon Oct 14 14:15:46 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository greasemonkey.

commit 3b855b4f97868c633605f012057f0cd6eafeae9d
Author: David Prévot <taffit at debian.org>
Date:   Mon Oct 14 10:02:06 2013 -0400

    Imported Upstream version 1.13~beta3
---
 content/config.js                    |    7 ++++++-
 content/options.js                   |    4 ----
 content/options.xul                  |    1 -
 defaults/preferences/greasemonkey.js |    1 -
 install.rdf                          |    2 +-
 locale/ar/greasemonkey.dtd           |    1 -
 locale/ca/greasemonkey.dtd           |    1 -
 locale/cs/greasemonkey.dtd           |    5 ++---
 locale/da/greasemonkey.dtd           |    1 -
 locale/de/greasemonkey.dtd           |    1 -
 locale/el/greasemonkey.dtd           |    1 -
 locale/en-US/greasemonkey.dtd        |    1 -
 locale/es-AR/greasemonkey.dtd        |    1 -
 locale/es-CL/greasemonkey.dtd        |    1 -
 locale/es-ES/greasemonkey.dtd        |    1 -
 locale/es-MX/greasemonkey.dtd        |    1 -
 locale/et/greasemonkey.dtd           |    1 -
 locale/fa/greasemonkey.dtd           |    1 -
 locale/fi/greasemonkey.dtd           |    1 -
 locale/fr/greasemonkey.dtd           |    1 -
 locale/gl/greasemonkey.dtd           |    1 -
 locale/he/greasemonkey.dtd           |    1 -
 locale/hu/greasemonkey.dtd           |    1 -
 locale/it/greasemonkey.dtd           |    1 -
 locale/ja/greasemonkey.dtd           |    5 ++---
 locale/ko/greasemonkey.dtd           |    1 -
 locale/lt/greasemonkey.dtd           |    1 -
 locale/nl/greasemonkey.dtd           |    1 -
 locale/pl/greasemonkey.dtd           |    1 -
 locale/pt-BR/greasemonkey.dtd        |    3 +--
 locale/ro/greasemonkey.dtd           |    1 -
 locale/ru/greasemonkey.dtd           |    1 -
 locale/si/greasemonkey.dtd           |    1 -
 locale/sk/greasemonkey.dtd           |    1 -
 locale/sr/greasemonkey.dtd           |    1 -
 locale/sv-SE/greasemonkey.dtd        |    1 -
 locale/tr/greasemonkey.dtd           |    1 -
 locale/uk/greasemonkey.dtd           |    1 -
 locale/zh-CN/gm-cludes.dtd           |    4 ++--
 locale/zh-CN/greasemonkey.dtd        |    9 ++++-----
 locale/zh-CN/greasemonkey.properties |   10 +++++-----
 locale/zh-TW/greasemonkey.dtd        |    1 -
 modules/miscapis.js                  |   36 ++++++++++++++++++++++++++++++----
 modules/remoteScript.js              |    3 +--
 modules/script.js                    |   21 +-------------------
 modules/stats.js                     |   17 ++++------------
 modules/sync.js                      |   16 +++++++++++----
 47 files changed, 73 insertions(+), 102 deletions(-)

diff --git a/content/config.js b/content/config.js
index 401daf4..0c3a54a 100644
--- a/content/config.js
+++ b/content/config.js
@@ -1,4 +1,5 @@
 Components.utils.import('resource://greasemonkey/constants.js');
+Components.utils.import('resource://greasemonkey/miscapis.js');
 Components.utils.import('resource://greasemonkey/prefmanager.js');
 Components.utils.import('resource://greasemonkey/script.js');
 Components.utils.import('resource://greasemonkey/third-party/MatchPattern.js');
@@ -127,7 +128,7 @@ Config.prototype._save = function(saveNow) {
   GM_util.writeToFile(domSerializer.serializeToString(doc), this._configFile);
 };
 
-Config.prototype.install = function(script, oldScript) {
+Config.prototype.install = function(script, oldScript, tempDir) {
   var existingIndex = this._find(oldScript || script);
   if (!oldScript) oldScript = this.scripts[existingIndex];
 
@@ -137,6 +138,10 @@ Config.prototype.install = function(script, oldScript) {
     script.userExcludes = oldScript.userExcludes;
     script.userIncludes = oldScript.userIncludes;
 
+    // Migrate stored values.
+    var storage = new GM_ScriptStorage(oldScript);
+    storage.dbFile.moveTo(tempDir, storage.dbFileName);
+
     // Uninstall the old script.
     this.uninstall(oldScript, true);
   }
diff --git a/content/options.js b/content/options.js
index ae087b8..700a7b4 100644
--- a/content/options.js
+++ b/content/options.js
@@ -2,8 +2,6 @@ Components.utils.import('resource://greasemonkey/prefmanager.js');
 Components.utils.import('resource://greasemonkey/util.js');
 
 function GM_loadOptions() {
-  document.getElementById('check-uninstall')
-      .checked = GM_prefRoot.getValue('uninstallPreferences');
   document.getElementById('check-sync')
   .checked = GM_prefRoot.getValue('sync.enabled');
   document.getElementById('secure-update')
@@ -21,8 +19,6 @@ function GM_loadOptions() {
 function GM_saveOptions(checkbox) {
   GM_prefRoot.setValue('sync.enabled',
       !!document.getElementById('check-sync').checked);
-  GM_prefRoot.setValue('uninstallPreferences',
-      !!document.getElementById('check-uninstall').checked);
   GM_prefRoot.setValue('requireSecureUpdates',
       !!document.getElementById('secure-update').checked);
   GM_prefRoot.setValue('stats.optedin',
diff --git a/content/options.xul b/content/options.xul
index 288dbcc..c5405c7 100644
--- a/content/options.xul
+++ b/content/options.xul
@@ -28,7 +28,6 @@
 <vbox>
   <groupbox>
     <caption label="&prefWindow.titleWin;" />
-    <checkbox id="check-uninstall" label="&AlsoUninstallPrefs;" />
     <checkbox id="secure-update" label="&RequireSecureUpdates;" />
     <checkbox id="submit-stats" label="&SubmitStats;" />
   </groupbox>
diff --git a/defaults/preferences/greasemonkey.js b/defaults/preferences/greasemonkey.js
index 7950603..417cbd3 100644
--- a/defaults/preferences/greasemonkey.js
+++ b/defaults/preferences/greasemonkey.js
@@ -19,6 +19,5 @@ pref("extensions.greasemonkey.stats.url", "https://stats.greasespot.net/submit/"
 pref("extensions.greasemonkey.sync.enabled", false);
 pref("extensions.greasemonkey.sync.values", false);
 pref("extensions.greasemonkey.sync.values_max_size_per_script", 65536);
-pref("extensions.greasemonkey.uninstallPreferences", true);
 pref("extensions.greasemonkey.unmhtIsGreaseable", false);
 pref("extensions.greasemonkey.version", "0.0");
diff --git a/install.rdf b/install.rdf
index 7ac7dbb..a9d6cce 100644
--- a/install.rdf
+++ b/install.rdf
@@ -6,7 +6,7 @@
   <Description about="urn:mozilla:install-manifest">
 
     <em:id>{e4a8a97b-f2ed-450b-b12d-ee082ba24781}</em:id>
-    <em:version>1.13beta2</em:version>
+    <em:version>1.13beta3</em:version>
     <em:creator>Aaron Boodman; http://youngpup.net/</em:creator>
     <em:homepageURL>http://www.greasespot.net/</em:homepageURL>
     <em:optionsURL>chrome://greasemonkey/content/options.xul</em:optionsURL>
diff --git a/locale/ar/greasemonkey.dtd b/locale/ar/greasemonkey.dtd
index bee8f0f..3c15510 100644
--- a/locale/ar/greasemonkey.dtd
+++ b/locale/ar/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonymous Statistics">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Gather and submit anonymous usage statistics to improve Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "أيضا مسح جميع الأعدادات">
 <!ENTITY UpdateChecking "تحديث السكربت">
 <!ENTITY RequireSecureUpdates "تتطلب تحديثات آمنة">
 <!ENTITY greasemonkey.noscriptshere "لايوجد سكربت مثبت يعمل على هذه الصفحة.">
diff --git a/locale/ca/greasemonkey.dtd b/locale/ca/greasemonkey.dtd
index 66b16bf..2300623 100644
--- a/locale/ca/greasemonkey.dtd
+++ b/locale/ca/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonymous Statistics">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Gather and submit anonymous usage statistics to improve Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "Also uninstall associated preferences">
 <!ENTITY UpdateChecking "Update Checking">
 <!ENTITY RequireSecureUpdates "Require secure updates">
 <!ENTITY greasemonkey.noscriptshere "No installed scripts run on this page.">
diff --git a/locale/cs/greasemonkey.dtd b/locale/cs/greasemonkey.dtd
index cbc95f6..a31845f 100644
--- a/locale/cs/greasemonkey.dtd
+++ b/locale/cs/greasemonkey.dtd
@@ -35,7 +35,7 @@
 <!ENTITY newscript.excludes "Vyloučené stránky (každá na jeden řádek)">
 <!ENTITY newscript.fromClipboard "Sestavit skript ze schránky">
 <!ENTITY options.editor "Editor">
-<!ENTITY options.experimental "Experimental">
+<!ENTITY options.experimental "Experimentální">
 <!ENTITY options.defaultEditor "Použít výchozí editor">
 <!ENTITY options.browseForEditor "Vybrat program pro editaci">
 <!ENTITY options.globalExcludes "Vyloučené stránky globálně">
@@ -43,9 +43,8 @@
 <!ENTITY options.newScript.removeUnused "Odebrat nepoužité řádky">
 <!ENTITY Uninstall "Odinstalace">
 <!ENTITY AnonymousStatistics "Anonymní statistiky">
-<!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
+<!ENTITY EnableFirefoxSync "Povolit Firefox Sync pro uživatelské skripty">
 <!ENTITY SubmitStats "Shromažďovat a odesílat anonymní statistiky o používání pro zlepšení Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "Odinstalovat i přidružená nastavení">
 <!ENTITY UpdateChecking "Kontrola aktualizací">
 <!ENTITY RequireSecureUpdates "Použít zabezpečené aktualizace">
 <!ENTITY greasemonkey.noscriptshere "Pro tuto stránku nejsou nainstalovány žádné skripty.">
diff --git a/locale/da/greasemonkey.dtd b/locale/da/greasemonkey.dtd
index 5e7d018..313008d 100644
--- a/locale/da/greasemonkey.dtd
+++ b/locale/da/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonymous Statistics">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Gather and submit anonymous usage statistics to improve Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "Også afinstallere tilhørende indstilliner">
 <!ENTITY UpdateChecking "Update Checking">
 <!ENTITY RequireSecureUpdates "Require secure updates">
 <!ENTITY greasemonkey.noscriptshere "Ingen installerede scripts køres på denne side.">
diff --git a/locale/de/greasemonkey.dtd b/locale/de/greasemonkey.dtd
index d5926a2..d2792ad 100644
--- a/locale/de/greasemonkey.dtd
+++ b/locale/de/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonyme Statistik">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Sammeln und einreichen von anonymen Nutzungsstatistiken an Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "Zugehörige Einstellungen ebenfalls entfernen">
 <!ENTITY UpdateChecking "Auf Aktualisierungen überprüfen">
 <!ENTITY RequireSecureUpdates "Sicherheitsupdate erforderlich">
 <!ENTITY greasemonkey.noscriptshere "Es werden keine installierten Skripte auf dieser Seite ausgeführt.">
diff --git a/locale/el/greasemonkey.dtd b/locale/el/greasemonkey.dtd
index a29717b..46322cb 100644
--- a/locale/el/greasemonkey.dtd
+++ b/locale/el/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Ανώνυμα στατιστικά">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Συγκέντρωση και υποβολή στατιστικών ανώνυμης χρήσης για βελτίωση του Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "Απεγκατάσταση και των σχετικών ρυθμίσεων">
 <!ENTITY UpdateChecking "Έλεγχος Ενημέρωσης">
 <!ENTITY RequireSecureUpdates "Απαιτούνται ασφαλείς ενημερώσεις">
 <!ENTITY greasemonkey.noscriptshere "Κανένας εγκατεστημένος κώδικας δεν εκτελείτε σε αυτή τη σελίδα.">
diff --git a/locale/en-US/greasemonkey.dtd b/locale/en-US/greasemonkey.dtd
index 66b16bf..2300623 100644
--- a/locale/en-US/greasemonkey.dtd
+++ b/locale/en-US/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonymous Statistics">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Gather and submit anonymous usage statistics to improve Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "Also uninstall associated preferences">
 <!ENTITY UpdateChecking "Update Checking">
 <!ENTITY RequireSecureUpdates "Require secure updates">
 <!ENTITY greasemonkey.noscriptshere "No installed scripts run on this page.">
diff --git a/locale/es-AR/greasemonkey.dtd b/locale/es-AR/greasemonkey.dtd
index b40688b..3901709 100644
--- a/locale/es-AR/greasemonkey.dtd
+++ b/locale/es-AR/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonymous Statistics">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Gather and submit anonymous usage statistics to improve Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "También desinstalar las preferencias asociadas">
 <!ENTITY UpdateChecking "Update Checking">
 <!ENTITY RequireSecureUpdates "Require secure updates">
 <!ENTITY greasemonkey.noscriptshere "No installed scripts run on this page.">
diff --git a/locale/es-CL/greasemonkey.dtd b/locale/es-CL/greasemonkey.dtd
index e4604aa..4995ee3 100644
--- a/locale/es-CL/greasemonkey.dtd
+++ b/locale/es-CL/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Estadãsticas Anônimas">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Recolectar y enviar estadãsticas anônimas de uso para mejorar Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "Eliminar preferencias asociadas">
 <!ENTITY UpdateChecking "Verificar para actualizar">
 <!ENTITY RequireSecureUpdates "Requerir actualizaciones seguras">
 <!ENTITY greasemonkey.noscriptshere "No hay  scripts instalados para este sitio.">
diff --git a/locale/es-ES/greasemonkey.dtd b/locale/es-ES/greasemonkey.dtd
index 66b16bf..2300623 100644
--- a/locale/es-ES/greasemonkey.dtd
+++ b/locale/es-ES/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonymous Statistics">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Gather and submit anonymous usage statistics to improve Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "Also uninstall associated preferences">
 <!ENTITY UpdateChecking "Update Checking">
 <!ENTITY RequireSecureUpdates "Require secure updates">
 <!ENTITY greasemonkey.noscriptshere "No installed scripts run on this page.">
diff --git a/locale/es-MX/greasemonkey.dtd b/locale/es-MX/greasemonkey.dtd
index cde973d..66994e9 100644
--- a/locale/es-MX/greasemonkey.dtd
+++ b/locale/es-MX/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonymous Statistics">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Gather and submit anonymous usage statistics to improve Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "También desinstalar preferencias asociadas">
 <!ENTITY UpdateChecking "Update Checking">
 <!ENTITY RequireSecureUpdates "Require secure updates">
 <!ENTITY greasemonkey.noscriptshere "No installed scripts run on this page.">
diff --git a/locale/et/greasemonkey.dtd b/locale/et/greasemonkey.dtd
index 69d9655..00de9d9 100644
--- a/locale/et/greasemonkey.dtd
+++ b/locale/et/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonymous Statistics">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Gather and submit anonymous usage statistics to improve Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "Also uninstall associated preferences">
 <!ENTITY UpdateChecking "Update Checking">
 <!ENTITY RequireSecureUpdates "Require secure updates">
 <!ENTITY greasemonkey.noscriptshere "No installed scripts run on this page.">
diff --git a/locale/fa/greasemonkey.dtd b/locale/fa/greasemonkey.dtd
index fa3799b..324785f 100644
--- a/locale/fa/greasemonkey.dtd
+++ b/locale/fa/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonymous Statistics">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Gather and submit anonymous usage statistics to improve Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "همچنین حذف تنظیمات وابسته">
 <!ENTITY UpdateChecking "Update Checking">
 <!ENTITY RequireSecureUpdates "Require secure updates">
 <!ENTITY greasemonkey.noscriptshere "دستنویس ای که در این صفحه اجرا شود موجود نیست.">
diff --git a/locale/fi/greasemonkey.dtd b/locale/fi/greasemonkey.dtd
index d716133..a379dc8 100644
--- a/locale/fi/greasemonkey.dtd
+++ b/locale/fi/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonymous Statistics">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Gather and submit anonymous usage statistics to improve Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "Poista myös skriptin asetukset">
 <!ENTITY UpdateChecking "Update Checking">
 <!ENTITY RequireSecureUpdates "Require secure updates">
 <!ENTITY greasemonkey.noscriptshere "Mitään skripteistä ei ajeta tällä sivulla.">
diff --git a/locale/fr/greasemonkey.dtd b/locale/fr/greasemonkey.dtd
index 71f1e8e..69ddd1f 100644
--- a/locale/fr/greasemonkey.dtd
+++ b/locale/fr/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Statistiques anonymes">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Récolte et envoie de statistiques anonymes destinées à améliorer Greasemonkey">
-<!ENTITY AlsoUninstallPrefs "Désinstalle également les préférences associées">
 <!ENTITY UpdateChecking "Vérifcation des mises à jour">
 <!ENTITY RequireSecureUpdates "Mises à jour sécurisées nécessaires">
 <!ENTITY greasemonkey.noscriptshere "Aucun script installé n'est exécuté sur cette page.">
diff --git a/locale/gl/greasemonkey.dtd b/locale/gl/greasemonkey.dtd
index 64801b7..53c5755 100644
--- a/locale/gl/greasemonkey.dtd
+++ b/locale/gl/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Estadísticas anónimas">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Envía as estadísticas anónimas de uso para mellorar Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "Tamén desinstalar as preferencias asociadas">
 <!ENTITY UpdateChecking "Update Checking">
 <!ENTITY RequireSecureUpdates "Requerir actualizacións de seguranza">
 <!ENTITY greasemonkey.noscriptshere "Ningún script instalado en execución.">
diff --git a/locale/he/greasemonkey.dtd b/locale/he/greasemonkey.dtd
index 947d0c4..cc30405 100644
--- a/locale/he/greasemonkey.dtd
+++ b/locale/he/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "עיבוד נתונים ללא זיהוי המשתמש">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "אסיפה ומשלוח עיבוד נתונים ללא זיהוי המשתמש לצורך שיפור Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "הסר גם את המאייפנים המשוייכים לקובץ Script משתמש זה">
 <!ENTITY UpdateChecking "בדיקת עדכון">
 <!ENTITY RequireSecureUpdates "דורשת עדכונים מאובטחים">
 <!ENTITY greasemonkey.noscriptshere "לא מותקנים קבצי Script פעילים בדף זה.">
diff --git a/locale/hu/greasemonkey.dtd b/locale/hu/greasemonkey.dtd
index dc38ebe..7e04cbd 100644
--- a/locale/hu/greasemonkey.dtd
+++ b/locale/hu/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonymous Statistics">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Gather and submit anonymous usage statistics to improve Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "Hozzákapcsolódó beállítások eltávolítása">
 <!ENTITY UpdateChecking "Frissítések keresése">
 <!ENTITY RequireSecureUpdates "Biztonsági frissítések igénylése">
 <!ENTITY greasemonkey.noscriptshere "Ezen az oldalon nem futnak telepített parancsfájlok.">
diff --git a/locale/it/greasemonkey.dtd b/locale/it/greasemonkey.dtd
index 01f7b0d..6f780c8 100644
--- a/locale/it/greasemonkey.dtd
+++ b/locale/it/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonymous Statistics">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Gather and submit anonymous usage statistics to improve Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "Disinstalla anche le preferenze associate">
 <!ENTITY UpdateChecking "Update Checking">
 <!ENTITY RequireSecureUpdates "Require secure updates">
 <!ENTITY greasemonkey.noscriptshere "No installed scripts run on this page.">
diff --git a/locale/ja/greasemonkey.dtd b/locale/ja/greasemonkey.dtd
index 81a8289..bbe5f8d 100644
--- a/locale/ja/greasemonkey.dtd
+++ b/locale/ja/greasemonkey.dtd
@@ -35,7 +35,7 @@
 <!ENTITY newscript.excludes "実行しないページ (改行で複数指定)">
 <!ENTITY newscript.fromClipboard "クリップボードのスクリプトを使用する">
 <!ENTITY options.editor "エディタ">
-<!ENTITY options.experimental "Experimental">
+<!ENTITY options.experimental "実験的機能">
 <!ENTITY options.defaultEditor "標準のエディタを使用">
 <!ENTITY options.browseForEditor "エディタプログラムを参照">
 <!ENTITY options.globalExcludes "実行しないページ">
@@ -43,9 +43,8 @@
 <!ENTITY options.newScript.removeUnused "未使用の行を削除">
 <!ENTITY Uninstall "削除">
 <!ENTITY AnonymousStatistics "匿名の統計">
-<!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
+<!ENTITY EnableFirefoxSync "Firefox Sync でユーザスクリプトを同期する">
 <!ENTITY SubmitStats "Greasemonkey を改善するために匿名の利用統計を収集し送信する。">
-<!ENTITY AlsoUninstallPrefs "関連付けられた設定も削除">
 <!ENTITY UpdateChecking "更新の確認">
 <!ENTITY RequireSecureUpdates "安全に更新">
 <!ENTITY greasemonkey.noscriptshere "このページで実行するスクリプトはインストールされていません。">
diff --git a/locale/ko/greasemonkey.dtd b/locale/ko/greasemonkey.dtd
index ada111a..a8ec4b4 100644
--- a/locale/ko/greasemonkey.dtd
+++ b/locale/ko/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonymous Statistics">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Gather and submit anonymous usage statistics to improve Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "관련된 환경 설정도 삭제">
 <!ENTITY UpdateChecking "Update Checking">
 <!ENTITY RequireSecureUpdates "Require secure updates">
 <!ENTITY greasemonkey.noscriptshere "No installed scripts run on this page.">
diff --git a/locale/lt/greasemonkey.dtd b/locale/lt/greasemonkey.dtd
index a4f0e8b..0e98897 100644
--- a/locale/lt/greasemonkey.dtd
+++ b/locale/lt/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anoniminė statistika">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Rinkti ir siųsti anoniminę naudojimo statistiką.">
-<!ENTITY AlsoUninstallPrefs "Taipogi pašalinti susijusius nustatymus">
 <!ENTITY UpdateChecking "Atnaujinimų tikrinimas">
 <!ENTITY RequireSecureUpdates "Reikalauti saugumo atnaujinimų">
 <!ENTITY greasemonkey.noscriptshere "Nėra įdiegtų scenarijų kurie veiktų šiame puslapyje.">
diff --git a/locale/nl/greasemonkey.dtd b/locale/nl/greasemonkey.dtd
index 6045fb4..56f3627 100644
--- a/locale/nl/greasemonkey.dtd
+++ b/locale/nl/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonieme statistieken">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Verzamel en verstuur anonieme gebruiksstatistieken om Greasemonkey te verbeteren.">
-<!ENTITY AlsoUninstallPrefs "Bijbehorende instellingen ook verwijderen">
 <!ENTITY UpdateChecking "Updatecontrole">
 <!ENTITY RequireSecureUpdates "Beveiligde updates vereisen">
 <!ENTITY greasemonkey.noscriptshere "Op deze pagina draaien geen geïnstalleerde scripts.">
diff --git a/locale/pl/greasemonkey.dtd b/locale/pl/greasemonkey.dtd
index 818a5db..0330fed 100644
--- a/locale/pl/greasemonkey.dtd
+++ b/locale/pl/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonimowe statystyki">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Zbieraj i przekazuj anonimowo statystyki używania Greasemonkey, by pomóc w udoskonaleniu aplikacji.">
-<!ENTITY AlsoUninstallPrefs "Odinstaluj również skojarzone ustawienia">
 <!ENTITY UpdateChecking "Sprawdzaj dostępność aktualizacji">
 <!ENTITY RequireSecureUpdates "Wymaga bezpiecznych aktualizacji">
 <!ENTITY greasemonkey.noscriptshere "Na tej stronie nie ma zainstalowanych skryptów do uruchomienia.">
diff --git a/locale/pt-BR/greasemonkey.dtd b/locale/pt-BR/greasemonkey.dtd
index de0b33d..cf5bfc4 100644
--- a/locale/pt-BR/greasemonkey.dtd
+++ b/locale/pt-BR/greasemonkey.dtd
@@ -43,9 +43,8 @@
 <!ENTITY options.newScript.removeUnused "Remover linhas sem uso">
 <!ENTITY Uninstall "Desinstalar">
 <!ENTITY AnonymousStatistics "Estatísticas anônimas">
-<!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
+<!ENTITY EnableFirefoxSync "Habilitar Firefox Sync paro o User Scripts">
 <!ENTITY SubmitStats "Receba e envie estatísticas anônimas de uso para melhorar o Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "Desinstalar também configurações associadas">
 <!ENTITY UpdateChecking "Verificação de Atualizações">
 <!ENTITY RequireSecureUpdates "Requisitar atualizações seguras">
 <!ENTITY greasemonkey.noscriptshere "Nenhum script instalado será executado nessa página.">
diff --git a/locale/ro/greasemonkey.dtd b/locale/ro/greasemonkey.dtd
index bcc7c34..43a20c2 100644
--- a/locale/ro/greasemonkey.dtd
+++ b/locale/ro/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Statistici anonime">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Adună și trimite statistici anonime de utilizare pentru a îmbunătății Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "Dezinstalează și preferințele asociate">
 <!ENTITY UpdateChecking "Verificare actualizări">
 <!ENTITY RequireSecureUpdates "Sunt necesare actualizări de securitate">
 <!ENTITY greasemonkey.noscriptshere "Nu sunt rulate pe această pagină scripturile instalate.">
diff --git a/locale/ru/greasemonkey.dtd b/locale/ru/greasemonkey.dtd
index 2707032..ed1b776 100644
--- a/locale/ru/greasemonkey.dtd
+++ b/locale/ru/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonymous Statistics">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Gather and submit anonymous usage statistics to improve Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "Также удалять настройки скриптов">
 <!ENTITY UpdateChecking "Проверка обновлений">
 <!ENTITY RequireSecureUpdates "Использовать безопасное обновление">
 <!ENTITY greasemonkey.noscriptshere "Для этой страницы нет скриптов">
diff --git a/locale/si/greasemonkey.dtd b/locale/si/greasemonkey.dtd
index f1fb503..00af480 100644
--- a/locale/si/greasemonkey.dtd
+++ b/locale/si/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonymous Statistics">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Gather and submit anonymous usage statistics to improve Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "එසේම ආශ්‍රිත අභිමතද ඉවත් කරන්න">
 <!ENTITY UpdateChecking "Update Checking">
 <!ENTITY RequireSecureUpdates "Require secure updates">
 <!ENTITY greasemonkey.noscriptshere "No installed scripts run on this page.">
diff --git a/locale/sk/greasemonkey.dtd b/locale/sk/greasemonkey.dtd
index 45d57d9..c94fb46 100644
--- a/locale/sk/greasemonkey.dtd
+++ b/locale/sk/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonymous Statistics">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Gather and submit anonymous usage statistics to improve Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "Odinštalovať aj pridružené nastavenia">
 <!ENTITY UpdateChecking "Kontrolovanie aktualizácií">
 <!ENTITY RequireSecureUpdates "Požaduje bezpečnostné aktualizácie">
 <!ENTITY greasemonkey.noscriptshere "Na tejto stránke nie sú spustené nainštalované skripty.">
diff --git a/locale/sr/greasemonkey.dtd b/locale/sr/greasemonkey.dtd
index ae2c144..e892921 100644
--- a/locale/sr/greasemonkey.dtd
+++ b/locale/sr/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Анонимна статистика">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Прикупљај и шаљи анонимну статистику о коришћењу ради побољшања додатка Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "Уклони и подешавања">
 <!ENTITY UpdateChecking "Проверавање ажурирања">
 <!ENTITY RequireSecureUpdates "Тражи безбедносна ажурирања">
 <!ENTITY greasemonkey.noscriptshere "Ниједна скрипта се не покреће на овој станици">
diff --git a/locale/sv-SE/greasemonkey.dtd b/locale/sv-SE/greasemonkey.dtd
index 6f369a1..9987e02 100644
--- a/locale/sv-SE/greasemonkey.dtd
+++ b/locale/sv-SE/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonym statistik">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Samla in och skicka in anonym användningsstatistik för att förbättra Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "Avinstallera även associerade inställningar">
 <!ENTITY UpdateChecking "Uppdateringskontroll">
 <!ENTITY RequireSecureUpdates "Kräv säkra uppdateringar">
 <!ENTITY greasemonkey.noscriptshere "Inga installerade skript körs på denna sida.">
diff --git a/locale/tr/greasemonkey.dtd b/locale/tr/greasemonkey.dtd
index 6ee9ac2..8bb1c73 100644
--- a/locale/tr/greasemonkey.dtd
+++ b/locale/tr/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Anonim İstatistikler">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Greasemonkey geliştirmeleri için anonim kullanım istatistiklerini topla ve gönder.">
-<!ENTITY AlsoUninstallPrefs "Ayrıca ilişkili tercihleri kaldır">
 <!ENTITY UpdateChecking "Güncelleştirme Kontrol Ediliyor">
 <!ENTITY RequireSecureUpdates "Gerekli güvenlik güncellemeleri">
 <!ENTITY greasemonkey.noscriptshere "Bu sayfada çalışan yüklenmiş betikler yok.">
diff --git a/locale/uk/greasemonkey.dtd b/locale/uk/greasemonkey.dtd
index 43f399e..4b56013 100644
--- a/locale/uk/greasemonkey.dtd
+++ b/locale/uk/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "Анонимна статистика">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "Збирати та надсилати анонимну статистику про використання для покращення Greasemonkey.">
-<!ENTITY AlsoUninstallPrefs "Вилучити також пов'язані налаштування">
 <!ENTITY UpdateChecking "Перевірка оновлень">
 <!ENTITY RequireSecureUpdates "Вимагати безпечних оновлень">
 <!ENTITY greasemonkey.noscriptshere "Жоден зі встановлених скриптів не працює на цій сторінці.">
diff --git a/locale/zh-CN/gm-cludes.dtd b/locale/zh-CN/gm-cludes.dtd
index 972ca69..00e9327 100644
--- a/locale/zh-CN/gm-cludes.dtd
+++ b/locale/zh-CN/gm-cludes.dtd
@@ -8,5 +8,5 @@
 <!ENTITY button.addUserInclude "添加为用户包括">
 <!ENTITY button.edit "编辑...">
 <!ENTITY button.remove "删除">
-<!ENTITY label.grpIncluded "脚本应用到以下网页">
-<!ENTITY label.grpExcluded "排除以下网页">
+<!ENTITY label.grpIncluded "应用到如下页面">
+<!ENTITY label.grpExcluded "排除如下页面">
diff --git a/locale/zh-CN/greasemonkey.dtd b/locale/zh-CN/greasemonkey.dtd
index 527f97c..99438b9 100644
--- a/locale/zh-CN/greasemonkey.dtd
+++ b/locale/zh-CN/greasemonkey.dtd
@@ -21,7 +21,7 @@
 <!ENTITY install.title "Greasemonkey 安装过程">
 <!ENTITY install.runson "脚本会应用到:">
 <!ENTITY install.matches "匹配:">
-<!ENTITY install.butnoton "不会应用到:">
+<!ENTITY install.butnoton "脚本不会应用到:">
 <!ENTITY install.warning1 "恶意的脚本可能会侵犯您的隐私并在您不知情的情况下以您的名义进行操作。">
 <!ENTITY install.warning2 "您应该只安装从可信任来源获得的脚本。">
 <!ENTITY install.showscriptsource "显示脚本源代码">
@@ -32,10 +32,10 @@
 <!ENTITY newscript.namespace "命名空间">
 <!ENTITY newscript.description "描述">
 <!ENTITY newscript.includes "脚本应用到(每行一条)">
-<!ENTITY newscript.excludes "排除(每行一条)">
+<!ENTITY newscript.excludes "脚本将排除(每行一条)">
 <!ENTITY newscript.fromClipboard "使用剪贴板中的脚本">
 <!ENTITY options.editor "编辑器">
-<!ENTITY options.experimental "Experimental">
+<!ENTITY options.experimental "实验性">
 <!ENTITY options.defaultEditor "使用默认编辑器">
 <!ENTITY options.browseForEditor "选择编辑器程序">
 <!ENTITY options.globalExcludes "全局排除">
@@ -43,9 +43,8 @@
 <!ENTITY options.newScript.removeUnused "移除未用的行">
 <!ENTITY Uninstall "卸载">
 <!ENTITY AnonymousStatistics "匿名统计数据">
-<!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
+<!ENTITY EnableFirefoxSync "使 Firefox Sync 支持同步用户脚本">
 <!ENTITY SubmitStats "收集和提交匿名的使用统计数据以帮助改善 Greasemonkey。">
-<!ENTITY AlsoUninstallPrefs "同时清除相关的首选项设置">
 <!ENTITY UpdateChecking "检查更新">
 <!ENTITY RequireSecureUpdates "要求安全地更新(HTTPS)">
 <!ENTITY greasemonkey.noscriptshere "在此页面上没有已安装的脚本运行。">
diff --git a/locale/zh-CN/greasemonkey.properties b/locale/zh-CN/greasemonkey.properties
index 5044de2..4acfed6 100644
--- a/locale/zh-CN/greasemonkey.properties
+++ b/locale/zh-CN/greasemonkey.properties
@@ -2,7 +2,7 @@ extensions.{e4a8a97b-f2ed-450b-b12d-ee082ba24781}.description=用于 Firefox 的
 error.access-violation=Greasemonkey 访问违规:unsafeWindow 无法调用 %1。
 error.args.getValue=GM_setValue 不支持的类型。支持的类型有:字符串,逻辑值(bool)和32位整数。
 error.args.setValue=GM_setValue 必须指定两个参数:名称和值。
-error.could-not-download-dependencies=无法下载脚本的依赖: %1
+error.could-not-download-dependencies=无法下载脚本的依赖:%1
 error.disallowedScheme=不允许的URL: %1
 error.downloadingUrl=下载时出错,URL:
 error.invalidUrl=无效的URL: %1
@@ -10,13 +10,13 @@ error.matchPattern.host=@match: 指定的主机无效。
 error.matchPattern.parse=@match: 无法解析的模式。
 error.matchPattern.path=@match: 指定的路径无效。
 error.matchPattern.scheme=@match: 指定的模式无效。
-error.menu-invalid-accesskey=菜单命令“%1”错误:accessKey必须是单个字符
+error.menu-invalid-accesskey=菜单命令“%1”错误:accessKey 必须是单个字符
 error.missingResource=没有相应名称的资源:%1
 error.parsingScript=无法解析的脚本:
-error.scriptCharset=读取脚本出错:所有 Greasemonkey 脚本都必须以UTF-8编码。
+error.scriptCharset=读取脚本出错:所有 Greasemonkey 脚本都必须以 UTF-8 编码。
 error.serverReturned=服务器返回
 error.unknown=未知错误。
-icon.uri-image-type=@icon "data:" UIR 必须是一个图像类型。
+icon.uri-image-type=@icon "data:" URI 必须是一个图像类型。
 notification.neveragain.label=不再显示
 notification.neveragain.accesskey=N
 notification.ok.label=确定
@@ -26,7 +26,7 @@ parse.require-failed=@require 失败 URL:%1
 parse.resource-syntax=@resource 声明“%1”是无效的语法。资源声明要像这样:“@resource <name> <url>”。
 parse.resource-duplicate=发现重复的资源名称“%s”。每个资源必须有唯一的名称。
 parse.resource-failed=@resource 从 %2 获取 %1 失败
-remotescript.name-unknown=RemoteScript.install(): 脚本基础名称未知。
+remotescript.name-unknown=RemoteScript.install(): 脚本基本名称未知。
 remotescript.not-downloaded=RemoteScript.install(): 脚本未下载。
 remotescript.unsafe-url=将不会下载不安全的 URL:\n%1
 return-not-in-func-deprecated=警告:在 functions 外 return 是不赞成的,并且有可能在 Greasemonkey 将来的版本中引发故障。 (return not in function)
diff --git a/locale/zh-TW/greasemonkey.dtd b/locale/zh-TW/greasemonkey.dtd
index 307dbe1..1ea37f3 100644
--- a/locale/zh-TW/greasemonkey.dtd
+++ b/locale/zh-TW/greasemonkey.dtd
@@ -45,7 +45,6 @@
 <!ENTITY AnonymousStatistics "匿名統計">
 <!ENTITY EnableFirefoxSync "Enable Firefox Sync for User Scripts">
 <!ENTITY SubmitStats "收集並送出匿名統計資訊以幫助改進 Greasemonkey。">
-<!ENTITY AlsoUninstallPrefs "同時移除相關偏好設定">
 <!ENTITY UpdateChecking "檢查更新">
 <!ENTITY RequireSecureUpdates "要求透過安全通道更新">
 <!ENTITY greasemonkey.noscriptshere "沒有任何在此頁面執行的腳本。">
diff --git a/modules/miscapis.js b/modules/miscapis.js
index 4980276..de9932d 100644
--- a/modules/miscapis.js
+++ b/modules/miscapis.js
@@ -14,20 +14,26 @@ var EXPORTED_SYMBOLS = [
 function GM_ScriptStorage(script) {
   this._db = null;
   this._script = script;
-  this.prefMan = new GM_PrefManager(script.prefroot);
   this.stringBundle = Components
     .classes["@mozilla.org/intl/stringbundle;1"]
     .getService(Components.interfaces.nsIStringBundleService)
     .createBundle("chrome://greasemonkey/locale/greasemonkey.properties");
 }
 
+GM_ScriptStorage.prototype.dbFileName = 'values.db';
+
+GM_ScriptStorage.prototype.__defineGetter__('dbFile',
+function GM_ScriptStorage_getDbFile() {
+  var file = this._script.baseDirFile;
+  file.append(this.dbFileName);
+  return file;
+});
+
 
 GM_ScriptStorage.prototype.__defineGetter__('db',
 function GM_ScriptStorage_getDb() {
   if (null == this._db) {
-    var file = this._script.baseDirFile;
-    file.append('values.db');
-    this._db = Services.storage.openDatabase(file);
+    this._db = Services.storage.openDatabase(this.dbFile);
 
     this._db.executeSimpleSQL(
         'CREATE TABLE IF NOT EXISTS scriptvals ('
@@ -133,6 +139,28 @@ GM_ScriptStorage.prototype.listValues = function() {
 };
 
 
+GM_ScriptStorage.prototype.getStats = function() {
+  var stats = {
+      count: undefined,
+      size: undefined,
+      };
+  var stmt = this.db.createStatement(
+      'SELECT COUNT(0) AS count, SUM(LENGTH(value)) AS size FROM scriptvals');
+  try {
+    while (stmt.step()) {
+      stats.count = stmt.row.count;
+      stats.size = stmt.row.size || 0;
+    }
+  } catch (e) {
+    dump('getStats err: ' + uneval(e) + '\n');
+  } finally {
+    stmt.reset();
+  }
+
+  return stats;
+}
+
+
 // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ //
 
 
diff --git a/modules/remoteScript.js b/modules/remoteScript.js
index 706cf4a..bfb6bbd 100644
--- a/modules/remoteScript.js
+++ b/modules/remoteScript.js
@@ -307,7 +307,6 @@ RemoteScript.prototype.install = function(aOldScript, aOnlyDependencies) {
     var enumerator = this._tempDir.directoryEntries;
     while (enumerator.hasMoreElements()) {
       var file = enumerator.getNext().QueryInterface(Ci.nsIFile);
-      // TODO: Fix invalid private access.
       file.moveTo(this.script.baseDirFile, null);
     }
   } else {
@@ -317,7 +316,7 @@ RemoteScript.prototype.install = function(aOldScript, aOnlyDependencies) {
           stringBundle.GetStringFromName('remotescript.name-unknown'));
     }
 
-    GM_config.install(this.script, aOldScript);
+    GM_config.install(this.script, aOldScript, this._tempDir);
 
     var suffix = 0;
     var file = GM_util.scriptDir();
diff --git a/modules/script.js b/modules/script.js
index e27bf60..70b181d 100644
--- a/modules/script.js
+++ b/modules/script.js
@@ -51,7 +51,6 @@ function Script(configNode) {
   this._modifiedTime = null;
   this._name = 'user-script';
   this._namespace = '';
-  this._prefroot = null;
   this._rawMeta = '';
   this._requires = [];
   this._resources = [];
@@ -127,6 +126,7 @@ function Script_getId() {
   return this._id;
 });
 
+// TODO: Remove this with pref -> db migration code.
 Script.prototype.__defineGetter__('prefroot',
 function Script_getPrefroot() {
   if (!this._prefroot) this._prefroot = ["scriptvals.", this.id, "."].join("");
@@ -532,22 +532,8 @@ Script.prototype.updateFromNewScript = function(newScript, safeWin) {
   // conflict with another installed script.
   if (newScript.id != this.id) {
     if (!GM_util.getService().config.installIsUpdate(newScript)) {
-      // Migrate preferences.
-      if (this.prefroot != newScript.prefroot) {
-        var prefmanOld = new GM_PrefManager(this.prefroot);
-        var prefmanNew = new GM_PrefManager(newScript.prefroot);
-
-        var names = prefmanOld.listValues();
-        for (var i = 0, name = null; name = names[i]; i++) {
-          prefmanNew.setValue(name, prefmanOld.getValue(name));
-          prefmanOld.remove(name);
-        }
-      }
-
       // Empty cached values.
       this._id = null;
-      this._prefroot = null;
-
       this._name = newScript._name;
       this._namespace = newScript._namespace;
     } else {
@@ -813,10 +799,5 @@ Script.prototype.uninstall = function(forUpdate) {
     }
   }
 
-  if (!forUpdate && GM_prefRoot.getValue("uninstallPreferences")) {
-    // Remove saved preferences
-    GM_prefRoot.remove(this.prefroot);
-  }
-
   this._changed('uninstall', forUpdate);
 };
diff --git a/modules/stats.js b/modules/stats.js
index 6d122f9..e3dd84e 100644
--- a/modules/stats.js
+++ b/modules/stats.js
@@ -9,6 +9,7 @@ the work to send data to the server.
 var EXPORTED_SYMBOLS = [];
 
 Components.utils.import('resource://services-common/utils.js');
+Components.utils.import('resource://greasemonkey/miscapis.js');
 Components.utils.import('resource://greasemonkey/parseScript.js');
 Components.utils.import('resource://greasemonkey/prefmanager.js');
 Components.utils.import('resource://greasemonkey/util.js');
@@ -106,17 +107,7 @@ function getStatsObj() {
 
   var scripts = GM_util.getService().config.scripts;
   for (var i = 0, script = null; script = scripts[i]; i++) {
-    var valueCount = 0;
-    var valueSize = 0;
-    var scriptPrefMan = new GM_PrefManager(script.prefroot);
-    var scriptPrefNames = scriptPrefMan.listValues();
-    for (var j = 0, prefName = null; prefName = scriptPrefNames[j]; j++) {
-      valueCount++;
-      // Approximate size as JSON representation, that's a likely way they
-      // would really be used.
-      valueSize += prefName.length + JSON.stringify(
-          scriptPrefMan.getValue(prefName)).length;
-    }
+    var valueStats = GM_ScriptStorage(script).getStats();
 
     var explicitGrants = [];
     var imperatives = [];
@@ -155,8 +146,8 @@ function getStatsObj() {
         'sizes': sizes,
         'userExcludeCount': script.userExcludes.length,
         'userIncludeCount': script.userIncludes.length,
-        'valueCount': valueCount,
-        'valueSize': valueSize,
+        'valueCount': valueStats.count,
+        'valueSize': valueStats.size,
         };
     stats.scripts[stats.scripts.length] = scriptStat;
   }
diff --git a/modules/sync.js b/modules/sync.js
index d8a3889..45c0df7 100644
--- a/modules/sync.js
+++ b/modules/sync.js
@@ -64,7 +64,10 @@ ScriptRecord.prototype = {
 };
 gWeave.Utils.deferGetSet(
     ScriptRecord, 'cleartext',
-    ['downloadURL', 'enabled', 'installed', 'values', 'valuesTooBig']);
+    ['downloadURL', 'enabled', 'installed',
+     'userExcludes', 'userIncludes',
+     'values', 'valuesTooBig',
+    ]);
 
 
 function ScriptStore(aName, aEngine) {
@@ -86,8 +89,9 @@ ScriptStore.prototype = {
       rs.download(GM_util.hitch(this, function(aSuccess, aType) {
         if (aSuccess && 'dependencies' == aType) {
           rs.install();
-          rs.script.enabled = aRecord.enabled;
-
+          rs.script.enabled = aRecord.cleartext.enabled;
+          rs.script.userExcludes = aRecord.cleartext.userExcludes;
+          rs.script.userIncludes = aRecord.cleartext.userIncludes;
           setScriptValuesFromSyncRecord(rs.script, aRecord);
         }
       }));
@@ -107,6 +111,8 @@ ScriptStore.prototype = {
       record.cleartext.downloadURL = script.downloadURL;
       record.cleartext.enabled = script.enabled;
       record.cleartext.installed = !script.needsUninstall;
+      record.cleartext.userExcludes = script.userExcludes;
+      record.cleartext.userIncludes = script.userIncludes;
 
       if (GM_prefRoot.getValue('sync.values')) {
         var storage = new GM_ScriptStorage(script);
@@ -170,6 +176,8 @@ ScriptStore.prototype = {
       script.uninstall();
     } else {
       script.enabled = aRecord.cleartext.enabled;
+      script.userExcludes = aRecord.cleartext.userExcludes;
+      script.userIncludes = aRecord.cleartext.userIncludes;
       setScriptValuesFromSyncRecord(script, aRecord);
     }
   },
@@ -193,7 +201,7 @@ ScriptTracker.prototype = {
       if (this.addChangedID(syncId(aScript))) {
         this.score = Math.min(100, this.score + 5);
       }
-    } else if (aEvent in {'val-set': 1, 'val-del': 1}) {
+    } else if (aEvent in {'cludes': 1, 'val-set': 1, 'val-del': 1}) {
       if (this.addChangedID(syncId(aScript))) {
         this.score = Math.min(100, this.score + 1);
       }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git



More information about the Pkg-mozext-commits mailing list