Permalink
Browse files

remove the old adblock and filterset.g detecting

  • Loading branch information...
lovelywcm committed Feb 21, 2009
1 parent 570d846 commit df8f909c50b75e388987bc8e1ea60648710038e1
@@ -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~"])
@@ -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);
@@ -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;
}
@@ -50,21 +50,6 @@
<hbox>
<vbox flex="1">
<description id="description-par1">&description.par1;</description>
<vbox id="adblock-warning" hidden="true">
<description>&adblock.warning;</description>
<hbox>
<button id="adblock-uninstall" label="&adblock.uninstall;" oncommand="uninstallAdblock()"/>
</hbox>
</vbox>
<vbox id="filtersetg-warning" hidden="true">
<description>
&filterset.g.warning;
<description class="moreinfo" _url="&filterset.g.moreinfo.url;" tooltiptext="&filterset.g.moreinfo.url;" value="&filterset.g.moreinfo;" onclick="aup.loadInBrowser(this.getAttribute('_url'))"/>
</description>
<hbox>
<button id="filtersetg-uninstall" label="&filterset.g.uninstall;" oncommand="uninstallFiltersetG()"/>
</hbox>
</vbox>
<description id="description-par2">&description.par2;</description>
</vbox>
<vbox>
@@ -26,7 +26,7 @@
<!ENTITY description.par1 "
Thank you for installing AutoProxy. This extension can
eliminate 99% of the advertisements you see on the web. However,
eliminate 99&#x25; of the advertisements you see on the web. However,
effective ad filtering requires you to define a good set of
filters. You can do it yourself, or you can simply subscribe
to filter lists others maintain for you. It will still be possible
@@ -46,22 +46,6 @@
to web sites from the region this filter list was created for.
">
<!ENTITY adblock.warning "
Adblock Plus has detected that Adblock or an old version of Adblock Plus is
installed. Running both Adblock and Adblock Plus in parallel can cause
problems and should be avoided. It is recommended that you uninstall Adblock now.
">
<!ENTITY adblock.uninstall "Uninstall Adblock">
<!ENTITY filterset.g.warning "
It seems that you use Filterset.G. This filter list has been barely
maintained in the last few years and is a common cause of problems with web
sites. It is recommended that you uninstall Filterset.G now.
">
<!ENTITY filterset.g.moreinfo "More information">
<!ENTITY filterset.g.moreinfo.url "http://autoproxy.org/en/faq_project#filterset.g">
<!ENTITY filterset.g.uninstall "Uninstall Filterset.G">
<!ENTITY homepage.label "Home page">
<!ENTITY subscribe.label "Subscribe">
@@ -42,16 +42,6 @@ dialog {
overflow: auto;
}
#adblock-warning,
#filtersetg-warning {
color: #F00000;
}
#adblock-uninstall,
#filtersetg-uninstall {
margin-left: 20px;
}
template+.container, .containerAdded {
border-top: 1px solid black;
}
@@ -253,9 +253,6 @@ const aup =
*/
updateExternalSubscription: function(/**String*/ id, /**String*/ title, /**Array of Filter*/ filters, /**Integer*/ length) /**Boolean*/
{
if (id == "Filterset.G" && this.denyFiltersetG)
return false;
try
{
// Don't allow valid URLs as IDs for external subscriptions
@@ -344,11 +341,6 @@ const aup =
// Custom methods
//
/**
* If true, incoming updates for Filterset.G should be rejected.
*/
denyFiltersetG: false,
/**
* Adds a new subscription to the list or changes the parameters of
* an existing filter subscription.
View
0 remove_string.pl 100644 → 100755
No changes.
View
8 test_locales.pl 100644 → 100755
@@ -4,11 +4,10 @@
my %paths = (
aup => 'chrome/locale',
ehh => 'elemhidehelper/chrome/locale',
);
my @must_differ = (
['aup:overlay:opensidebar.accesskey', 'aup:overlay:settings.accesskey', 'aup:settings:options.accesskey', 'aup:settings:enable.accesskey', 'ehh:overlay:selectelement.accesskey'],
['aup:overlay:opensidebar.accesskey', 'aup:overlay:settings.accesskey', 'aup:settings:options.accesskey', 'aup:settings:enable.accesskey'],
['aup:settings:filters.accesskey', 'aup:settings:edit.accesskey', 'aup:settings:view.accesskey', 'aup:settings:options.accesskey', 'aup:settings:help.accesskey', 'aup:settings:add.accesskey', 'aup:settings:apply.accesskey'],
['aup:settings:add.accesskey', 'aup:settings:addsubscription.accesskey', 'aup:settings:synchsubscriptions.accesskey', 'aup:settings:import.accesskey', 'aup:settings:export.accesskey', 'aup:settings:clearall.accesskey', 'aup:settings:resethitcounts.accesskey'],
['aup:settings:cut.accesskey', 'aup:settings:copy.accesskey', 'aup:settings:paste.accesskey', 'aup:settings:remove.accesskey', 'aup:settings:menu.find.accesskey', 'aup:settings:menu.findagain.accesskey'],
@@ -19,12 +18,10 @@
['aup:findbar:next.accesskey', 'aup:findbar:previous.accesskey', 'aup:findbar:highlight.accesskey'],
['aup:subscription:location.accesskey', 'aup:subscription:title.accesskey', 'aup:subscription:autodownload.accesskey', 'aup:subscription:enabled.accesskey'],
['aup:composer:filter.accesskey', 'aup:composer:preferences.accesskey', 'aup:composer:type.filter.accesskey', 'aup:composer:type.whitelist.accesskey', 'aup:composer:custom.pattern.accesskey', 'aup:composer:anchor.start.accesskey', 'aup:composer:anchor.end.accesskey', 'aup:composer:domainRestriction.accesskey', 'aup:composer:firstParty.accesskey', 'aup:composer:thirdParty.accesskey', 'aup:composer:matchCase.accesskey', 'aup:composer:collapse.accesskey'],
['ehh:global:command.select.key', 'ehh:global:command.wider.key', 'ehh:global:command.narrower.key', 'ehh:global:command.quit.key', 'ehh:global:command.blinkElement.key', 'ehh:global:command.viewSource.key', 'ehh:global:command.viewSourceWindow.key', 'ehh:global:command.showMenu.key'],
);
my @must_equal = (
['aup:overlay:opensidebar.accesskey', 'aup:overlay:closesidebar.accesskey'],
['ehh:overlay:selectelement.accesskey', 'ehh:overlay:stopselection.accesskey'],
);
my %keepAccessKeys = map {$_ => $_} (
@@ -51,9 +48,6 @@
quotemeta("aup:overlay:toolbarbutton.label"),
quotemeta("aup:settings:filters.label"),
quotemeta("aup:sidebar:filter.label"),
quotemeta("ehh:composer:nodes-tree.class.label"),
quotemeta("ehh:composer:nodes-tree.id.label"),
quotemeta("ehh:global:noaup_warning_title"),
);
my @locales = sort {$a cmp $b} makeLocaleList();

0 comments on commit df8f909

Please sign in to comment.