From df8f909c50b75e388987bc8e1ea60648710038e1 Mon Sep 17 00:00:00 2001 From: lovelywcm Date: Sat, 21 Feb 2009 17:59:58 +0800 Subject: [PATCH] remove the old adblock and filterset.g detecting --- chrome/content/filterStorage.js | 17 ---------- chrome/content/overlay.js | 2 +- chrome/content/tip_subscriptions.js | 41 ----------------------- chrome/content/tip_subscriptions.xul | 15 --------- chrome/locale/en-US/tip_subscriptions.dtd | 18 +--------- chrome/skin/classic/tip_subscriptions.css | 10 ------ components/nsAutoProxy.js | 8 ----- remove_string.pl | 0 test_locales.pl | 8 +---- 9 files changed, 3 insertions(+), 116 deletions(-) mode change 100644 => 100755 remove_string.pl mode change 100644 => 100755 test_locales.pl diff --git a/chrome/content/filterStorage.js b/chrome/content/filterStorage.js index 70e9a67..61e633c 100644 --- a/chrome/content/filterStorage.js +++ b/chrome/content/filterStorage.js @@ -386,23 +386,6 @@ var filterStorage = stream.close(); } - else - { - // Probably the first time we run - try to import settings from Adblock - let importBranch = prefService.getBranch("adblock."); - - try { - if (importBranch.prefHasUserValue("patterns")) - for each (let text in importBranch.getCharPref("patterns").split(" ")) - this.addFilter(Filter.fromText(text), true); - } catch (e) {} - - try { - for each (let url in importBranch.getCharPref("syncpath").split("|")) - if (!(url in this.knownSubscriptions)) - this.addSubscription(Subscription.fromURL(url)); - } catch (e) {} - } // Add missing special subscriptions if necessary for each (let specialSubscription in ["~il~", "~wl~", "~fl~", "~eh~"]) diff --git a/chrome/content/overlay.js b/chrome/content/overlay.js index 33d4405..4a4106d 100644 --- a/chrome/content/overlay.js +++ b/chrome/content/overlay.js @@ -637,7 +637,7 @@ function aupTogglePattern(text, insert) { aupReloadPrefs(); } -// Handle clicks on the Adblock statusbar panel +// Handle clicks on the statusbar panel function aupClickHandler(e) { if (e.button == 0) aupExecuteAction(aupPrefs.defaultstatusbaraction); diff --git a/chrome/content/tip_subscriptions.js b/chrome/content/tip_subscriptions.js index d4056d7..2fafe27 100644 --- a/chrome/content/tip_subscriptions.js +++ b/chrome/content/tip_subscriptions.js @@ -28,31 +28,11 @@ let prefs = aup.prefs; let autoAdd; let result; -let adblockID = "{34274bf4-1d97-a289-e984-17e546307e4f}"; -let filtersetG = "filtersetg@updater"; - function init() { autoAdd = !(window.arguments && window.arguments.length); result = (autoAdd ? {disabled: false, external: false, autoDownload: true} : window.arguments[0]); document.getElementById("description-par1").hidden = !autoAdd; - - // Don't show Adblock/Filterset.G warning in SeaMonkey - no point showing - // a warning if we cannot uninstall. - if ("@mozilla.org/extensions/manager;1" in Components.classes) - { - if (isExtensionActive(adblockID)) - document.getElementById("adblock-warning").hidden = false; - - if (isExtensionActive(filtersetG)) - document.getElementById("filtersetg-warning").hidden = false; - - if ("Filterset.G" in aup.filterStorage.knownSubscriptions && - !aup.filterStorage.knownSubscriptions["Filterset.G"].disabled) - { - document.getElementById("filtersetg-warning").hidden = false; - } - } } function addSubscriptions() { @@ -150,24 +130,3 @@ function isExtensionActive(id) return true; } - -function uninstallAdblock() -{ - uninstallExtension(adblockID); - document.getElementById("adblock-warning").hidden = true; -} - -function uninstallFiltersetG() -{ - // Disable further updates - aup.denyFiltersetG = true; - - // Uninstall extension - uninstallExtension(filtersetG); - - // Remove filter subscription - if ("Filterset.G" in aup.filterStorage.knownSubscriptions) - aup.filterStorage.removeSubscription(aup.filterStorage.knownSubscriptions["Filterset.G"]); - - document.getElementById("filtersetg-warning").hidden = true; -} diff --git a/chrome/content/tip_subscriptions.xul b/chrome/content/tip_subscriptions.xul index 4aacd13..343d6ec 100644 --- a/chrome/content/tip_subscriptions.xul +++ b/chrome/content/tip_subscriptions.xul @@ -50,21 +50,6 @@ &description.par1; -