├── .gitignore
├── chrome
├── locale
│ ├── fr
│ │ ├── chooseProxyServer.dtd
│ │ ├── about.dtd
│ │ ├── overlay.dtd
│ │ ├── editProxyServer.dtd
│ │ ├── subscription.dtd
│ │ ├── sidebar.dtd
│ │ ├── tip_subscriptions.dtd
│ │ ├── global.properties
│ │ └── settings.dtd
│ ├── zh-CN
│ │ ├── chooseProxyServer.dtd
│ │ ├── about.dtd
│ │ ├── subscription.dtd
│ │ ├── editProxyServer.dtd
│ │ ├── tip_subscriptions.dtd
│ │ ├── overlay.dtd
│ │ ├── sidebar.dtd
│ │ ├── global.properties
│ │ └── settings.dtd
│ ├── de
│ │ ├── chooseProxyServer.dtd
│ │ ├── about.dtd
│ │ ├── overlay.dtd
│ │ ├── editProxyServer.dtd
│ │ ├── subscription.dtd
│ │ ├── tip_subscriptions.dtd
│ │ ├── sidebar.dtd
│ │ ├── global.properties
│ │ └── settings.dtd
│ ├── sv-SE
│ │ ├── chooseProxyServer.dtd
│ │ ├── about.dtd
│ │ ├── editProxyServer.dtd
│ │ ├── subscription.dtd
│ │ ├── overlay.dtd
│ │ ├── tip_subscriptions.dtd
│ │ ├── sidebar.dtd
│ │ ├── global.properties
│ │ └── settings.dtd
│ ├── en-US
│ │ ├── chooseProxyServer.dtd
│ │ ├── about.dtd
│ │ ├── subscription.dtd
│ │ ├── editProxyServer.dtd
│ │ ├── overlay.dtd
│ │ ├── tip_subscriptions.dtd
│ │ ├── sidebar.dtd
│ │ └── global.properties
│ ├── es-ES
│ │ ├── chooseProxyServer.dtd
│ │ ├── about.dtd
│ │ ├── editProxyServer.dtd
│ │ ├── overlay.dtd
│ │ ├── subscription.dtd
│ │ ├── sidebar.dtd
│ │ ├── tip_subscriptions.dtd
│ │ ├── global.properties
│ │ └── settings.dtd
│ ├── pt-BR
│ │ ├── chooseProxyServer.dtd
│ │ ├── about.dtd
│ │ ├── editProxyServer.dtd
│ │ ├── overlay.dtd
│ │ ├── subscription.dtd
│ │ ├── sidebar.dtd
│ │ ├── tip_subscriptions.dtd
│ │ ├── global.properties
│ │ └── settings.dtd
│ └── sq-AL
│ │ ├── chooseProxyServer.dtd
│ │ ├── about.dtd
│ │ ├── subscription.dtd
│ │ ├── overlay.dtd
│ │ ├── global.properties
│ │ ├── tip_subscriptions.dtd
│ │ ├── sidebar.dtd
│ │ ├── editProxyServer.dtd
│ │ └── settings.dtd
├── skin
│ ├── close.png
│ ├── checkbox.png
│ ├── aup-status.png
│ ├── item-state.png
│ ├── aup-status-16.png
│ ├── subscription.css
│ ├── chooseProxyServer.css
│ ├── seaMonkeyHack.css
│ ├── about.css
│ ├── editProxyServer.css
│ ├── tip_subscriptions.css
│ ├── sidebar.css
│ ├── overlay.css
│ └── settings.css
└── content
│ ├── ui
│ ├── optionsOverlay.xul
│ ├── subscriptions.xml
│ ├── optionsOverlay.js
│ ├── about.js
│ ├── overlay.js
│ ├── utils.js
│ ├── sidebarDetached.xul
│ ├── prismOverlay.xul
│ ├── chooseProxyServer.xul
│ ├── mailOverlay.xul
│ ├── seamonkeyOverlay.xul
│ ├── subscription.xul
│ ├── editProxyServer.xul
│ ├── findbar.js
│ ├── firefoxOverlay.xul
│ ├── flasher.js
│ ├── about.xul
│ ├── tip_subscriptions.xul
│ ├── subscription.js
│ ├── chooseProxyServer.js
│ └── tip_subscriptions.js
│ ├── errors.html
│ └── proxy.js
├── icon.png
├── remove_string.pl
├── search_and_replace.pl
├── make_release.pl
├── make_devbuild.sh
├── update.rdf
├── create_xpi.pl
├── make_babelzilla_build.pl
├── README
├── defaults
└── preferences
│ └── autoproxy.js
├── chrome.manifest
├── apdiff.sh
├── make_devbuild.pl
└── install.rdf
/.gitignore:
--------------------------------------------------------------------------------
1 | *.xpi
2 |
--------------------------------------------------------------------------------
/chrome/locale/fr/chooseProxyServer.dtd:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/agunchan/autoproxy/HEAD/icon.png
--------------------------------------------------------------------------------
/chrome/locale/zh-CN/chooseProxyServer.dtd:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chrome/skin/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/agunchan/autoproxy/HEAD/chrome/skin/close.png
--------------------------------------------------------------------------------
/chrome/locale/de/chooseProxyServer.dtd:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chrome/skin/checkbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/agunchan/autoproxy/HEAD/chrome/skin/checkbox.png
--------------------------------------------------------------------------------
/chrome/locale/sv-SE/chooseProxyServer.dtd:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chrome/skin/aup-status.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/agunchan/autoproxy/HEAD/chrome/skin/aup-status.png
--------------------------------------------------------------------------------
/chrome/skin/item-state.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/agunchan/autoproxy/HEAD/chrome/skin/item-state.png
--------------------------------------------------------------------------------
/chrome/locale/en-US/chooseProxyServer.dtd:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chrome/locale/es-ES/chooseProxyServer.dtd:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chrome/skin/aup-status-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/agunchan/autoproxy/HEAD/chrome/skin/aup-status-16.png
--------------------------------------------------------------------------------
/chrome/locale/pt-BR/chooseProxyServer.dtd:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chrome/locale/sq-AL/chooseProxyServer.dtd:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chrome/locale/fr/about.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/chrome/locale/sq-AL/about.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/chrome/locale/sq-AL/subscription.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/chrome/content/ui/optionsOverlay.xul:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/chrome/locale/sq-AL/overlay.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/chrome/locale/sq-AL/global.properties:
--------------------------------------------------------------------------------
1 | subscription_status_lastdownload_unknown=Nuk dihet
2 | import_filters_title=Importo rregullat
3 | export_filters_title=Eksporto rregullat
4 | synchronize_ok=Me sukses
5 | overwrite=Rishkruaj
6 | new_filter_group_title=Rregulla të reja
7 |
--------------------------------------------------------------------------------
/chrome/locale/zh-CN/about.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chrome/locale/sq-AL/tip_subscriptions.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/chrome/content/ui/subscriptions.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chrome/locale/de/about.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chrome/locale/es-ES/about.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chrome/locale/pt-BR/about.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chrome/locale/sv-SE/about.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chrome/locale/en-US/about.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chrome/locale/sq-AL/sidebar.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/chrome/locale/sq-AL/editProxyServer.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/chrome/content/ui/optionsOverlay.js:
--------------------------------------------------------------------------------
1 | const aup = Components.classes["@mozilla.org/autoproxy;1"].createInstance().wrappedJSObject;
2 |
3 | window.onload = bindEvent = function()
4 | {
5 | var pane = document.getElementById("paneAdvanced");
6 | if (!pane.loaded)
7 | pane.addEventListener("click", bindEvent, false);
8 | else {
9 | document.getElementById("connectionSettings").setAttribute("oncommand", "handleProxySettings()");
10 | pane.removeEventListener("click", bindEvent, false);
11 | }
12 | }
13 |
14 | function handleProxySettings()
15 | {
16 | aup.openSettingsDialog();
17 | }
18 |
--------------------------------------------------------------------------------
/chrome/locale/zh-CN/subscription.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/chrome/locale/fr/overlay.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/chrome/locale/zh-CN/editProxyServer.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/chrome/locale/zh-CN/tip_subscriptions.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/chrome/locale/zh-CN/overlay.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/remove_string.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/perl -w
2 |
3 | use strict;
4 |
5 | my ($file, $string) = @ARGV;
6 |
7 | opendir(local *DIR, "chrome/locale") or die "Could not open directory chrome/locale";
8 | my @locales = sort {$a cmp $b} grep {!/[^\w\-]/} readdir(DIR);
9 | closedir(DIR);
10 |
11 | foreach my $locale (@locales) {
12 | open(local *FILE, "chrome/locale/$locale/$file") or die "Could not open file chrome/locale/$locale/$file";
13 | local $/;
14 | my $data = ;
15 | close(FILE);
16 |
17 | if ($file =~ /\.dtd$/) {
18 | $data =~ s/\s*//gs or (warn "String $string not found in file chrome/locale/$locale/$file" && next);
19 | }
20 | else {
21 | $data =~ s/^$string=.*\n//gm or (warn "String $string not found in file chrome/locale/$locale/$file" && next);
22 | }
23 |
24 | open(FILE, ">chrome/locale/$locale/$file") or die "Could not write file chrome/locale/$locale/$file";
25 | print FILE $data;
26 | close(FILE);
27 | }
28 |
--------------------------------------------------------------------------------
/chrome/locale/es-ES/editProxyServer.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/chrome/locale/pt-BR/editProxyServer.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/search_and_replace.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/perl
2 |
3 | use strict;
4 |
5 | die "Usage: $^X $0 \n" unless @ARGV >= 2;
6 |
7 | my ($from, $to) = @ARGV;
8 |
9 | doDir('.');
10 |
11 | sub doDir
12 | {
13 | my $dir = shift;
14 |
15 | opendir(local *DIR, $dir) or die "Could not open directory $dir";
16 | foreach (readdir(DIR))
17 | {
18 | next if !/[^.]/;
19 |
20 | my $path = "$dir/$_";
21 | if (-f $path)
22 | {
23 | doFile($path);
24 | }
25 | elsif (-d $path)
26 | {
27 | doDir($path);
28 | }
29 | }
30 | closedir(DIR);
31 | }
32 |
33 | sub doFile
34 | {
35 | my $file = shift;
36 |
37 | print "$file\n";
38 | open(local *FILE, $file) or die "Could not read file $file";
39 | binmode(FILE);
40 | local $/;
41 | my $data = ;
42 | my $count = ($data =~ s/$from/$to/g);
43 | close(FILE);
44 |
45 | if ($count)
46 | {
47 | open(FILE, ">$file") or die "Could not write file $file";
48 | binmode(FILE);
49 | print FILE $data;
50 | close(FILE);
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/chrome/locale/sv-SE/editProxyServer.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/chrome/locale/pt-BR/overlay.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/chrome/locale/es-ES/overlay.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/make_release.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/perl
2 |
3 | #############################################################################
4 | # This is the release automation script, it will change current extension #
5 | # version, create release builds and commit it all into Mercurial. Usually #
6 | # you just want to create a build - use make_devbuild.pl for this. #
7 | #############################################################################
8 |
9 | use strict;
10 |
11 | die "Version number not specified" unless @ARGV;
12 |
13 | my $version = $ARGV[0];
14 | $version =~ s/[^\w\.]//gs;
15 |
16 | open(VERSION, ">version");
17 | print VERSION $ARGV[0];
18 | close(VERSION);
19 |
20 | @ARGV = ("../downloads/autoproxy-$version.xpi");
21 | do './create_xpi.pl';
22 |
23 | chdir('..');
24 | system("hg add downloads/autoproxy-$version.xpi");
25 | system(qq(hg commit -m "Releasing AutoProxy $version" downloads src));
26 |
27 | my $branch = $version;
28 | $branch =~ s/\./_/g;
29 | $branch = "AutoProxy_".$branch."_RELEASE";
30 | system(qq(hg tag $branch));
31 |
32 | system(qq(hg push));
33 |
--------------------------------------------------------------------------------
/chrome/locale/fr/editProxyServer.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/chrome/locale/de/overlay.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/chrome/locale/de/editProxyServer.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/chrome/locale/pt-BR/subscription.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/chrome/locale/de/subscription.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/chrome/locale/sv-SE/subscription.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/chrome/skin/subscription.css:
--------------------------------------------------------------------------------
1 | /* ***** BEGIN LICENSE BLOCK *****
2 | * Version: MPL 1.1
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version
5 | * 1.1 (the "License"); you may not use this file except in compliance with
6 | * the License. You may obtain a copy of the License at
7 | * http://www.mozilla.org/MPL/
8 | *
9 | * Software distributed under the License is distributed on an "AS IS" basis,
10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 | * for the specific language governing rights and limitations under the
12 | * License.
13 | *
14 | * The Original Code is Adblock Plus.
15 | *
16 | * The Initial Developer of the Original Code is
17 | * Wladimir Palant.
18 | * Portions created by the Initial Developer are Copyright (C) 2006-2008
19 | * the Initial Developer. All Rights Reserved.
20 | *
21 | * Contributor(s):
22 | *
23 | * ***** END LICENSE BLOCK ***** */
24 |
25 | @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
26 |
27 | textbox {
28 | min-width: 300px;
29 | }
30 |
31 | description {
32 | width: 400px;
33 | margin-bottom: 20px;
34 | }
35 |
--------------------------------------------------------------------------------
/chrome/locale/fr/subscription.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/chrome/locale/zh-CN/sidebar.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/chrome/locale/es-ES/subscription.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/chrome/locale/en-US/subscription.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/chrome/locale/en-US/editProxyServer.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
28 |
29 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/make_devbuild.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ################################################################################
4 | # #
5 | # make a dev build... #
6 | # #
7 | ################################################################################
8 |
9 | # read from install.rdf
10 | # assume that "em:version" is located at line 9
11 | # if not, update the value of NR accordingly as below
12 | version=$(awk -F '>|<' 'NR==9 {printf $3}' install.rdf)
13 |
14 | # add timestamp to every dev build, so that they are distinguishable
15 | timestamp=$(date +%Y%m%d%H)
16 | versionPlusTimestamp=$version"."$timestamp
17 |
18 | perl -pi -e s,"em:version.*","em:version>$versionPlusTimestamp<\/em:version>", install.rdf
19 | perl -pi -e s,{{VERSION}},$versionPlusTimestamp, components/AutoProxy.js
20 |
21 | zip -r autoproxy-$versionPlusTimestamp.xpi chrome components defaults install.rdf chrome.manifest icon.png
22 |
23 | perl -pi -e s,"em:version.*","em:version>$version<\/em:version>", install.rdf
24 | perl -pi -e s,$versionPlusTimestamp,{{VERSION}}, components/AutoProxy.js
25 |
--------------------------------------------------------------------------------
/chrome/content/ui/about.js:
--------------------------------------------------------------------------------
1 | /* ***** BEGIN LICENSE BLOCK *****
2 | * Version: MPL 1.1
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version
5 | * 1.1 (the "License"); you may not use this file except in compliance with
6 | * the License. You may obtain a copy of the License at
7 | * http://www.mozilla.org/MPL/
8 | *
9 | * Software distributed under the License is distributed on an "AS IS" basis,
10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 | * for the specific language governing rights and limitations under the
12 | * License.
13 | *
14 | * The Original Code is Adblock Plus.
15 | *
16 | * The Initial Developer of the Original Code is
17 | * Wladimir Palant.
18 | * Portions created by the Initial Developer are Copyright (C) 2006-2009
19 | * the Initial Developer. All Rights Reserved.
20 | *
21 | * Contributor(s):
22 | *
23 | * ***** END LICENSE BLOCK ***** */
24 |
25 | var versionField = document.getElementById("version"),
26 | sloganField = document.getElementById("slogan");
27 |
28 | versionField.value = aup.getInstalledVersion();
29 | sloganField.value = aup.getString("extensions.autoproxy@autoproxy.org.description");
30 |
31 | // Work-around for bug 494901, change align attribute to ensure correct positioning
32 | versionField.parentNode.setAttribute("align", "baseline");
33 |
--------------------------------------------------------------------------------
/chrome/skin/chooseProxyServer.css:
--------------------------------------------------------------------------------
1 | /* ***** BEGIN LICENSE BLOCK *****
2 | * Version: MPL 1.1
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version
5 | * 1.1 (the "License"); you may not use this file except in compliance with
6 | * the License. You may obtain a copy of the License at
7 | * http://www.mozilla.org/MPL/
8 | *
9 | * Software distributed under the License is distributed on an "AS IS" basis,
10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 | * for the specific language governing rights and limitations under the
12 | * License.
13 | *
14 | * The Original Code is AutoProxy.
15 | *
16 | * The Initial Developer of the Original Code is
17 | * Wang Congming .
18 | *
19 | * Portions created by the Initial Developer are Copyright (C) 2009-2011
20 | * the Initial Developer. All Rights Reserved.
21 | *
22 | * Contributor(s):
23 | *
24 | * ***** END LICENSE BLOCK ***** */
25 |
26 | @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
27 | @namespace html url("http://www.w3.org/1999/xhtml");
28 |
29 | row > label {
30 | text-align: right;
31 | }
32 |
33 | menuseparator + label {
34 | text-align: center;
35 | }
36 |
37 | #defaultProxy > label, #fallbackProxy > label {
38 | font-weight: bold;
39 | font-size: 120%;
40 | }
41 |
42 | menulist {
43 | min-width: 135px;
44 | }
45 |
--------------------------------------------------------------------------------
/chrome/skin/seaMonkeyHack.css:
--------------------------------------------------------------------------------
1 | /* ***** BEGIN LICENSE BLOCK *****
2 | * Version: MPL 1.1
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version
5 | * 1.1 (the "License"); you may not use this file except in compliance with
6 | * the License. You may obtain a copy of the License at
7 | * http://www.mozilla.org/MPL/
8 | *
9 | * Software distributed under the License is distributed on an "AS IS" basis,
10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 | * for the specific language governing rights and limitations under the
12 | * License.
13 | *
14 | * The Original Code is Adblock Plus.
15 | *
16 | * The Initial Developer of the Original Code is
17 | * Wladimir Palant.
18 | * Portions created by the Initial Developer are Copyright (C) 2006-2009
19 | * the Initial Developer. All Rights Reserved.
20 | *
21 | * Contributor(s):
22 | *
23 | * ***** END LICENSE BLOCK ***** */
24 |
25 | @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
26 |
27 | #aup-toolbarbutton .toolbarbutton-icon
28 | {
29 | margin-top: 5px;
30 | }
31 | #aup-toolbarbutton > .toolbarbutton-menubutton-stack > .toolbarbutton-menubutton-dropmarker
32 | {
33 | margin-bottom: 0px;
34 | }
35 | @-moz-document domain("mail")
36 | {
37 | #aup-toolbarbutton .toolbarbutton-menubutton-button
38 | {
39 | -moz-box-orient: vertical;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/chrome/locale/sv-SE/overlay.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/chrome/locale/pt-BR/sidebar.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/chrome/locale/sv-SE/tip_subscriptions.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/chrome/locale/de/tip_subscriptions.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/chrome/locale/sv-SE/sidebar.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/chrome/locale/fr/sidebar.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/chrome/locale/de/sidebar.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/chrome/locale/pt-BR/tip_subscriptions.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/chrome/locale/en-US/overlay.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/chrome/locale/en-US/tip_subscriptions.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/chrome/locale/es-ES/sidebar.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/chrome/skin/about.css:
--------------------------------------------------------------------------------
1 | /* ***** BEGIN LICENSE BLOCK *****
2 | * Version: MPL 1.1
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version
5 | * 1.1 (the "License"); you may not use this file except in compliance with
6 | * the License. You may obtain a copy of the License at
7 | * http://www.mozilla.org/MPL/
8 | *
9 | * Software distributed under the License is distributed on an "AS IS" basis,
10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 | * for the specific language governing rights and limitations under the
12 | * License.
13 | *
14 | * The Original Code is Adblock Plus.
15 | *
16 | * The Initial Developer of the Original Code is
17 | * Wladimir Palant.
18 | * Portions created by the Initial Developer are Copyright (C) 2006-2008
19 | * the Initial Developer. All Rights Reserved.
20 | *
21 | * Contributor(s):
22 | *
23 | * ***** END LICENSE BLOCK ***** */
24 |
25 | @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
26 |
27 | #title {
28 | font-size: 300%;
29 | font-weight: bold;
30 | }
31 |
32 | #slogan {
33 | margin: 5px 0;
34 | }
35 |
36 | #author, #homepage, #members, #contributors, #translators {
37 | font-weight: bold;
38 | }
39 |
40 | #members, #contributors, #translators {
41 | margin-top: 15px;
42 | }
43 |
44 | #authorName, #homepageLink, #members + hbox > label {
45 | color: #0000E0;
46 | text-decoration: underline;
47 | cursor: pointer;
48 | }
49 |
50 |
--------------------------------------------------------------------------------
/chrome/locale/es-ES/tip_subscriptions.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/chrome/locale/en-US/sidebar.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/update.rdf:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 0.3.0b4
11 |
12 |
13 |
14 |
15 | {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
16 | 3.0.9
17 | 3.7a5pre
18 | http://autoproxy.mozdev.org/latest.xpi
19 | sha1:03f7b46e5a042491dffc08022360cb4ba7efc9d1
20 | http://autoproxy.mozdev.org/whatsnew.xhtml
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | MIGTMA0GCSqGSIb3DQEBBQUAA4GBAMO1O2gwSCCth1GwYMgscfaNakpN40PJfOWt
29 | ub2HVdg8+OXMciF8d/9eVWm8eH/IxuxyZlmRZTs3O5tv9eWAY5uBCtqDf1WgTsGk
30 | jrgZow1fITkZI7w0//C8eKdMLAtGueGfNs2IlTd5P/0KH/hf1rPc1wUqEqKCd4+L
31 | BcVq13ad
32 |
33 |
34 |
--------------------------------------------------------------------------------
/chrome/content/ui/overlay.js:
--------------------------------------------------------------------------------
1 | /* ***** BEGIN LICENSE BLOCK *****
2 | * Version: MPL 1.1
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version
5 | * 1.1 (the "License"); you may not use this file except in compliance with
6 | * the License. You may obtain a copy of the License at
7 | * http://www.mozilla.org/MPL/
8 | *
9 | * Software distributed under the License is distributed on an "AS IS" basis,
10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 | * for the specific language governing rights and limitations under the
12 | * License.
13 | *
14 | * The Original Code is Adblock Plus.
15 | *
16 | * The Initial Developer of the Original Code is
17 | * Wladimir Palant.
18 | * Portions created by the Initial Developer are Copyright (C) 2006-2009
19 | * the Initial Developer. All Rights Reserved.
20 | *
21 | * Contributor(s):
22 | *
23 | * ***** END LICENSE BLOCK ***** */
24 |
25 | window.addEventListener("load", function()
26 | {
27 | // Abuse sandboxes so get an execution context for our code
28 | let sandbox = new Components.utils.Sandbox(window);
29 | sandbox.window = window;
30 | sandbox.document = document;
31 |
32 | let loader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
33 | .getService(Components.interfaces.mozIJSSubScriptLoader);
34 | loader.loadSubScript("chrome://autoproxy/content/ui/utils.js", sandbox);
35 | loader.loadSubScript("chrome://autoproxy/content/ui/browserWindow.js", sandbox);
36 | loader.loadSubScript("chrome://autoproxy/content/ui/enableProxyOn.js", sandbox);
37 | }, false);
38 |
--------------------------------------------------------------------------------
/chrome/locale/fr/tip_subscriptions.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/chrome/content/ui/utils.js:
--------------------------------------------------------------------------------
1 | /* ***** BEGIN LICENSE BLOCK *****
2 | * Version: MPL 1.1
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version
5 | * 1.1 (the "License"); you may not use this file except in compliance with
6 | * the License. You may obtain a copy of the License at
7 | * http://www.mozilla.org/MPL/
8 | *
9 | * Software distributed under the License is distributed on an "AS IS" basis,
10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 | * for the specific language governing rights and limitations under the
12 | * License.
13 | *
14 | * The Original Code is Adblock Plus.
15 | *
16 | * The Initial Developer of the Original Code is
17 | * Wladimir Palant.
18 | * Portions created by the Initial Developer are Copyright (C) 2006-2009
19 | * the Initial Developer. All Rights Reserved.
20 | *
21 | * Contributor(s):
22 | * 2009: Wang Congming modified for AutoProxy.
23 | *
24 | * ***** END LICENSE BLOCK ***** */
25 |
26 | const Cc = Components.classes;
27 | const Ci = Components.interfaces;
28 | const Cr = Components.results;
29 | const Cu = Components.utils;
30 |
31 | const aup = Components.classes["@mozilla.org/autoproxy;1"].createInstance().wrappedJSObject;
32 | const prefs = aup.prefs;
33 | const policy = aup.policy;
34 | const proxy = aup.proxy;
35 | const filterStorage = aup.filterStorage;
36 | const synchronizer = aup.synchronizer;
37 |
38 | /**
39 | * Shortcut for document.getElementById(id)
40 | */
41 | function E(id)
42 | {
43 | return document.getElementById(id);
44 | }
45 |
46 | /**
47 | * Shortcut for document.createElementNS(element)
48 | */
49 | function cE(elmt)
50 | {
51 | return document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", elmt);
52 | }
53 |
--------------------------------------------------------------------------------
/chrome/skin/editProxyServer.css:
--------------------------------------------------------------------------------
1 | /* ***** BEGIN LICENSE BLOCK *****
2 | * Version: MPL 1.1
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version
5 | * 1.1 (the "License"); you may not use this file except in compliance with
6 | * the License. You may obtain a copy of the License at
7 | * http://www.mozilla.org/MPL/
8 | *
9 | * Software distributed under the License is distributed on an "AS IS" basis,
10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 | * for the specific language governing rights and limitations under the
12 | * License.
13 | *
14 | * The Original Code is AutoProxy.
15 | *
16 | * The Initial Developer of the Original Code is
17 | * Wang Congming.
18 | * Portions created by the Initial Developer are Copyright (C) 2009
19 | * the Initial Developer. All Rights Reserved.
20 | *
21 | * Contributor(s):
22 | *
23 | * ***** END LICENSE BLOCK ***** */
24 |
25 | @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
26 | @namespace html url("http://www.w3.org/1999/xhtml");
27 |
28 | #discription {
29 | font-weight: bold;
30 | }
31 |
32 | menuseparator {
33 | margin-top: 10px;
34 | }
35 |
36 | textbox.proxyName {
37 | width: 110px;
38 | }
39 |
40 | .proxyHost {
41 | width: 120px;
42 | }
43 |
44 | .proxyPort {
45 | width: 45px;
46 | }
47 |
48 | radiogroup > .proxyHttp {
49 | margin-left: 10px;
50 | }
51 |
52 | radiogroup > .proxySocks4, radiogroup > .proxySocks5 {
53 | margin-left: 21px;
54 | }
55 |
56 | .deleBox {
57 | margin-left: 10px;
58 | }
59 |
60 | #note, #warning {
61 | color: red;
62 | }
63 |
64 | #tip {
65 | color: green;
66 | }
67 |
68 | #tip, #note, #warning {
69 | font-weight: bold;
70 | margin-top: 20px;
71 | }
72 |
73 | description {
74 | max-width: 450px;
75 | }
76 |
--------------------------------------------------------------------------------
/create_xpi.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/perl
2 |
3 | #############################################################################
4 | # This script will create an extension build. Usually, this script #
5 | # shouldn't be run directly, use make_devbuild.pl instead. #
6 | #############################################################################
7 |
8 | use strict;
9 | use warnings;
10 | use lib qw(. ..);
11 | use Packager;
12 |
13 | my $manifest = readFile("chrome.manifest");
14 | unless ($manifest =~ /\bjar:chrome\/(\S+?)\.jar\b/)
15 | {
16 | die "Could not find JAR file name in chrome.manifest";
17 | }
18 | my $baseName = $1;
19 |
20 | my %params = ();
21 |
22 | my $xpiFile = shift @ARGV || "$baseName.xpi";
23 | if (@ARGV && $ARGV[0] =~ /^\+/)
24 | {
25 | $params{devbuild} = $ARGV[0];
26 | shift @ARGV;
27 | }
28 | else
29 | {
30 | $params{postprocess_line} = \&removeTimeLine;
31 | }
32 |
33 | $params{locales} = \@ARGV if @ARGV;
34 |
35 | my $pkg = Packager->new(\%params);
36 | $pkg->readVersion('version');
37 | $pkg->readLocales('chrome/locale') unless exists $params{locales};
38 |
39 | chdir('chrome');
40 | $pkg->makeJAR("$baseName.jar", 'content', 'skin', 'locale', '-/tests', '-/mochitest', '-/.incomplete');
41 | chdir('..');
42 |
43 | my @files = grep {-e $_} ('components', 'defaults', 'install.rdf', 'chrome.manifest', 'icon.png');
44 |
45 | $pkg->makeXPI($xpiFile, "chrome/$baseName.jar", @files);
46 | unlink("chrome/$baseName.jar");
47 |
48 | sub removeTimeLine
49 | {
50 | my ($file, $line) = @_;
51 |
52 | return "\n" if $file =~ /\.js$/ && $line =~ /\btimeLine\.(\w+)\(/;
53 |
54 | return $line;
55 | }
56 |
57 | sub readFile
58 | {
59 | my $file = shift;
60 |
61 | open(local *FILE, "<", $file) || die "Could not read file '$file'";
62 | binmode(FILE);
63 | local $/;
64 | my $result = ;
65 | close(FILE);
66 |
67 | return $result;
68 | }
69 |
--------------------------------------------------------------------------------
/chrome/content/ui/sidebarDetached.xul:
--------------------------------------------------------------------------------
1 |
2 |
3 |
26 |
27 |
28 |
29 |
30 |
31 |
49 |
--------------------------------------------------------------------------------
/chrome/content/ui/prismOverlay.xul:
--------------------------------------------------------------------------------
1 |
2 |
3 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/make_babelzilla_build.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/perl
2 |
3 | #############################################################################
4 | # This script will create a special development build meant only for upload #
5 | # to Babelzilla. #
6 | #############################################################################
7 |
8 | use strict;
9 | use warnings;
10 | use lib qw(. ..);
11 | use Packager;
12 |
13 | sub Packager::fixLocales() {}
14 |
15 | my $manifest = readFile("chrome.manifest");
16 | unless ($manifest =~ /\bjar:chrome\/(\S+?)\.jar\b/)
17 | {
18 | die "Could not find JAR file name in chrome.manifest";
19 | }
20 | my $baseName = $1;
21 |
22 | my %params = ();
23 | $params{version} = shift @ARGV;
24 | die "Please specify version number on command line" unless $params{version};
25 |
26 | my $xpiFile = "$baseName-$params{version}.xpi";
27 |
28 | my $pkg = Packager->new(\%params);
29 | $pkg->readLocales('chrome/locale', 1);
30 |
31 | chdir('chrome');
32 | $pkg->makeJAR("$baseName.jar", 'content', 'skin', 'locale', '-/tests', '-/mochitest', '-/.incomplete');
33 | chdir('..');
34 |
35 | my @files = grep {-e $_} ('components', 'defaults', 'install.rdf', 'chrome.manifest', 'icon.png');
36 |
37 | my $targetAppNum = 0;
38 | $pkg->{postprocess_line} = \&postprocessInstallRDF;
39 | $pkg->makeXPI($xpiFile, "chrome/$baseName.jar", @files);
40 | unlink("chrome/$baseName.jar");
41 |
42 | sub postprocessInstallRDF
43 | {
44 | my ($file, $line) = @_;
45 |
46 | return $line unless $file eq "install.rdf";
47 |
48 | if ($line =~ /\btargetApplication\b/)
49 | {
50 | $targetAppNum++;
51 | return "" if $targetAppNum > 6;
52 | }
53 |
54 | return "" if $targetAppNum > 6 && $targetAppNum % 2 == 1;
55 |
56 | return $line;
57 | }
58 |
59 | sub readFile
60 | {
61 | my $file = shift;
62 |
63 | open(local *FILE, "<", $file) || die "Could not read file '$file'";
64 | binmode(FILE);
65 | local $/;
66 | my $result = ;
67 | close(FILE);
68 |
69 | return $result;
70 | }
71 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | AutoProxy - the firefox proxy management add-on
2 |
3 | What's New
4 | ===
5 | Version 0.2.0 released at 08, Mar, 2009.
6 | After ability of subscribe to pattern lists, we now can custom the proxy server.
7 |
8 | More details see below.
9 |
10 |
11 | Introduction
12 | ===
13 | AutoProxy ==
14 |
15 | Better FoxyProxy (Use patterns to determine which or none proxy server to be
16 | used when connecting, no need to switch proxy status manually any more.) +
17 |
18 | * Better UI -- I think so (AutoProxy is derived from Adblock Plus,
19 | if you like the interface of ABP, you may also like AutoProxy.)
20 |
21 | * More efficient -- the truth (matching algorithm has a constant time complexity,
22 | the time used for matching is almost independent from the number of patterns)
23 |
24 |
25 | Subscribe (Like Adblock Plus. Advanced users can share their patterns to the
26 | whole world/country/school..., while normal users even don't need to know
27 | what a pattern is, just subscribe to a maintained pattern list. Even if people
28 | know well about this, why should we waste our time to write so many duplicate
29 | patterns again and again?) +
30 |
31 |
32 | Built-in Proxy Server (You also don't trouble to find and run a proxy server,
33 | here is a built-in one. Immediately work after install, no configuration
34 | needed -- Of course, you can turn it off and use other proxies.)
35 |
36 |
37 |
38 |
39 | Where and How to Install
40 | ===
41 | Install is very easy, just a click. Like other normal Firefox extensions.
42 |
43 | Please move there: http://fxthunder.com/files/autoproxy.xpi
44 |
45 |
46 |
47 |
48 | Status
49 | ===
50 | AutoProxy already works well. Include:
51 |
52 | * Write your own patterns;
53 | * Subscribe to pattern lists;
54 | * Custom proxy servers;
55 | * ......
56 |
57 | But some of it's features are still under development. Include:
58 |
59 | * Built-in server;
60 | * Multi Proxies support;
61 | * ......
62 |
63 |
64 | Chen Ergan
65 |
--------------------------------------------------------------------------------
/chrome/skin/tip_subscriptions.css:
--------------------------------------------------------------------------------
1 | /* ***** BEGIN LICENSE BLOCK *****
2 | * Version: MPL 1.1
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version
5 | * 1.1 (the "License"); you may not use this file except in compliance with
6 | * the License. You may obtain a copy of the License at
7 | * http://www.mozilla.org/MPL/
8 | *
9 | * Software distributed under the License is distributed on an "AS IS" basis,
10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 | * for the specific language governing rights and limitations under the
12 | * License.
13 | *
14 | * The Original Code is Adblock Plus.
15 | *
16 | * The Initial Developer of the Original Code is
17 | * Wladimir Palant.
18 | * Portions created by the Initial Developer are Copyright (C) 2006-2008
19 | * the Initial Developer. All Rights Reserved.
20 | *
21 | * Contributor(s):
22 | *
23 | * ***** END LICENSE BLOCK ***** */
24 |
25 | @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
26 |
27 | #icon {
28 | list-style-image: url(autoproxy.png);
29 | margin: 10px;
30 | }
31 |
32 | #subscriptions {
33 | margin-top: 10px;
34 | margin-bottom: 10px;
35 | }
36 |
37 | #subscriptionsScrollbox {
38 | overflow: auto;
39 | }
40 |
41 | template+.container, .containerAdded {
42 | border-top: 1px solid black;
43 | }
44 |
45 | .container, .containerAdded {
46 | padding-top: 5px;
47 | padding-bottom: 0px;
48 | margin: 0px;
49 | }
50 |
51 | .fulllist, .location, .homepage, .moreinfo {
52 | color: #0000E0;
53 | text-decoration: underline;
54 | cursor: pointer;
55 | }
56 |
57 | radiogroup {
58 | -moz-box-align: stretch;
59 | border-bottom: 1px solid black;
60 | }
61 |
62 | radio .radio-label-box {
63 | display: none;
64 | }
65 |
66 | radio + vbox {
67 | border: 1px solid transparent;
68 | }
69 |
70 | radio[focused="true"] + vbox {
71 | border: 1px dotted ThreeDDarkShadow;
72 | }
73 |
74 | radiogroup + hbox > hbox:first-child {
75 | -moz-box-flex: 1;
76 | }
77 |
78 | #customItem {
79 | margin-left: -15px;
80 | text-align: center;
81 | }
82 |
--------------------------------------------------------------------------------
/chrome/content/ui/chooseProxyServer.xul:
--------------------------------------------------------------------------------
1 |
2 |
3 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
62 |
--------------------------------------------------------------------------------
/defaults/preferences/autoproxy.js:
--------------------------------------------------------------------------------
1 | // For description of these values see https://autoproxy.org/preferences
2 |
3 | pref("extensions.autoproxy.clearStatsOnHistoryPurge", true);
4 | pref("extensions.autoproxy.currentVersion", "0.0");
5 | pref("extensions.autoproxy.defaultstatusbaraction", 3);
6 | pref("extensions.autoproxy.defaulttoolbaraction", 3);
7 | pref("extensions.autoproxy.detachsidebar", false);
8 | pref("extensions.autoproxy.enable_key", "");
9 | pref("extensions.autoproxy.flash_scrolltoitem", true);
10 | pref("extensions.autoproxy.middleClick_global", true);
11 | pref("extensions.autoproxy.patternsbackupinterval", 24);
12 | pref("extensions.autoproxy.patternsbackups", 5);
13 | pref("extensions.autoproxy.patternsfile", "autoproxy/patterns.ini");
14 | pref("extensions.autoproxy.previewimages", true);
15 | pref("extensions.autoproxy.savestats", true);
16 | pref("extensions.autoproxy.settings_key", "Accel Alt P");
17 | pref("extensions.autoproxy.showinstatusbar", false);
18 | pref("extensions.autoproxy.showintoolbar", true);
19 | pref("extensions.autoproxy.sidebar_key", "Accel Alt V");
20 | pref("extensions.autoproxy.subscriptions_fallbackerrors", 5);
21 | pref("extensions.autoproxy.subscriptions_fallbackurl", "https://autoproxy.org/getSubscription?url=%s");
22 | pref("extensions.autoproxy.synchronizationinterval", 24);
23 |
24 | pref("extensions.autoproxy.contextmenu_key", "Accel Alt M");
25 | pref("extensions.autoproxy.customProxy", "");
26 | pref("extensions.autoproxy.default_proxy", 2);
27 | pref("extensions.autoproxy.fallbackProxy", -1);
28 | pref("extensions.autoproxy.knownProxy", "Free Gate;;8580;$GAppProxy;;8000;$GoAgent;;8087;$GPass;;8000;$JAP;;4001;$PaperBus;;3998;$Puff;;1984;$ssh -D;;7070;socks$Toonel;;8080;$Tor;;9050;socks$Wu Jie;;9666;$Your Freedom;;8080;");
29 | pref("extensions.autoproxy.modeauto_key", "Accel Alt A");
30 | pref("extensions.autoproxy.modeglobal_key", "Accel Alt G");
31 | pref("extensions.autoproxy.modedisabled_key", "Accel Alt D");
32 | pref("extensions.autoproxy.proxyMode", "auto");
33 | pref("extensions.autoproxy.report_key", "Accel Alt R");
34 |
35 | pref("extensions.autoproxy@autoproxy.org.description", "chrome://autoproxy/locale/global.properties");
36 |
--------------------------------------------------------------------------------
/chrome/locale/fr/global.properties:
--------------------------------------------------------------------------------
1 | status_auto_label=AutoProxy
2 | status_global_label=Global
3 | status_disabled_label=Désactivé
4 | blocked_count_tooltip=-- sur --
5 | no_blocking_suggestions=Aucun élément
6 | whitelisted_page=AutoProxy a été désactivé pour la page Web actuelle
7 | subscription_wrong_version=Certaines règles de cet abonnement nécessitent qu'AutoProxy -- fonctionne proprement !
8 | subscription_source=Source :
9 | subscription_status=État :
10 | subscription_status_autodownload=Mise à jour automatique
11 | subscription_status_manualdownload=Mise à jour manuelle
12 | subscription_status_lastdownload=Dernier téléchargement :
13 | subscription_status_lastdownload_inprogress=Téléchargement…
14 | subscription_status_lastdownload_unknown=N/A
15 | import_filters_title=Importer des règles
16 | export_filters_title=Exporter des règles
17 | invalid_filters_file=Ceci n'est pas un fichier de règles AutoProxy valide.
18 | filters_write_error=Il y a eu un échec d'écriture des règles dans le fichier. Assurez-vous que le fichier n'est pas protégé en écriture ni utilisé par une autre application.
19 | clearall_warning=Voulez-vous vraiment retirer toutes les règles de la liste ?
20 | filter_regexp_tooltip=Cette règle est soit une expression régulière, soit trop courte pour être optimisée. Utiliser trop de règles de ce type risque de ralentir votre navigateur.
21 | subscription_no_location=Merci d'entrer une adresse à partir de laquelle télécharger les règles.
22 | subscription_location_exists=Il y a déjà abonnement à cette liste de règles.
23 | synchronize_invalid_url=Échec, adresse non valide
24 | synchronize_connection_error=Échec, problème de téléchargement
25 | synchronize_invalid_data=Échec, liste de règles non valide
26 | synchronize_checksum_mismatch=Échec, somme de contrôle incohérente
27 | synchronize_ok=Succès
28 | new_filter_group_title=Nouvelle règle
29 | type_label_other=autre
30 | type_label_script=script
31 | type_label_image=image
32 | type_label_stylesheet=feuille de style
33 | type_label_object=objet
34 | type_label_subdocument=cadre
35 | type_label_document=document
36 | type_label_background=arrière-plan
37 | type_label_ping=ping du lien
38 | type_label_xmlhttprequest=requête XML
39 | type_label_object_subrequest=sous-requête de l'objet
40 | type_label_dtd=DTD
41 | type_label_media=audio/vidéo
42 | type_label_font=police
43 | NotFound=Phrase non trouvée
44 | WrappedToTop=Bas de la page atteint, poursuite au début
45 | WrappedToBottom=Haut de la page atteint, poursuite depuis le bas
46 |
--------------------------------------------------------------------------------
/chrome/content/ui/mailOverlay.xul:
--------------------------------------------------------------------------------
1 |
2 |
3 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
50 |
51 |
52 |
53 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/chrome.manifest:
--------------------------------------------------------------------------------
1 | content autoproxy chrome/content/
2 |
3 | overlay chrome://browser/content/browser.xul chrome://autoproxy/content/ui/firefoxOverlay.xul
4 | overlay chrome://navigator/content/navigator.xul chrome://autoproxy/content/ui/seamonkeyOverlay.xul
5 | overlay chrome://messenger/content/mailWindowOverlay.xul chrome://autoproxy/content/ui/mailOverlay.xul
6 | overlay chrome://midbrowser/content/midbrowser.xul chrome://autoproxy/content/ui/firefoxOverlay.xul
7 | overlay chrome://emusic/content/startup.xul chrome://autoproxy/content/ui/firefoxOverlay.xul
8 | overlay chrome://webrunner/content/webrunner.xul chrome://autoproxy/content/ui/prismOverlay.xul
9 | overlay chrome://browser/content/preferences/preferences.xul chrome://autoproxy/content/ui/optionsOverlay.xul
10 |
11 | skin autoproxy classic/1.0 chrome/skin/
12 | style chrome://global/content/customizeToolbar.xul chrome://autoproxy/skin/overlay.css
13 | style chrome://autoproxy/content/ui/seamonkeyOverlay.xul chrome://autoproxy/skin/seaMonkeyHack.css application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
14 | style chrome://autoproxy/content/ui/mailOverlay.xul chrome://autoproxy/skin/seaMonkeyHack.css application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
15 |
16 | locale autoproxy de chrome/locale/de/
17 | locale autoproxy en-US chrome/locale/en-US/
18 | locale autoproxy es-ES chrome/locale/es-ES/
19 | locale autoproxy fr chrome/locale/fr/
20 | locale autoproxy pt-BR chrome/locale/pt-BR/
21 | locale autoproxy sq-AL chrome/locale/sq-AL/
22 | locale autoproxy sv-SE chrome/locale/sv-SE/
23 | locale autoproxy zh-CN chrome/locale/zh-CN/
24 |
25 | component {6b6b24d0-63c3-11de-8a39-0800200c9a66} components/AutoProxy.js
26 | contract @autoproxy.org/aup/startup;1 {6b6b24d0-63c3-11de-8a39-0800200c9a66}
27 | category profile-after-change @autoproxy.org/aup/startup;1 @autoproxy.org/aup/startup;1
28 |
29 | component {7FCE727A-028D-11DE-9E0F-298E56D89593} components/AutoProxy.js
30 | contract @mozilla.org/autoproxy;1 {7FCE727A-028D-11DE-9E0F-298E56D89593}
31 | category content-policy AUPComponent @mozilla.org/autoproxy;1
32 | category net-channel-event-sinks AUPComponent @mozilla.org/autoproxy;1
33 |
34 | # Hack to prevent .Net Framework Assistant from messing up the browser
35 | override chrome://dotnetassistant/content/bootstrap.xul data:text/xml,
36 |
37 | # Hack to make icon.png available as autoproxy.png in the skin
38 | skin autoproxy_icon classic/1.0 ./
39 | override chrome://autoproxy/skin/autoproxy.png chrome://autoproxy_icon/skin/icon.png
40 |
--------------------------------------------------------------------------------
/apdiff.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Since we replaced all 'abp' string with 'aup',
4 | # it causes problems when we diff these two repositories.
5 | #
6 | # This script is used to handle such problem.
7 | #
8 | # @usage: same as `diff`
9 | # @example: $./apdiff.sh -rBb chrome/content/ ../adblockplus/chrome/content/
10 | # @output: same as `diff` but will ignore lines which diff only because abp/aup
11 | ################################################################################
12 |
13 | diff $* > temp.diff;
14 |
15 | curLineNum=1;
16 | while true
17 | do
18 | curLine=$(sed -n "$curLineNum{p;q;}" temp.diff);
19 | if [[ "$curLine" =~ ^\< ]]; then
20 | FoundNextDiff=false;
21 | ((nextDiffNum = $curLineNum + 1));
22 |
23 | while true
24 | do
25 | nextDiff=$(sed -n "$nextDiffNum{p;q;}" temp.diff);
26 | if [[ "$nextDiff" =~ ^\> ]]; then
27 | FoundNextDiff=true;
28 | nextDiff=${nextDiff/#>/<};
29 | nextDiff=${nextDiff//abp/aup};
30 | nextDiff=${nextDiff//ABP/AUP};
31 | nextDiff=${nextDiff//adblockplus/autoproxy};
32 | nextDiff=${nextDiff//AdblockPlus/AutoProxy};
33 | nextDiff=${nextDiff//Adblock Plus/AutoProxy};
34 | nextDiff=${nextDiff//Adblock/AutoProxy};
35 | nextDiff=${nextDiff//adblock/AutoProxy};
36 | if [ "$nextDiff" == "$curLine" ]; then
37 | sed -i "$nextDiffNum d" temp.diff;
38 | sed -i "$curLineNum d" temp.diff;
39 | ((curLineNum--));
40 | break;
41 | fi
42 | elif $FoundNextDiff; then
43 | break;
44 | elif [ "$nextDiff" == "" ]; then
45 | break;
46 | fi
47 | ((nextDiffNum++));
48 | done
49 |
50 | elif [ "$curLine" == "" ]; then # EOF
51 | break;
52 | fi
53 |
54 | ((curLineNum++));
55 | done
56 |
57 |
58 | # remove lines like this:
59 | # "191c191" followed by "---"
60 | #
61 | # Note:
62 | # `sed` access the newest temp.diff from disk every time,
63 | # 'while read' uses old unmodified temp.diff forever, they are independent.
64 | #
65 | curLineNum=1;
66 | while read curLine
67 | do
68 | if [[ "$curLine" =~ ^[1-9] ]]; then
69 | ((nextLineNum = $curLineNum + 1));
70 | nextLine=$(sed -n "$nextLineNum{p;q;}" temp.diff);
71 | if [[ "$nextLine" =~ ^---$ ]]; then
72 | sed -i "$nextLineNum d" temp.diff;
73 | sed -i "$curLineNum d" temp.diff;
74 | ((curLineNum -= 2));
75 | fi
76 | fi
77 | ((curLineNum++));
78 | done < temp.diff
79 |
80 | # highlight in vim looks better than `echo`
81 | vim temp.diff;
82 |
--------------------------------------------------------------------------------
/chrome/locale/sq-AL/settings.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/make_devbuild.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/perl
2 |
3 | #############################################################################
4 | # This script will create a development build of the extension. Without any #
5 | # command line arguments it will include all available locales in the #
6 | # development build, command line arguments are interpreted as a list of #
7 | # locales to be included. #
8 | # #
9 | # Creating a development build with all locales: #
10 | # #
11 | # perl make_devbuild.pl #
12 | # #
13 | # Creating a development build with en-US locale only: #
14 | # #
15 | # perl make_devbuild.pl en-US #
16 | # #
17 | # Creating a development build with English, German and Russian locales: #
18 | # #
19 | # perl make_devbuild.pl en-US de-DE ru-RU #
20 | # #
21 | #############################################################################
22 |
23 | use strict;
24 |
25 | my $manifest = readFile("chrome.manifest");
26 | unless ($manifest =~ /\bjar:chrome\/(\S+?)\.jar\b/)
27 | {
28 | die "Could not find JAR file name in chrome.manifest";
29 | }
30 | my $baseName = $1;
31 |
32 | open(VERSION, "version");
33 | my $version = ;
34 | $version =~ s/[^\w\.]//gs;
35 | close(VERSION);
36 |
37 | # Pad the version with zeroes to get version comparisons
38 | # right (1.2+ > 1.2.1 but 1.2.0+ < 1.2.1)
39 | $version .= ".0" while ($version =~ tr/././ < 2);
40 |
41 | my ($sec, $min, $hour, $day, $mon, $year) = localtime;
42 | my $build = sprintf("%04i%02i%02i%02i", $year+1900, $mon+1, $day, $hour);
43 |
44 | my $locale = (@ARGV ? "-" . join("-", @ARGV) : "");
45 | @ARGV = ("$baseName-$version+.$build$locale.xpi", "+.$build", @ARGV);
46 | do './create_xpi.pl';
47 | die $@ if $@;
48 |
49 | sub readFile
50 | {
51 | my $file = shift;
52 |
53 | open(local *FILE, "<", $file) || die "Could not read file '$file'";
54 | binmode(FILE);
55 | local $/;
56 | my $result = ;
57 | close(FILE);
58 |
59 | return $result;
60 | }
61 |
--------------------------------------------------------------------------------
/chrome/content/ui/seamonkeyOverlay.xul:
--------------------------------------------------------------------------------
1 |
2 |
3 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
52 |
53 |
54 |
55 |
58 |
59 |
60 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/chrome/locale/zh-CN/global.properties:
--------------------------------------------------------------------------------
1 | extensions.autoproxy@autoproxy.org.description=翻墙于无形,撞墙已成往事!
2 | status_auto_label=AutoProxy
3 | status_global_label=全局
4 | status_disabled_label=已禁用
5 | action0_tooltip=点击弹出快捷菜单
6 | action1_tooltip=点击打开/关闭可代理资源列表
7 | action2_tooltip=点击打开首选项
8 | action3_tooltip=点击切换代理模式
9 | action4_tooltip=点击切换默认代理
10 | action5_tooltip=点击弹出默认代理选择列表
11 | auto_tooltip=自动模式,根据代理规则,自动判断是否使用代理。
12 | disabled_tooltip=禁用模式,禁止使用代理。
13 | global_tooltip=全局模式,所有访问都将通过代理。
14 | blocked_count_tooltip=-- 项,共 -- 项
15 | no_blocking_suggestions=当前页面没有可代理资源
16 | whitelisted_page=AutoProxy 在当前页面被禁用了。
17 | customRuleGroup_description=自定义
18 | subscription_description=订阅
19 | subscription_wrong_version=该订阅里面有些规则需要 AutoProxy -- 才能工作!
20 | subscription_source=源:
21 | subscription_status=状态:
22 | subscription_status_autodownload=自动更新
23 | subscription_status_manualdownload=手动更新
24 | subscription_status_externaldownload=外部更新 (其它的扩展)
25 | subscription_status_lastdownload=最后下载:
26 | subscription_status_lastdownload_inprogress=下载中...
27 | subscription_status_lastdownload_unknown=N/A
28 | remove_subscription_warning=您真的要删除这个订阅吗?
29 | remove_userRuleGroup_warning=您真的要删除这整组的自定义规则吗?
30 | import_filters_wrong_version=警告:该列表中的一些规则需要 AutoProxy -- 才能正常工作。在导入这个列表前,您应该先升级到最新的 AutoProxy。
31 | import_filters_warning=您希望替换当前的规则,还是将新的规则附加到该列表的末尾?
32 | import_filters_title=导入规则
33 | export_filters_title=导出规则
34 | invalid_filters_file=不是一个有效的 AutoProxy 规则文件.
35 | filters_write_error=将规则写入文件时出现错误。请检查该文件是否有写保护,或者被其它程序占用。
36 | clearall_warning=您真的想要移除该列表中的所有规则?
37 | resethitcounts_warning=您真的希望将所有规则的计数归零么?该操作不能撤销!
38 | resethitcounts_selected_warning=您真的希望将所选规则的计数清零么?该操作不能撤销!
39 | filter_regexp_tooltip=这条规则是正则表达式,或者是太短了,不能被优化。太多这样的规则可能会降低您的浏览速度。
40 | subscription_no_location=请输入下载规则列表的地址。
41 | subscription_invalid_location=规则列表不是一个有效的URL或文件名。
42 | subscription_location_exists=您已经订阅了这个规则列表。
43 | synchronize_invalid_url=失败,不是一个有效的地址
44 | synchronize_connection_error=失败,下载错误
45 | synchronize_invalid_data=失败,不是一个有效的规则列表
46 | synchronize_checksum_mismatch=失败,校验和不匹配
47 | synchronize_ok=成功
48 | overwrite=覆盖
49 | append=附加
50 | new_filter_group_title=新建代理规则
51 | type_label_other=其它
52 | type_label_script=脚本
53 | type_label_image=图片
54 | type_label_stylesheet=样式表
55 | type_label_object=对象
56 | type_label_subdocument=帧
57 | type_label_document=文档
58 | type_label_background=背景
59 | type_label_xbl=XBL 绑定
60 | type_label_ping=link ping
61 | type_label_xmlhttprequest=XML request
62 | type_label_object_subrequest=对象子请求
63 | type_label_dtd=DTD
64 | type_label_media=音频/视频
65 | type_label_font=font
66 | NotFound=未找到短语
67 | WrappedToTop=到达页尾,从页首继续
68 | WrappedToBottom=到底页首,从页尾继续
69 | unnamed=未命名
70 | default_proxy=默认代理
71 | no_proxy=不使用代理
72 | not_matching=规则不匹配时
73 | no_proxy_rule=没有代理规则
74 | directConnect=直接连接
75 | enableProxyOnSite=对 -- 全站启用代理
76 | enableProxyOnUrl=对含 -- 的网址启用代理
77 | disableProxyOnSite=禁用代理:-- 全站
78 | disableProxyOnUrl=禁用代理:含 -- 的网址
79 |
--------------------------------------------------------------------------------
/chrome/content/ui/subscription.xul:
--------------------------------------------------------------------------------
1 |
2 |
3 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
75 |
--------------------------------------------------------------------------------
/chrome/content/ui/editProxyServer.xul:
--------------------------------------------------------------------------------
1 |
2 |
3 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
81 |
--------------------------------------------------------------------------------
/chrome/content/ui/findbar.js:
--------------------------------------------------------------------------------
1 | /* ***** BEGIN LICENSE BLOCK *****
2 | * Version: MPL 1.1
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version
5 | * 1.1 (the "License"); you may not use this file except in compliance with
6 | * the License. You may obtain a copy of the License at
7 | * http://www.mozilla.org/MPL/
8 | *
9 | * Software distributed under the License is distributed on an "AS IS" basis,
10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 | * for the specific language governing rights and limitations under the
12 | * License.
13 | *
14 | * The Original Code is Adblock Plus.
15 | *
16 | * The Initial Developer of the Original Code is
17 | * Wladimir Palant.
18 | * Portions created by the Initial Developer are Copyright (C) 2006-2009
19 | * the Initial Developer. All Rights Reserved.
20 | *
21 | * Contributor(s):
22 | *
23 | * ***** END LICENSE BLOCK ***** */
24 |
25 | /**
26 | * Fake browser implementation to make findbar widget happy - searches in
27 | * the filter list.
28 | */
29 | let fastFindBrowser =
30 | {
31 | fastFind: {
32 | searchString: null,
33 | foundLink: null,
34 | foundEditable: null,
35 | caseSensitive: false,
36 | get currentWindow() { return fastFindBrowser.contentWindow; },
37 |
38 | find: function(searchString, linksOnly)
39 | {
40 | this.searchString = searchString;
41 | return treeView.find(this.searchString, 0, false, this.caseSensitive);
42 | },
43 |
44 | findAgain: function(findBackwards, linksOnly)
45 | {
46 | return treeView.find(this.searchString, findBackwards ? -1 : 1, false, this.caseSensitive);
47 | },
48 |
49 | // Irrelevant for us
50 | init: function() {},
51 | setDocShell: function() {},
52 | setSelectionModeAndRepaint: function() {},
53 | collapseSelection: function() {},
54 | // compatibility with Nightly 26+
55 | addResultListener: function() {},
56 | removeResultListener: function() {},
57 | highlight: function() {},
58 | focusContent: function () {},
59 | enableSelection : function() {},
60 | removeSelection: function () {}
61 | },
62 | currentURI: aup.makeURL("http://example.com/"),
63 | contentWindow: {
64 | focus: function()
65 | {
66 | E("list").focus();
67 | },
68 | scrollByLines: function(num)
69 | {
70 | E("list").boxObject.scrollByLines(num);
71 | },
72 | scrollByPages: function(num)
73 | {
74 | E("list").boxObject.scrollByPages(num);
75 | }
76 | },
77 |
78 | addEventListener: function(event, handler, capture)
79 | {
80 | E("list").addEventListener(event, handler, capture);
81 | },
82 | removeEventListener: function(event, handler, capture)
83 | {
84 | E("list").addEventListener(event, handler, capture);
85 | },
86 | }
87 |
88 | // compatibility with Nightly 26+
89 | fastFindBrowser.finder = fastFindBrowser.fastFind;
90 | fastFindBrowser.finder.fastFind = fastFindBrowser.fastFind.find;
--------------------------------------------------------------------------------
/chrome/content/errors.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | AutoProxy Errors
4 |
27 |
28 |
29 |
30 |
31 |
32 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/chrome/skin/sidebar.css:
--------------------------------------------------------------------------------
1 | /* ***** BEGIN LICENSE BLOCK *****
2 | * Version: MPL 1.1
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version
5 | * 1.1 (the "License"); you may not use this file except in compliance with
6 | * the License. You may obtain a copy of the License at
7 | * http://www.mozilla.org/MPL/
8 | *
9 | * Software distributed under the License is distributed on an "AS IS" basis,
10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 | * for the specific language governing rights and limitations under the
12 | * License.
13 | *
14 | * The Original Code is Adblock Plus.
15 | *
16 | * The Initial Developer of the Original Code is
17 | * Wladimir Palant.
18 | * Portions created by the Initial Developer are Copyright (C) 2006-2008
19 | * the Initial Developer. All Rights Reserved.
20 | *
21 | * Contributor(s):
22 | *
23 | * ***** END LICENSE BLOCK ***** */
24 |
25 | @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
26 |
27 | #suggestionsList {
28 | margin: 0px;
29 | }
30 |
31 | #detachButton, #reattachButton:not([disabled="true"]) {
32 | text-decoration: underline;
33 | cursor: pointer;
34 | }
35 |
36 | #reattachButton[disabled="true"] {
37 | color: GrayText;
38 | }
39 |
40 | #detachButton, #reattachButton {
41 | font-size: 90%;
42 | }
43 |
44 | tooltip {
45 | max-width: none;
46 | }
47 |
48 | #tooltipPreview {
49 | margin:10px;
50 | max-width: 300px;
51 | max-height: 300px;
52 | }
53 |
54 | #tooltip label {
55 | font-weight: bold;
56 | }
57 |
58 | #contextBlock,
59 | #contextWhitelist {
60 | font-weight: bold;
61 | }
62 |
63 | #state {
64 | min-width: 16px;
65 | }
66 |
67 | #size {
68 | text-align: right;
69 | }
70 |
71 | treechildren::-moz-tree-cell-text(state-filtered, selected-false),
72 | treechildren::-moz-tree-cell-text(state-hidden, selected-false) {
73 | color: #008000;
74 | }
75 | treechildren::-moz-tree-cell-text(state-whitelisted, selected-false) {
76 | color: #C00000;
77 | }
78 |
79 | treechildren::-moz-tree-image(col-state, dummy-false)
80 | {
81 | list-style-image: url(item-state.png);
82 | -moz-image-region: rect(0px 10px 10px 0px);
83 | margin-left: 3px;
84 | }
85 | treechildren::-moz-tree-image(col-state, filter-disabled-true, dummy-false) {
86 | -moz-image-region: rect(10px 10px 20px 0px);
87 | }
88 | treechildren::-moz-tree-image(col-state, state-filtered, dummy-false),
89 | treechildren::-moz-tree-image(col-state, state-hidden, dummy-false) {
90 | -moz-image-region: rect(30px 10px 40px 0px);
91 | }
92 | treechildren::-moz-tree-image(col-state, state-whitelisted, dummy-false) {
93 | -moz-image-region: rect(20px 10px 30px 0px);
94 | }
95 |
96 | treechildren::-moz-tree-cell-text(col-filter, state-hidden, selected-false) {
97 | color: #000080;
98 | }
99 | treechildren::-moz-tree-cell-text(col-filter, filter-disabled-true, selected-false) {
100 | color: #C0C0C0;
101 | }
102 |
--------------------------------------------------------------------------------
/chrome/content/ui/firefoxOverlay.xul:
--------------------------------------------------------------------------------
1 |
2 |
3 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
64 |
65 |
66 |
67 |
70 |
71 |
72 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/chrome/content/ui/flasher.js:
--------------------------------------------------------------------------------
1 | /* ***** BEGIN LICENSE BLOCK *****
2 | * Version: MPL 1.1
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version
5 | * 1.1 (the "License"); you may not use this file except in compliance with
6 | * the License. You may obtain a copy of the License at
7 | * http://www.mozilla.org/MPL/
8 | *
9 | * Software distributed under the License is distributed on an "AS IS" basis,
10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 | * for the specific language governing rights and limitations under the
12 | * License.
13 | *
14 | * The Original Code is Adblock Plus.
15 | *
16 | * The Initial Developer of the Original Code is
17 | * Wladimir Palant.
18 | * Portions created by the Initial Developer are Copyright (C) 2006-2009
19 | * the Initial Developer. All Rights Reserved.
20 | *
21 | * Contributor(s):
22 | *
23 | * ***** END LICENSE BLOCK ***** */
24 |
25 | /**
26 | * Draws a blinking border for a list of matching nodes.
27 | */
28 |
29 | var flasher = {
30 | nodes: null,
31 | count: 0,
32 | timer: null,
33 |
34 | flash: function(nodes) {
35 | this.stop();
36 | if (!nodes || !nodes.length)
37 | return;
38 |
39 | if (prefs.flash_scrolltoitem && ("document" in nodes[0] || nodes[0].ownerDocument)) {
40 | // Ensure that at least one node is visible when flashing
41 | var wnd = ("document" in nodes[0] ? nodes[0] : nodes[0].ownerDocument.defaultView);
42 | try {
43 | var viewer = wnd.QueryInterface(Ci.nsIInterfaceRequestor)
44 | .getInterface(Ci.nsIWebNavigation)
45 | .QueryInterface(Ci.nsIDocShellTreeItem)
46 | .rootTreeItem
47 | .QueryInterface(Ci.nsIInterfaceRequestor)
48 | .getInterface(Ci.nsIDOMWindow)
49 | .document.getElementById("aup-hooks")
50 | .wrappedJSObject
51 | .getBrowser()
52 | .markupDocumentViewer;
53 | viewer.scrollToNode(nodes[0]);
54 | } catch(e) {}
55 | }
56 |
57 | this.nodes = nodes;
58 | this.count = 0;
59 |
60 | this.doFlash();
61 | },
62 |
63 | doFlash: function() {
64 | if (this.count >= 12) {
65 | this.stop();
66 | return;
67 | }
68 |
69 | if (this.count % 2)
70 | this.switchOff();
71 | else
72 | this.switchOn();
73 |
74 | this.count++;
75 |
76 | this.timer = window.setTimeout(function() {flasher.doFlash()}, 300);
77 | },
78 |
79 | stop: function() {
80 | if (this.timer) {
81 | window.clearTimeout(this.timer);
82 | this.timer = null;
83 | }
84 |
85 | if (this.nodes) {
86 | this.switchOff();
87 | this.nodes = null;
88 | }
89 | },
90 |
91 | setOutline: function(value) {
92 | for (var i = 0; i < this.nodes.length; i++)
93 | if ("style" in this.nodes[i])
94 | this.nodes[i].style.outline = value;
95 | },
96 |
97 | switchOn: function() {
98 | this.setOutline("#CC0000 dotted 2px");
99 | },
100 |
101 | switchOff: function() {
102 | this.setOutline("none");
103 | }
104 | };
105 |
--------------------------------------------------------------------------------
/chrome/skin/overlay.css:
--------------------------------------------------------------------------------
1 | /* ***** BEGIN LICENSE BLOCK *****
2 | * Version: MPL 1.1
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version
5 | * 1.1 (the "License"); you may not use this file except in compliance with
6 | * the License. You may obtain a copy of the License at
7 | * http://www.mozilla.org/MPL/
8 | *
9 | * Software distributed under the License is distributed on an "AS IS" basis,
10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 | * for the specific language governing rights and limitations under the
12 | * License.
13 | *
14 | * The Original Code is Adblock Plus.
15 | *
16 | * The Initial Developer of the Original Code is
17 | * Wladimir Palant.
18 | * Portions created by the Initial Developer are Copyright (C) 2006-2008
19 | * the Initial Developer. All Rights Reserved.
20 | *
21 | * Contributor(s):
22 | *
23 | * ***** END LICENSE BLOCK ***** */
24 |
25 | @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
26 |
27 | #aup-status *
28 | {
29 | cursor: pointer;
30 | }
31 | #aup-status:hover
32 | {
33 | text-decoration: underline;
34 | }
35 | #aup-status[proxyMode="disabled"]
36 | {
37 | color: #999999;
38 | }
39 | #aup-status[proxyMode="global"]
40 | {
41 | color: #008000;
42 | }
43 | #aup-status label {
44 | display: none;
45 | }
46 |
47 | toolbar[iconsize="small"] #aup-toolbarbutton,
48 | #PersonalToolbar #aup-toolbarbutton,
49 | #aup-status image {
50 | list-style-image: url("aup-status-16.png");
51 | -moz-image-region: rect(0px, 16px, 16px, 0px);
52 | }
53 | toolbar[iconsize="small"] #aup-toolbarbutton[proxyMode="disabled"],
54 | #PersonalToolbar #aup-toolbarbutton[proxyMode="disabled"],
55 | #aup-status[proxyMode="disabled"] image {
56 | -moz-image-region: rect(16px, 16px, 32px, 0px);
57 | }
58 | toolbar[iconsize="small"] #aup-toolbarbutton[proxyMode="global"],
59 | #PersonalToolbar #aup-toolbarbutton[proxyMode="global"],
60 | #aup-status[proxyMode="global"] image {
61 | -moz-image-region: rect(32px, 16px, 48px, 0px);
62 | }
63 |
64 | #aup-toolbar-popup {
65 | list-style-image: none;
66 | -moz-image-region: rect(0px, 0px, 0px, 0px);
67 | }
68 |
69 | toolbox[vertical="true"] toolbar #aup-toolbarbutton dropmarker {
70 | display: none !important;
71 | }
72 |
73 | menuitem[default="true"] {
74 | font-weight: bold;
75 | }
76 |
77 | #aup-toolbarbutton {
78 | list-style-image: url("aup-status.png");
79 | -moz-image-region: rect(0px, 24px, 24px, 0px);
80 | width: auto;
81 | }
82 | #aup-toolbarbutton[proxyMode="disabled"] {
83 | -moz-image-region: rect(24px, 24px, 48px, 0px);
84 | }
85 | #aup-toolbarbutton[proxyMode="global"] {
86 | -moz-image-region: rect(48px, 24px, 72px, 0px);
87 | }
88 |
89 | #aup-tooltip {
90 | max-width: none;
91 | }
92 |
93 | #aup-tooltip label {
94 | font-weight: bold;
95 | margin-bottom: 0px;
96 | }
97 |
98 | #aup-tooltip description:not([hidden="true"])+label {
99 | margin-top: 10px;
100 | }
101 |
102 | #aup-sidebar-title {
103 | padding-left: 4px;
104 | }
105 |
106 | #aup-sidebar-toolbar {
107 | display: -moz-box !important;
108 | visibility: visible !important;
109 | }
110 |
111 | #aup-sidebar-close {
112 | padding: 4px 2px;
113 | border-style: none !important;
114 | -moz-user-focus: normal;
115 | list-style-image: url("close.png");
116 | -moz-appearance: none;
117 | -moz-image-region: rect(0px, 14px, 14px, 0px);
118 | }
119 |
120 | #aup-sidebar-close:hover {
121 | -moz-image-region: rect(0px, 28px, 14px, 14px);
122 | }
123 |
124 | #aup-sidebar-close:hover:active {
125 | -moz-image-region: rect(0px, 42px, 14px, 28px);
126 | }
127 |
--------------------------------------------------------------------------------
/chrome/locale/fr/settings.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/chrome/content/ui/about.xul:
--------------------------------------------------------------------------------
1 |
2 |
3 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
92 |
--------------------------------------------------------------------------------
/chrome/locale/es-ES/global.properties:
--------------------------------------------------------------------------------
1 | extensions.autoproxy@autoproxy.org.description=La gestión de proxies hecha fácil.
2 | status_auto_label=AutoProxy
3 | status_global_label=Global
4 | status_disabled_label=Desactivado
5 | blocked_count_tooltip=-- fuera de --
6 | no_blocking_suggestions=No hay elementos a pasar por proxy en la página actual
7 | whitelisted_page=AutoProxy se ha desactivado para la página actual
8 | subscription_description=Suscripción
9 | subscription_wrong_version=Algunas de las reglas en esta subscripción requieren de AutoProxy -- para funcionar correctamente!
10 | subscription_source=Fuente:
11 | subscription_status=Estado:
12 | subscription_status_autodownload=Actualizado automáticamente
13 | subscription_status_manualdownload=Actualizado manualmente
14 | subscription_status_externaldownload=Actualizado externamente (otra extensión)
15 | subscription_status_lastdownload=Última descarga:
16 | subscription_status_lastdownload_inprogress=Descargando...
17 | subscription_status_lastdownload_unknown=N/A
18 | remove_subscription_warning=¿Realmente quieres eliminar esta subscripción?
19 | remove_userRuleGroup_warning=¿Realmente quiere eliminar las reglas personalizadas dentro de este grupo?
20 | import_filters_wrong_version=Aviso: algunas de las reglas de esta lista requieren de AutoProxy -- para funcionar correctamente. Probablemente deberías actualizar a la última versión de AutoProxy antes de importar esta lista.
21 | import_filters_warning=¿Deseas reemplazar tus reglas actuales o añadir las nuevas reglas al final de la lista?
22 | import_filters_title=Importar reglas
23 | export_filters_title=Exportar reglas
24 | invalid_filters_file=No es un fichero de reglas de AutoProxy válido.
25 | filters_write_error=Hubo un error guardando las reglas al fichero. Asegúrate de que el archivo no está protegido contra escritura o en uso por otro programa.
26 | clearall_warning=¿Realmente quieres eliminar todas las reglas de la lista?
27 | resethitcounts_warning=¿Realmente quieres poner a cero los contadores para todas las reglas? Esta operación no podrá deshacerse!
28 | resethitcounts_selected_warning=¿Realmente quieres poner a cero los contadores para las reglas seleccionadas? Esta operación no podrá deshacerse!
29 | filter_regexp_tooltip=La regla es una expresión regular o es demasiado corta para optimizarse. Utilizar demasiadas de estas reglas podría ralentizar tu navegación.
30 | subscription_no_location=Por favor, introduce una ubicación desde la que descargar reglas.
31 | subscription_invalid_location=La ubicación de la lista de reglas no es una URL válida o bien no es un fichero válido.
32 | subscription_location_exists=Ya estás actualmente suscrito a esta lista de reglas.
33 | synchronize_invalid_url=Error, no es una dirección válida
34 | synchronize_connection_error=Error, fallo en la descarga
35 | synchronize_invalid_data=Error, no es una lista de reglas válida
36 | synchronize_checksum_mismatch=Error, falló la suma de verificación
37 | synchronize_ok=Proceso correcto
38 | overwrite=Sobreescribir
39 | append=Añadir
40 | new_filter_group_title=Nueva regla
41 | type_label_other=otro
42 | type_label_script=script (guión)
43 | type_label_image=imagen
44 | type_label_stylesheet=hoja de estilos
45 | type_label_object=objeto
46 | type_label_subdocument=marco
47 | type_label_document=documento
48 | type_label_background=fondo
49 | type_label_xbl=vinculación XBL
50 | type_label_ping=ping a enlace
51 | type_label_xmlhttprequest=petición XML
52 | type_label_object_subrequest=subpetición de objeto
53 | type_label_dtd=DTD
54 | type_label_media=audio/vídeo
55 | type_label_font=fuente
56 | NotFound=Frase no encontrada
57 | WrappedToTop=Fin de página alcanzado, se continúa desde el principio
58 | WrappedToBottom=Principio de página alcanzado, se continúa desde el final
59 | unnamed=Sin nombre
60 | directConnect=Conexión directa
61 | enableProxyOnSite=Activar proxy en el sitio:--
62 | enableProxyOnUrl=Activar proxy en la URL:--
63 | disableProxyOnSite=Desactivar proxy en el sitio:--
64 | disableProxyOnUrl=Desactivar proxy en la URL:--
65 |
--------------------------------------------------------------------------------
/chrome/locale/zh-CN/settings.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/install.rdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 | autoproxy@autoproxy.org
9 | 0.4b2
10 | 2
11 |
12 |
14 |
15 |
16 |
17 |
18 | {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
19 | 3.0.9
20 | 26.0a1
21 |
22 |
23 |
24 |
25 |
26 |
27 | {92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
28 | 2.0b1pre
29 | 2.2a1pre
30 |
31 |
32 |
33 |
34 |
35 |
36 | {3550f703-e582-4d05-9a08-453d09bdfdc6}
37 | 3.0b3pre
38 | 3.3a4pre
39 |
40 |
41 |
42 |
43 |
44 |
45 | songbird@songbirdnest.com
46 | 1.2.0
47 | 1.9.*
48 |
49 |
50 |
51 |
52 |
53 |
54 | {aa5ca914-c309-495d-91cf-3141bbb04115}
55 | 0.2
56 | 0.3
57 |
58 |
59 |
60 |
61 |
71 |
72 |
73 |
74 |
75 | {a79fe89b-6662-4ff4-8e88-09950ad4dfde}
76 |
77 | 0.1
78 | 100.0
79 |
80 |
81 |
82 |
83 |
84 |
85 | prism@developer.mozilla.org
86 | 1.0b1
87 | 1.0.*
88 |
89 |
90 |
91 |
92 | AutoProxy
93 | GFW was yesterday!
94 | WCM
95 | https://autoproxy.org/
96 |
97 |
98 | chrome://autoproxy/skin/autoproxy.png
99 | chrome://autoproxy/content/ui/about.xul
100 | chrome://autoproxy/content/ui/settings.xul
101 |
102 |
109 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/chrome/locale/es-ES/settings.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/chrome/skin/settings.css:
--------------------------------------------------------------------------------
1 | /* ***** BEGIN LICENSE BLOCK *****
2 | * Version: MPL 1.1
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version
5 | * 1.1 (the "License"); you may not use this file except in compliance with
6 | * the License. You may obtain a copy of the License at
7 | * http://www.mozilla.org/MPL/
8 | *
9 | * Software distributed under the License is distributed on an "AS IS" basis,
10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 | * for the specific language governing rights and limitations under the
12 | * License.
13 | *
14 | * The Original Code is Adblock Plus.
15 | *
16 | * The Initial Developer of the Original Code is
17 | * Wladimir Palant.
18 | * Portions created by the Initial Developer are Copyright (C) 2006-2008
19 | * the Initial Developer. All Rights Reserved.
20 | *
21 | * Contributor(s):
22 | *
23 | * ***** END LICENSE BLOCK ***** */
24 |
25 | @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
26 | @namespace html url("http://www.w3.org/1999/xhtml");
27 |
28 | dialog {
29 | padding: 0px;
30 | }
31 |
32 | .dialog-button-box, #introduction, #listarea {
33 | margin: 8px;
34 | }
35 |
36 | deck, deck * {
37 | margin: 0px;
38 | }
39 |
40 | #listEditor menupopup description {
41 | margin: 1px 3px;
42 | }
43 |
44 | #listEditorIcon {
45 | list-style-image: url("close.png");
46 | -moz-image-region: rect(0px, 14px, 14px, 0px);
47 | margin-left: 2px;
48 | }
49 | #listEditorIcon:hover {
50 | -moz-image-region: rect(0px, 28px, 14px, 14px);
51 | }
52 | #listEditorIcon:hover:active {
53 | -moz-image-region: rect(0px, 42px, 14px, 28px);
54 | }
55 |
56 | #col-slow {
57 | text-align: center;
58 | }
59 |
60 | #col-hitcount, #col-lasthit {
61 | text-align: right;
62 | }
63 |
64 | #col-hitcount {
65 | min-width: 60px;
66 | }
67 | #col-enabled, #col-slow {
68 | min-width: 16px;
69 | }
70 |
71 | treechildren::-moz-tree-cell-text(col-filter, description-true, selected-false) {
72 | font-size: 80%;
73 | color: #808080;
74 | }
75 |
76 | treechildren::-moz-tree-cell-text(col-filter, filter-true, type-whitelist, selected-false) {
77 | color: #C00000;
78 | }
79 |
80 | treechildren::-moz-tree-cell-text(col-filter, filter-false, subscription-upgradeRequired-true, selected-false) {
81 | color: #FF0000;
82 | }
83 |
84 | treechildren::-moz-tree-cell-text(col-slow) {
85 | color: #C00000;
86 | font-weight: bold;
87 | font-size: 120%;
88 | }
89 |
90 | treechildren::-moz-tree-row(filter-true, filter-disabled-true, selected-false),
91 | treechildren::-moz-tree-row(subscription-disabled-true, selected-false) {
92 | background-color: #E0E0E0;
93 | }
94 |
95 | treechildren::-moz-tree-cell-text(col-filter, filter-true, type-comment, selected-false) {
96 | color: #808080;
97 | }
98 |
99 | treechildren::-moz-tree-cell-text(col-filter, filter-true, type-invalid, selected-false) {
100 | color: #C00000;
101 | }
102 |
103 | treechildren::-moz-tree-cell-text(col-filter, subscription-true) {
104 | font-weight: bold;
105 | }
106 |
107 | treechildren::-moz-tree-image(col-enabled, filter-true, subscription-disabled-false, filter-disabled-true),
108 | treechildren::-moz-tree-image(col-enabled, subscription-true, subscription-disabled-true) {
109 | list-style-image: url(checkbox.png);
110 | -moz-image-region: rect(13px 13px 26px 0px);
111 | }
112 |
113 | treechildren::-moz-tree-image(col-enabled, filter-true, subscription-disabled-false, filter-disabled-false),
114 | treechildren::-moz-tree-image(col-enabled, subscription-true, subscription-disabled-false, subscription-dummy-false) {
115 | list-style-image: url(checkbox.png);
116 | -moz-image-region: rect(0px 13px 13px 0px);
117 | }
118 |
119 | treechildren::-moz-tree-image(col-enabled) {
120 | margin-left: 7px;
121 | }
122 | #col-enabled {
123 | min-width: 24px;
124 | }
125 |
126 | .whitelisted:not([_moz-menuactive="true"]) {
127 | color: #008000;
128 | }
129 |
130 | .filtered:not([_moz-menuactive="true"]) {
131 | color: #C00000;
132 | }
133 |
134 | #findbar {
135 | border: none !important;
136 | }
137 |
138 | #findbar .findbar-highlight {
139 | display: none;
140 | }
141 |
142 | tooltip {
143 | max-width: none;
144 | }
145 |
--------------------------------------------------------------------------------
/chrome/content/ui/tip_subscriptions.xul:
--------------------------------------------------------------------------------
1 |
2 |
3 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
101 |
--------------------------------------------------------------------------------
/chrome/content/ui/subscription.js:
--------------------------------------------------------------------------------
1 | /* ***** BEGIN LICENSE BLOCK *****
2 | * Version: MPL 1.1
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version
5 | * 1.1 (the "License"); you may not use this file except in compliance with
6 | * the License. You may obtain a copy of the License at
7 | * http://www.mozilla.org/MPL/
8 | *
9 | * Software distributed under the License is distributed on an "AS IS" basis,
10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 | * for the specific language governing rights and limitations under the
12 | * License.
13 | *
14 | * The Original Code is Adblock Plus.
15 | *
16 | * The Initial Developer of the Original Code is
17 | * Wladimir Palant.
18 | * Portions created by the Initial Developer are Copyright (C) 2006-2009
19 | * the Initial Developer. All Rights Reserved.
20 | *
21 | * Contributor(s):
22 | *
23 | * ***** END LICENSE BLOCK ***** */
24 |
25 | var subscription = null;
26 | var result = null;
27 | var autoAdd = false;
28 |
29 | function init() {
30 | if (window.arguments)
31 | {
32 | // In K-Meleon we might get the arguments wrapped
33 | for (var i = 0; i < window.arguments.length; i++)
34 | if (window.arguments[i] && "wrappedJSObject" in window.arguments[i])
35 | window.arguments[i] = window.arguments[i].wrappedJSObject;
36 |
37 | [subscription, result] = window.arguments;
38 | }
39 |
40 | autoAdd = !result;
41 | if (!result)
42 | result = {};
43 |
44 | if (subscription)
45 | {
46 | document.getElementById("location").value = subscription.url;
47 | document.getElementById("title").value = subscription.title;
48 | }
49 | else
50 | document.getElementById("title").value = "";
51 |
52 | if (subscription instanceof aup.Subscription)
53 | {
54 | document.getElementById("enabled").setAttribute("checked", !subscription.disabled);
55 | if (subscription instanceof aup.ExternalSubscription)
56 | {
57 | document.getElementById("location").setAttribute("disabled", "true");
58 | document.getElementById("external-description").hidden = false;
59 | document.getElementById("autodownload").setAttribute("checked", "true");
60 | document.getElementById("autodownload").setAttribute("disabled", "true");
61 | }
62 | else
63 | {
64 | document.getElementById("edit-description").hidden = false;
65 | document.getElementById("autodownload").setAttribute("checked", subscription.autoDownload);
66 | }
67 | }
68 | else
69 | {
70 | document.title = document.documentElement.getAttribute("newtitle");
71 | document.getElementById("new-description").hidden = false;
72 | document.getElementById("enabled").setAttribute("checked", "true");
73 | document.getElementById("autodownload").setAttribute("checked", "true");
74 | }
75 | }
76 |
77 | function saveSubscription()
78 | {
79 | var add = !(subscription instanceof aup.Subscription);
80 | var url = (add || subscription instanceof aup.DownloadableSubscription ? document.getElementById("location").value.replace(/^\s+/, "").replace(/\s+$/, "").replace(/^~+/, "") : subscription.url);
81 | if (!url)
82 | {
83 | alert(aup.getString("subscription_no_location"));
84 | document.getElementById("location").focus();
85 | return false;
86 | }
87 |
88 | if (add || subscription.url != url)
89 | {
90 | var file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
91 | try {
92 | file.initWithPath(url);
93 | var ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
94 | url = ioService.newFileURI(file).spec;
95 | } catch (e2) {
96 | try {
97 | var uri = Cc["@mozilla.org/network/simple-uri;1"].createInstance(Ci.nsIURI);
98 | uri.spec = url;
99 | url = uri.spec;
100 | } catch (e) {
101 | alert(aup.getString("subscription_invalid_location"));
102 | document.getElementById("location").focus();
103 | return false;
104 | }
105 | }
106 | }
107 |
108 | result.url = url;
109 | result.title = document.getElementById("title").value.replace(/^\s+/, "").replace(/\s+$/, "");
110 | if (!result.title)
111 | result.title = result.url;
112 |
113 | result.autoDownload = document.getElementById("autodownload").checked;
114 | result.disabled = !document.getElementById("enabled").checked;
115 |
116 | if (autoAdd)
117 | aup.addSubscription(result.url, result.title, result.autoDownload, result.disabled);
118 |
119 | return true;
120 | }
121 |
--------------------------------------------------------------------------------
/chrome/content/ui/chooseProxyServer.js:
--------------------------------------------------------------------------------
1 | /* ***** BEGIN LICENSE BLOCK *****
2 | * Version: MPL 1.1
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version
5 | * 1.1 (the "License"); you may not use this file except in compliance with
6 | * the License. You may obtain a copy of the License at
7 | * http://www.mozilla.org/MPL/
8 | *
9 | * Software distributed under the License is distributed on an "AS IS" basis,
10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 | * for the specific language governing rights and limitations under the
12 | * License.
13 | *
14 | * The Original Code is AutoProxy.
15 | *
16 | * The Initial Developer of the Original Code is
17 | * Wang Congming .
18 | *
19 | * Portions created by the Initial Developer are Copyright (C) 2009-2011
20 | * the Initial Developer. All Rights Reserved.
21 | *
22 | * Contributor(s):
23 | *
24 | * ***** END LICENSE BLOCK ***** */
25 |
26 | function init()
27 | {
28 | var rows = document.getElementsByTagName('rows')[0];
29 |
30 | // menu list for setting default proxy
31 | E('defaultProxy').firstChild.value = aup.getString('default_proxy');
32 | menu.newList(E('defaultProxy'), prefs.defaultProxy, true);
33 |
34 | // one row per rule group
35 | for each (let subscription in filterStorage.subscriptions) {
36 | var group = cE("row"),
37 | groupType = cE("label"),
38 | groupTitle = cE("textbox");
39 | rows.insertBefore(group, E('groupSeparator'));
40 |
41 | group.appendChild(groupType);
42 | group.appendChild(groupTitle);
43 | groupType.setAttribute("value", subscription.typeDesc);
44 | groupTitle.setAttribute("value", subscription.title || aup.getString("unnamed"));
45 |
46 | menu.newList(group, subscription.proxy + 1);
47 | }
48 |
49 | // if user has no rule group, insert a note
50 | if (E('groupSeparator').previousSibling.tagName == 'menuseparator') {
51 | var note = cE('label');
52 | note.setAttribute('disabled', true);
53 | note.setAttribute('value', aup.getString('no_proxy_rule'));
54 | E('groupSeparator').parentNode.insertBefore(note, E('groupSeparator'));
55 | }
56 |
57 | // row for setting fallback proxy
58 | E('fallbackProxy').firstChild.value = aup.getString('not_matching');
59 | menu.newList(E('fallbackProxy'),
60 | (prefs.fallbackProxy + proxy.server.length + 1) % (proxy.server.length + 1), "fallbackProxy");
61 | }
62 |
63 | var menu =
64 | {
65 | menuList: null,
66 |
67 | /**
68 | * Create a menu list with several menu items:
69 | * "default proxy" item
70 | * ....
71 | * several items according to how many proxy servers
72 | *
73 | * @param node {DOM node}: which node should this new menu list append to
74 | * @param index {int}: which menu item should be selected by default
75 | * @todo: @param isDefaultProxyPopup {boolean}: if true, "default proxy" menu item won't be created
76 | */
77 | newList: function(node, index, special)
78 | {
79 | this.menuList = cE('menulist');
80 | this.menuList.appendChild(cE('menupopup'));
81 | node.appendChild(this.menuList);
82 |
83 | if (!special)
84 | this.newItem(aup.getString('default_proxy'));
85 |
86 | proxy.getName.forEach(this.newItem);
87 |
88 | if (special == "fallbackProxy") {
89 | this.newItem(aup.getString('no_proxy'));
90 | }
91 |
92 | this.menuList.selectedIndex = index;
93 | },
94 |
95 | /**
96 | * Create a new menu item for this.menuList
97 | */
98 | newItem: function(proxyName)
99 | {
100 | var menuItem = cE('menuitem');
101 | menuItem.setAttribute('label', proxyName);
102 | menu.menuList.firstChild.appendChild(menuItem);
103 | }
104 | };
105 |
106 | function save()
107 | {
108 | var textboxs = document.getElementsByTagName("textbox");
109 | for (var j=0; j
2 | extensions.autoproxy@autoproxy.org.description=Proxy management made easy.
3 |
4 | status_auto_label=AutoProxy
5 | status_global_label=Global
6 | status_disabled_label=Disabled
7 |
8 | action0_tooltip=Click to bring up context menu.
9 | action1_tooltip=Click to open/close proxyable items.
10 | action2_tooltip=Click to open preferences.
11 | action3_tooltip=Click to cycle proxy mode.
12 | action4_tooltip=Click to cycle default proxy.
13 | action5_tooltip=Click to bring up default proxy menu.
14 |
15 | auto_tooltip=AutoProxy is in Auto mode, use (or disable) proxy according to proxy rules.
16 | disabled_tooltip=Proxy is completely disabled.
17 | global_tooltip=AutoProxy is in global mode, will apply proxy to all websites.
18 |
19 | blocked_count_tooltip=-- out of --
20 |
21 | no_blocking_suggestions=No proxyable items on the current page
22 | whitelisted_page=AutoProxy has been disabled for the current page
23 | customRuleGroup_description=My rule group
24 | subscription_description=Subscription
25 | subscription_wrong_version=Some rules in this subscription require AutoProxy -- to work properly!
26 | subscription_source=Source:
27 | subscription_status=Status:
28 | subscription_status_autodownload=Updated automatically
29 | subscription_status_manualdownload=Updated manually
30 | subscription_status_externaldownload=Updated externally (another extension)
31 | subscription_status_lastdownload=Last download:
32 | subscription_status_lastdownload_inprogress=Downloading...
33 | subscription_status_lastdownload_unknown=N/A
34 | remove_subscription_warning=Do you really wish to remove this subscription?
35 | remove_userRuleGroup_warning=Do you really wish to remove all custom proxy rules within this group?
36 | import_filters_wrong_version=Warning: some of the rules in this list require AutoProxy -- to work properly. You should probably upgrade to the latest AutoProxy release before importing this list.
37 | import_filters_warning=Do you wish to replace your current rules or append the new rules at the end of the list?
38 | import_filters_title=Import rules
39 | export_filters_title=Export rules
40 | invalid_filters_file=Not a valid AutoProxy rules file.
41 | filters_write_error=There was an error writing rules to the file. Make sure the file isn't write protected or hold by another program.
42 | clearall_warning=Do you really wish to remove all rules from the list?
43 | resethitcounts_warning=Do you really wish to reset hit counts for all rules back to zero? This operation can't be undone!
44 | resethitcounts_selected_warning=Do you really wish to reset hit counts for selected rules back to zero? This operation can't be undone!
45 |
46 | filter_regexp_tooltip=This rule is either a regular expression or too short to be optimized. Too many of these rules might slow down your browsing.
47 |
48 | subscription_no_location=Please enter a location to download rules from.
49 | subscription_invalid_location=Rule list location is neither a valid URL nor a valid file name.
50 | subscription_location_exists=You are already subscribed to this rule list.
51 | synchronize_invalid_url=Failed, not a valid address
52 | synchronize_connection_error=Failed, download failure
53 | synchronize_invalid_data=Failed, not a valid rules list
54 | synchronize_checksum_mismatch=Failed, checksum mismatch
55 | synchronize_ok=Success
56 |
57 | overwrite=Overwrite
58 | append=Append
59 |
60 | new_filter_group_title=New rule
61 |
62 | type_label_other=other
63 | type_label_script=script
64 | type_label_image=image
65 | type_label_stylesheet=stylesheet
66 | type_label_object=object
67 | type_label_subdocument=frame
68 | type_label_document=document
69 | type_label_background=background
70 |
71 | type_label_xbl=XBL binding
72 | type_label_ping=link ping
73 | type_label_xmlhttprequest=XML request
74 | type_label_object_subrequest=object subrequest
75 | type_label_dtd=DTD
76 | type_label_media=audio/video
77 | type_label_font=font
78 |
79 | # strings used by the Find bar, copied from findbar.properties
80 | NotFound=Phrase not found
81 | WrappedToTop=Reached end of page, continued from top
82 | WrappedToBottom=Reached top of page, continued from bottom
83 |
84 | unnamed=Unnamed
85 | default_proxy=Default proxy
86 | no_proxy=No proxy
87 | not_matching=When not matching
88 | no_proxy_rule=no proxy rule found
89 |
90 | directConnect=Direct connect
91 | enableProxyOnSite=Enable proxy on site: --
92 | enableProxyOnUrl=Enable proxy on URL: --
93 | disableProxyOnSite=Disable proxy on site: --
94 | disableProxyOnUrl=Disable proxy on URL: --
95 |
--------------------------------------------------------------------------------
/chrome/locale/sv-SE/global.properties:
--------------------------------------------------------------------------------
1 | extensions.autoproxy@autoproxy.org.description=Okomplicerad proxyhantering.
2 | status_auto_label=AutoProxy
3 | status_global_label=Globalt
4 | status_disabled_label=Inaktiverat
5 | action0_tooltip=Klicka för att öppna snabbmenyn.
6 | action1_tooltip=Klicka för att öppna/stänga listan över proxyhanteringsbara objekt.
7 | action2_tooltip=Klicka för att öppna inställningarna.
8 | action3_tooltip=Klicka för att rulla igenom proxylägen.
9 | action4_tooltip=Klicka för att rulla igenom standardproxylägen.
10 | action5_tooltip=Klicka för att öppna standardproxymenyn.
11 | auto_tooltip=AutoProxy är i Automatiskt läge, använder (eller inaktiverar) proxy i enlighet med proxyregler.
12 | disabled_tooltip=All proxyanvändning är inaktiverad.
13 | global_tooltip=AutoProxy är i Globalläge, proxy kommer att tillämpas på alla webbplatser.
14 | blocked_count_tooltip=-- av --
15 | no_blocking_suggestions=Inga proxyhanteringsbara objekt på den aktuella sidan
16 | whitelisted_page=AutoProxy har inaktiverats för den aktuella sidan
17 | customRuleGroup_description=Min regelgrupp
18 | subscription_description=Prenumeration
19 | subscription_wrong_version=En del regler i den här prenumerationen kräver AutoProxy -- för att fungera korrekt!
20 | subscription_source=Källa:
21 | subscription_status=Status:
22 | subscription_status_autodownload=Uppdaterades automatiskt
23 | subscription_status_manualdownload=Uppdaterades manuellt
24 | subscription_status_externaldownload=Uppdaterades externt (ett annat tillägg)
25 | subscription_status_lastdownload=Senaste nerladdning:
26 | subscription_status_lastdownload_inprogress=Laddar ner…
27 | subscription_status_lastdownload_unknown=i.u.
28 | remove_subscription_warning=Vill du verkligen ta bort den här prenumerationen?
29 | remove_userRuleGroup_warning=Vill du verkligen ta bort alla egna proxyregler inom denna grupp?
30 | import_filters_wrong_version=Varning: En del av reglerna i den här listan kräver AutoProxy -- för att fungera korrekt. Du bör uppdatera till den senaste AutoProxy-versionen innan du importerar den här listan.
31 | import_filters_warning=Vill du ersätta dina nuvarande regler eller lägga till de nya reglerna i slutet av listan?
32 | import_filters_title=Importera regler
33 | export_filters_title=Exportera regler
34 | invalid_filters_file=Inte en giltig AutoProxy-regelfil.
35 | filters_write_error=Ett fel uppstod under skrivning av regler till filen. Säkerställ att filen inte är skrivskyddad eller används av ett annat program.
36 | clearall_warning=Vill du verkligen ta bort alla regler från listan?
37 | resethitcounts_warning=Vill du verkligen nollställa antalet träffar för alla regler? Den här operationen kan inte ångras!
38 | resethitcounts_selected_warning=Vill du verkligen nollställa antalet träffar för de markerade reglerna? Den här operationen kan inte ångras!
39 | filter_regexp_tooltip=Den här regeln är antingen ett reguljärt uttryck eller för kort för att kunna optimeras. Alltför många sådana här regler kan göra surfningen långsammare.
40 | subscription_no_location=Var vänlig ange en plats att ladda ner regler från.
41 | subscription_invalid_location=Regellistans plats är varken en giltig URL eller ett giltigt filnamn.
42 | subscription_location_exists=Du prenumererar redan på den här regellistan.
43 | synchronize_invalid_url=Misslyckades, inte en giltig adress
44 | synchronize_connection_error=Misslyckades, misslyckad nerladdning
45 | synchronize_invalid_data=Misslyckades, inte en giltig regellista
46 | synchronize_checksum_mismatch=Misslyckades, matchningsfel för kontrollsumma
47 | synchronize_ok=Slutfört
48 | overwrite=Ersätt
49 | append=Lägg till
50 | new_filter_group_title=Ny regel
51 | type_label_other=övrigt
52 | type_label_script=skript
53 | type_label_image=bild
54 | type_label_stylesheet=formatmall
55 | type_label_object=objekt
56 | type_label_subdocument=ram
57 | type_label_document=dokument
58 | type_label_background=bakgrund
59 | type_label_xbl=XBL-bindning
60 | type_label_ping=länkpingning
61 | type_label_xmlhttprequest=XML-förfrågan
62 | type_label_object_subrequest=objekt, underförfrågan
63 | type_label_dtd=DTD
64 | type_label_media=ljud/video
65 | type_label_font=font
66 | # strings used by the Find bar, copied from findbar.properties
67 | NotFound=Frasen hittades inte
68 | WrappedToTop=Kommit till slutet av sidan, börjat om från överkanten
69 | WrappedToBottom=Kommit till början av sidan, börjat om från nederkanten
70 | unnamed=Namnlös
71 | default_proxy=Standardproxy
72 | no_proxy=Ingen proxy
73 | not_matching=Om regeln inte matchar
74 | no_proxy_rule=det gick inte att hitta någon proxyregel
75 | directConnect=Direktanslutning
76 | enableProxyOnSite=Aktivera proxy för webbplats: --
77 | enableProxyOnUrl=Aktivera proxy för URL: --
78 | disableProxyOnSite=Inaktivera proxy för webbplats: --
79 | disableProxyOnUrl=Inaktivera proxy för URL: --
80 |
--------------------------------------------------------------------------------
/chrome/locale/pt-BR/global.properties:
--------------------------------------------------------------------------------
1 | extensions.autoproxy@autoproxy.org.description=Gerenciamento de Proxy fácil!
2 | status_auto_label=AutoProxy
3 | status_global_label=Global
4 | status_disabled_label=AutoProxy Inativo
5 | action0_tooltip=Clique para abrir o menu de contexto.
6 | action1_tooltip=Clique para abrir/fechar itens sujeitos a proxy.
7 | action2_tooltip=Clique para abrir as preferências.
8 | action3_tooltip=Clique para rodar o modo proxy.
9 | action4_tooltip=Clique para rodar o proxy padrão.
10 | action5_tooltip=Clique para abrir o menu proxy padrão.
11 | auto_tooltip=O AutoProxy está em modo automático, use (ou desabilite) o proxy de acordo com as regras de proxy.
12 | disabled_tooltip=Proxy está completamente desativado.
13 | global_tooltip=O AutoProxy está no modo global, o porxy será aplicada a todos as páginas.
14 | blocked_count_tooltip=-- bloqueado --
15 | no_blocking_suggestions=Não há nenhum item passível de uso do proxy na presente página
16 | whitelisted_page=O AutoProxy foi desativado para a presente pagina
17 | customRuleGroup_description=Meu grupo de regras
18 | subscription_description=Inscrição
19 | subscription_wrong_version=Algumas regras nesta assinatura requerem que o AutoProxy -- para funcionar adequadamente!
20 | subscription_source=Fonte:
21 | subscription_status=Status:
22 | subscription_status_autodownload=Atualizado automaticamente
23 | subscription_status_manualdownload=Atualizado manualmente
24 | subscription_status_externaldownload=Atualizado externamente por outra extensão
25 | subscription_status_lastdownload=Última atualização:
26 | subscription_status_lastdownload_inprogress=Atualizando...
27 | subscription_status_lastdownload_unknown=Status da atualização da assinatura desconhecido
28 | remove_subscription_warning=Você realmente deseja remover a assinatura?
29 | remove_userRuleGroup_warning=Você realmente deseja remover todas as regras de proxy personalizadas deste grupo?
30 | import_filters_wrong_version=Aviso: algumas das regras nesta lista exigem que o AutoProxy -- funcione adequadamente. Você provavelmente precisa atualizar a versão do AutoProxy antes de importar essa lista.
31 | import_filters_warning=Você deseja substituir suas regras atuais ou acrescentar as novas regras ao final da lista?
32 | import_filters_title=Importar regras
33 | export_filters_title=Exportar regras
34 | invalid_filters_file=Este não é um arquivo de regras AutoProxy válido.
35 | filters_write_error=Ocorreu um erro ao gravar as regras ao arquivo. Tenha certeza de que o arquivo não está protegido contra gravações ou em uso por outro programa.
36 | clearall_warning=Você tem certeza que quer remover todas as regras da lista?
37 | resethitcounts_warning=Você tem certeza de que quer zerar as contagens de hits para todas as regras? Essa operação não pode ser desfeita!
38 | resethitcounts_selected_warning=Você tem certeza de que quer zerar as contagens de hits para as regras selecionadas? Essa operação não pode ser desfeita!
39 | filter_regexp_tooltip=Esta regra é uma expressão regular ou é muito curta para ser otimizada. Muitas regras desse tipo podem tornar a navegação lenta.
40 | subscription_no_location=Entre um endereço de atualização das regras.
41 | subscription_invalid_location=O endereço da lista de regras não é uma URL válida ou o nome do arquivo está incorreto.
42 | subscription_location_exists=Você já está inscrito nesta lista de regras.
43 | synchronize_invalid_url=Erro! Não é um endereço válido!
44 | synchronize_connection_error=Erro! O download falhou!
45 | synchronize_invalid_data=Erro! Não é uma lista de regras válida!
46 | synchronize_checksum_mismatch=Erro de sincronização! (Checksum mismatch!)
47 | synchronize_ok=Feito!
48 | overwrite=Sobrescrever
49 | append=Acrescentar
50 | new_filter_group_title=Nova regra
51 | type_label_other=Outro
52 | type_label_script=script
53 | type_label_image=imagem
54 | type_label_stylesheet=folha de estilos
55 | type_label_object=objeto
56 | type_label_subdocument=moldura
57 | type_label_document=documento
58 | type_label_background=fundo
59 | type_label_xbl=Encadernação XBL
60 | type_label_ping=link ping
61 | type_label_xmlhttprequest=solicitação XML
62 | type_label_object_subrequest=sub-requisição de objeto
63 | type_label_dtd=DTD
64 | type_label_media=audio/video
65 | type_label_font=font
66 | NotFound=Frase não encontrada
67 | WrappedToTop=Alcançado o fim da página, segue do topo da página
68 | WrappedToBottom=Alcançado o topo da página, segue a partir do fim da página
69 | unnamed=Anônimo
70 | default_proxy=Proxy padrão
71 | no_proxy=Nenhum proxy
72 | not_matching=Quando não se enquadram
73 | no_proxy_rule=nenhuma regra de proxy encontrada
74 | directConnect=Contato direto
75 | enableProxyOnSite=Ativar proxy na página: -
76 | enableProxyOnUrl=Ativar proxy no endereço: -
77 | disableProxyOnSite=Desativar proxy na página: -
78 | disableProxyOnUrl=Desativar proxy no endereço: -
79 |
--------------------------------------------------------------------------------
/chrome/locale/sv-SE/settings.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/chrome/locale/pt-BR/settings.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/chrome/locale/de/global.properties:
--------------------------------------------------------------------------------
1 | extensions.autoproxy@autoproxy.org.description=Proxy-Verwaltung leicht gemacht.
2 | status_auto_label=AutoProxy
3 | status_global_label=Global
4 | status_disabled_label=Deaktiviert
5 | action0_tooltip=Klicken, um das Kontextmenü anzuzeigen.
6 | action1_tooltip=Klicken, um via Proxy ladbare Objekte zu öffnen/schließen.
7 | action2_tooltip=Klicken, um die Einstellungen zu öffnen.
8 | action3_tooltip=Klicken, um den Proxy Modus auszuwählen.
9 | action4_tooltip=Klicken, um den Standardproxy auszuwählen.
10 | action5_tooltip=Klicken, um das Standard Proxymenü anzuzeigen.
11 | auto_tooltip=AutoProxy ist im Auto Modus, benutze (oder deaktiviere) den Proxy gemäß der Proxyregeln.
12 | disabled_tooltip=Proxy ist komplett deaktiviert.
13 | global_tooltip=AutoProxy ist im globalen Modus und wird den Proxy auf alle Webseiten anwenden.
14 | blocked_count_tooltip=-- von --
15 | no_blocking_suggestions=Keine Objekte auf der aktuellen Webseite, die via Proxy geladen werden können
16 | whitelisted_page=AutoProxy wurde für die aktuelle Webseite deaktiviert
17 | customRuleGroup_description=Meine Regeln Gruppe
18 | subscription_description=Abonnement
19 | subscription_wrong_version=Einige Regeln im Abonnement benötigen AutoProxy --, um korrekt zu funktionieren!
20 | subscription_source=Quelle:
21 | subscription_status=Status:
22 | subscription_status_autodownload=Automatisch aktualisiert
23 | subscription_status_manualdownload=Manuell aktualisiert
24 | subscription_status_externaldownload=Extern aktualisiert (andere Erweiterung)
25 | subscription_status_lastdownload=Letzter Download:
26 | subscription_status_lastdownload_inprogress=Lädt herunter...
27 | subscription_status_lastdownload_unknown=N/A
28 | remove_subscription_warning=Möchten Sie wirklich das Abonnement entfernen?
29 | remove_userRuleGroup_warning=Wollen Sie wirklich alle benutzerdefinierten Proxyregeln dieser Gruppe löschen?
30 | import_filters_wrong_version=Warnung: Einige der Regeln dieser Liste benötigen AutoProxy --, um korrekt zu funktionieren. Sie sollten auf die neueste Version von AutoProxy aktualisieren bevor Sie diese Liste importieren.
31 | import_filters_warning=Möchten Sie Ihre aktuellen Regeln ersetzen oder die neuen Regeln ans Ende der Liste anhängen?
32 | import_filters_title=Regeln importieren
33 | export_filters_title=Regeln exportieren
34 | invalid_filters_file=Keine gültige AutoProxy Regel-Datei
35 | filters_write_error=Beim Schreiben in die Regel-Datei ist ein Fehler aufgetreten. Stellen sie sicher, dass die Datei nicht schreibgeschützt oder gerade in einem anderen Programm geöffnet ist.
36 | clearall_warning=Möchten Sie wirklich alle Regeln der Liste entfernen?
37 | resethitcounts_warning=Möchten Sie wirklich die Zugriffszähler aller Regeln auf null zurücksetzen? Diese Aktion kann nicht rückgängig gemacht werden!
38 | resethitcounts_selected_warning=Möchten Sie wirklich die Zugriffszähler der markierten Regeln auf null zurücksetzen? Diese Aktion kann nicht rückgängig gemacht werden!
39 | filter_regexp_tooltip=Diese Regel ist entweder ein regulärer Ausdruck oder zu kurz, um optimiert zu werden. Zu viele dieser Regeln können das Browsen verlangsamen.
40 | subscription_no_location=Bitte einen Ort angeben, wohin die Regeln heruntergeladen werden sollen.
41 | subscription_invalid_location=Der Speicherort der Regelliste ist weder eine gültige URL, noch ein gültiger Dateiname.
42 | subscription_location_exists=Sie haben bereits diese Regelliste abonniert.
43 | synchronize_invalid_url=Fehlgeschlagen, keine gültige Adresse
44 | synchronize_connection_error=Fehlgeschlagen, Downloadfehler
45 | synchronize_invalid_data=Fehlgeschlagen, keine gültige Regelliste
46 | synchronize_checksum_mismatch=Fehlgeschlagen, Prüfsummen stimmen nicht überein
47 | synchronize_ok=Erfolgreich
48 | overwrite=Überschreiben
49 | append=Anhängen
50 | new_filter_group_title=Neue Regel
51 | type_label_other=andere
52 | type_label_script=Skript
53 | type_label_image=Bild
54 | type_label_stylesheet=Stylesheet
55 | type_label_object=Objekt
56 | type_label_subdocument=Frame
57 | type_label_document=Dokument
58 | type_label_background=Hintergrund
59 | type_label_xbl=XBL-Binding
60 | type_label_ping=Link Ping
61 | type_label_xmlhttprequest=XML-Anfrage
62 | type_label_object_subrequest=Objekt Unteranfrage
63 | type_label_dtd=DTD
64 | type_label_media=Audio/Video
65 | type_label_font=Schriftart
66 | NotFound=Ausdruck nicht gefunden
67 | WrappedToTop=Das Seitenende wurde erreicht, Suche vom Seitenanfang fortgesetzt
68 | WrappedToBottom=Der Seitenanfang wurde erreicht, Suche vom Seitenende fortgesetzt
69 | unnamed=Unbenannt
70 | default_proxy=Standardproxy
71 | no_proxy=Kein Proxy
72 | not_matching=Falls nicht zutreffend
73 | no_proxy_rule=Keine Proxyregel gefunden
74 | directConnect=Direktverbindung
75 | enableProxyOnSite=Aktiviere Proxy auf Seite: --
76 | enableProxyOnUrl=Aktiviere Proxy für URL: --
77 | disableProxyOnSite=Deaktiviere Proxy auf Seite: --
78 | disableProxyOnUrl=Deaktiviere Proxy für URL: --
79 |
--------------------------------------------------------------------------------
/chrome/locale/de/settings.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/chrome/content/proxy.js:
--------------------------------------------------------------------------------
1 | /* ***** BEGIN LICENSE BLOCK *****
2 | * Version: MPL 1.1
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version
5 | * 1.1 (the "License"); you may not use this file except in compliance with
6 | * the License. You may obtain a copy of the License at
7 | * http://www.mozilla.org/MPL/
8 | *
9 | * Software distributed under the License is distributed on an "AS IS" basis,
10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 | * for the specific language governing rights and limitations under the
12 | * License.
13 | *
14 | * The Original Code is AutoProxy.
15 | *
16 | * The Initial Developer of the Original Code is
17 | * Wang Congming .
18 | * Portions created by the Initial Developer are Copyright (C) 2010-2011
19 | * the Initial Developer. All Rights Reserved.
20 | *
21 | * Contributor(s):
22 | * 2010: slimx .
23 | *
24 | * ***** END LICENSE BLOCK ***** */
25 |
26 | /**
27 | * Core implementation of proxy mechanism
28 | * This file is included from AutoProxy.js.
29 | */
30 |
31 | const pS = Cc['@mozilla.org/network/protocol-proxy-service;1'].getService(Ci.nsIProtocolProxyService);
32 |
33 | var proxy =
34 | {
35 | server: null,
36 | getName: null,
37 | defaultProxy: null,
38 | validConfigs: null,
39 | mode: ['auto', 'global', 'disabled'],
40 | direct: pS.newProxyInfo('direct', '', -1, 0, 0, null),
41 |
42 | init: function()
43 | {
44 | this.reloadPrefs();
45 | prefs.addListener(this.reloadPrefs);
46 | },
47 |
48 | reloadPrefs: function()
49 | {
50 | // Refresh validConfigs - array of objects
51 | proxy.validConfigs = proxy.configToObj(prefs.customProxy) ||
52 | proxy.configToObj(prefs.knownProxy);
53 |
54 | /**
55 | * Refresh proxy name & available proxy servers
56 | *
57 | * newProxyInfo(type, host, port, socks_remote_dns, failoverTimeout, failoverProxy)
58 | */
59 | proxy.server = []; proxy.getName = [];
60 | for each (var conf in proxy.validConfigs) {
61 | proxy.getName.push(conf.name);
62 | proxy.server.push(pS.newProxyInfo(conf.type, conf.host, conf.port, 1, 0, null));
63 | }
64 |
65 | // Refresh defaultProxy {nsIProxyInfo}
66 | proxy.defaultProxy = proxy.server[prefs.defaultProxy] || proxy.server[0];
67 | proxy.nameOfDefaultProxy = proxy.getName[prefs.defaultProxy] || proxy.getName[0];
68 |
69 | // Refresh fallbackProxy {nsIProxyInfo}
70 | proxy.fallbackProxy = prefs.fallbackProxy == -1 ?
71 | proxy.direct : proxy.server[prefs.fallbackProxy];
72 |
73 | pS.unregisterFilter(proxy);
74 | pS.registerFilter(proxy, 0);
75 | },
76 |
77 | /**
78 | * Convert proxy config(e.g.: prefs.knownProxy) to objects for convenient usage later
79 | *
80 | * @param config {String}
81 | * @return {Array} of objects
82 | */
83 | configToObj: function(config)
84 | {
85 | var proxyObjArray = [];
86 |
87 | for each (var proxyAttr in config.split('$')) {
88 | proxyAttr = proxyAttr.split(';');
89 | if (proxyAttr.length != 4 || proxyAttr[0] == '' || isNaN(proxyAttr[2]))
90 | continue;
91 |
92 | var proxyObj = {};
93 | proxyObj.name = proxyAttr[0];
94 | proxyObj.host = proxyAttr[1] == '' ? '127.0.0.1' : proxyAttr[1];
95 | proxyObj.port = proxyAttr[2];
96 | proxyObj.type = /^socks4?$/i.test(proxyAttr[3]) ? proxyAttr[3] : 'http';
97 | proxyObjArray.push(proxyObj);
98 | }
99 |
100 | return proxyObjArray.length == 0 ? false : proxyObjArray;
101 | },
102 |
103 | /**
104 | * Checks whether the location's scheme is proxyable
105 | *
106 | * @param location {nsIURI}
107 | * @return {Boolean}
108 | */
109 | isProxyableScheme: function(location)
110 | {
111 | return ['http', 'https', 'ftp', 'gopher'].some(
112 | function(scheme){return location.scheme==scheme;});
113 | },
114 |
115 | /**
116 | * Switch to specified proxy mode
117 | * @param mode {String} see this.mode
118 | */
119 | switchToMode: function(mode)
120 | {
121 | prefs.proxyMode = mode;
122 | prefs.save();
123 | },
124 |
125 | //
126 | // nsIProtocolProxyFilter implementation
127 | //
128 | applyFilter: function(pS, uri, aProxy)
129 | {
130 | if (prefs.proxyMode == 'disabled' || uri.schemeIs('feed'))
131 | return this.direct;
132 |
133 | var match = policy.autoMatching(uri);
134 |
135 | if (this.isNoProxy(match)) return this.direct;
136 | if (prefs.proxyMode == "auto")
137 | return this.getGroupProxy(match) || this.fallbackProxy;
138 |
139 | return this.defaultProxy;
140 | },
141 |
142 | // @todo: bug, whitelist in other group may overwrite "global no proxy" group
143 | isNoProxy: function(match)
144 | {
145 | if (match instanceof WhitelistFilter)
146 | // for each (var s in match.subscriptions)
147 | // if (!s.disabled && s.url == "~wl~")
148 | return true;
149 |
150 | return false;
151 | },
152 |
153 | getGroupProxy: function(match)
154 | {
155 | if (!match || match instanceof WhitelistFilter) return null;
156 | for each (var s in match.subscriptions)
157 | if (!s.disabled)
158 | return this.server[s.proxy] || this.defaultProxy;
159 | }
160 | };
161 |
162 | aup.proxy = proxy;
163 |
164 | // @TODO: ";" & "$" is not allowed in proxy name
165 | // @TODO: review editProxyServer.js
166 | // @TODO: proxy name should be unique
167 | // @TODO: aup.getString('no proxy') && aup.getString('default proxy') are reserved
168 |
--------------------------------------------------------------------------------
/chrome/content/ui/tip_subscriptions.js:
--------------------------------------------------------------------------------
1 | /* ***** BEGIN LICENSE BLOCK *****
2 | * Version: MPL 1.1
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version
5 | * 1.1 (the "License"); you may not use this file except in compliance with
6 | * the License. You may obtain a copy of the License at
7 | * http://www.mozilla.org/MPL/
8 | *
9 | * Software distributed under the License is distributed on an "AS IS" basis,
10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 | * for the specific language governing rights and limitations under the
12 | * License.
13 | *
14 | * The Original Code is Adblock Plus.
15 | *
16 | * The Initial Developer of the Original Code is
17 | * Wladimir Palant.
18 | * Portions created by the Initial Developer are Copyright (C) 2006-2009
19 | * the Initial Developer. All Rights Reserved.
20 | *
21 | * Contributor(s):
22 | * 2009: Wang Congming Modified for AutoProxy.
23 | *
24 | * ***** END LICENSE BLOCK ***** */
25 |
26 | let autoAdd;
27 | let result;
28 | let defaultLabel;
29 | let menupop;
30 | let selectedId;
31 | let E = function(id) { return document.getElementById(id); };
32 | let cE = function(tag) { return document.createElementNS(
33 | "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", tag); };
34 |
35 | function init()
36 | {
37 | autoAdd = !(window.arguments && window.arguments.length);
38 | result = (autoAdd ? {disabled: false, external: false, autoDownload: true} : window.arguments[0]);
39 | E("description-par1").hidden = !autoAdd;
40 | E("description-par3").hidden = !autoAdd;
41 | if (!autoAdd) {
42 | E("description-par2").style.visibility = "hidden";
43 | E("defaultButton").style.visibility = "hidden";
44 | E("acceptButton").label = E("acceptButton").getAttribute("label2");
45 | E("acceptButton").setAttribute("accesskey", E("acceptButton").getAttribute("accesskey2"));
46 | }
47 | else{
48 | E("aupTipSubscriptions").width = "600px";
49 | document.title = E("aupTipSubscriptions").getAttribute("welcome");
50 | defaultLabel = E("defaultButton").label;
51 | menupop = E("defaultButton").firstChild;
52 | createMenuItems();
53 | }
54 | }
55 |
56 | /**
57 | * Create menu items for user to choose a default proxy.
58 | * Re-create these items if user customed a new proxy.
59 | */
60 | function createMenuItems()
61 | {
62 | selectedId = prefs.defaultProxy;
63 |
64 | for (let i in proxy.getName) {
65 | var mitem = cE("menuitem")
66 | mitem.setAttribute("id", i);
67 | mitem.setAttribute("type", "radio");
68 | mitem.setAttribute("label", proxy.getName[i]);
69 | mitem.setAttribute("onclick", "changeDefaultLabel(this)");
70 | if (i == prefs.defaultProxy) mitem.setAttribute("checked", true);
71 | menupop.appendChild(mitem);
72 | }
73 |
74 | E("defaultButton").label = defaultLabel + proxy.nameOfDefaultProxy;
75 |
76 | // user don't use listed proxy, add by himself.
77 | var customItem = cE("menuitem");
78 | customItem.setAttribute("id", "customItem");
79 | customItem.setAttribute("label", E("defaultButton").getAttribute("customLabel"));
80 | customItem.setAttribute("onclick", "customDefaultProxy()");
81 | menupop.appendChild(customItem);
82 | }
83 |
84 | /**
85 | * Click handler of "Add a new proxy" button.
86 | */
87 | function customDefaultProxy()
88 | {
89 | openDialog("editProxyServer.xul", "_blank", "chrome,centerscreen,modal");
90 | while ( menupop.firstChild ) menupop.removeChild(menupop.firstChild);
91 | createMenuItems();
92 | }
93 |
94 | /**
95 | * Change the "Default Proxy" button's label. for example:
96 | * Default Proxy: Tor --> Default Proxy: GAppProxy
97 | */
98 | function changeDefaultLabel(mitem)
99 | {
100 | selectedId = parseInt(mitem.id);
101 | E("defaultButton").label = defaultLabel + mitem.label;
102 | }
103 |
104 | /**
105 | * function for accept button, save default proxy and subscribe.
106 | */
107 | function subscribeAndSetDefault()
108 | {
109 | if (autoAdd) {
110 | prefs.defaultProxy = selectedId;
111 | prefs.save();
112 | }
113 |
114 | var group = E("subscriptions");
115 | var selected = group.selectedItem;
116 | if (!selected)
117 | return;
118 |
119 | result.url = selected.getAttribute("_url");
120 | result.title = selected.getAttribute("_title");
121 | result.autoDownload = true;
122 | result.disabled = false;
123 |
124 | if (autoAdd)
125 | aup.addSubscription(result.url, result.title, result.autoDownload, result.disabled);
126 | }
127 |
128 | /**
129 | * Popup dialog for add a custom subscription.
130 | */
131 | function addOther() {
132 | openDialog("subscription.xul", "_blank", "chrome,centerscreen,modal", null, result);
133 | if ("url" in result)
134 | {
135 | if (autoAdd)
136 | aup.addSubscription(result.url, result.title, result.autoDownload, result.disabled);
137 | window.close();
138 | }
139 | }
140 |
141 | function handleKeyPress(e) {
142 | switch (e.keyCode) {
143 | case e.DOM_VK_PAGE_UP:
144 | case e.DOM_VK_PAGE_DOWN:
145 | case e.DOM_VK_END:
146 | case e.DOM_VK_HOME:
147 | case e.DOM_VK_LEFT:
148 | case e.DOM_VK_RIGHT:
149 | case e.DOM_VK_UP:
150 | case e.DOM_VK_DOWN:
151 | return false;
152 | }
153 | return true;
154 | }
155 |
156 | function handleCommand(event)
157 | {
158 | let scrollBox = document.getElementById("subscriptionsScrollbox")
159 | .boxObject
160 | .QueryInterface(Ci.nsIScrollBoxObject);
161 | scrollBox.ensureElementIsVisible(event.target);
162 | scrollBox.ensureElementIsVisible(event.target.nextSibling);
163 | }
164 |
--------------------------------------------------------------------------------