Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useDefaultClean Option #1

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions chrome/content/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ this.__defineGetter__('acSandboxScripts', function() {

function acResolver() {}
acResolver.prototype = {
useDefaultClean: true,
responseText: '',
run: function acR_run(download) {
if ('_acProcessing' in download) {
Expand Down Expand Up @@ -191,7 +192,9 @@ acResolver.prototype = {
if (this.useOriginName) {
dn = this.download.urlManager.usable.getUsableFileName();
}
dn = this.defaultClean(dn);
if (this.useDefaultClean) {
dn = this.defaultClean(dn);
}
if (typeof this.postClean == 'function') {
dn = this.postClean(dn);
}
Expand Down Expand Up @@ -604,8 +607,11 @@ function acFactory(obj) {
}
}

for each (let x in ['type', 'prefix', 'useServerName', 'useOriginName', 'generateName', 'sendInitialReferrer', 'decode', 'omitReferrer', 'static']) {
this.obj.prototype[x] = obj[x];
for each (let x in ['type', 'prefix', 'useServerName', 'useOriginName', 'generateName', 'sendInitialReferrer', 'decode', 'omitReferrer', 'static', 'useDefaultClean']) {
// skip unset settings to allow default values in prototype
if (typeof obj[x] !== 'undefined') {
this.obj.prototype[x] = obj[x];
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion chrome/locale/de/prefpane.dtd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!ENTITY ac.panetitle "Anti-Container">
<!ENTITY ac.plugins "Verfügbare Plug-Ins">
<!ENTITY ac.plugins "Verfügbare Plugins">
<!ENTITY ac.plugins.install "Plugin installieren">
<!ENTITY ac.plugins.newplugin "Plugin erstellen">
<!ENTITY ac.plugins.cancel "Abbrechen">
Expand Down
2 changes: 1 addition & 1 deletion chrome/locale/de/webinstall.dtd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!ENTITY wi.title "AntiContainer Plugin Installation">
<!ENTITY wi.intro "Sie haben ein DownThemAll! AntiContainer Plugin entdeckt. Solch ein Plugin erlaubt es DownThemAll! Dateien herunterzuladen, die normalerweise hinter Container-Seiten versteckt sind.">
<!ENTITY wi.intro2 "Plugins werden als kleine Dateien in Ihrem <a href='http://support.mozilla.com/de/kb/Benutzerprofile'>Profil Ordner</a> installiert. Sie können im AntiContainer Reiter der DownThemAll! <a href='javascript:openPrefs();'>Einstellungen</a> deaktiviert oder deinstalliert werden.">
<!ENTITY wi.intro2 "Plugins werden als kleine Dateien in Ihrem <a href='http://support.mozilla.com/de/kb/Benutzerprofile'>Profilordner</a> installiert. Sie können im AntiContainer Reiter der DownThemAll!-<a href='javascript:openPrefs();'>Einstellungen</a> deaktiviert oder deinstalliert werden.">
<!ENTITY wi.details "Plugin Details">
<!ENTITY wi.source "Quelltext">
<!ENTITY wi.caution "Achtung">
Expand Down
4 changes: 2 additions & 2 deletions chrome/locale/en-US/prefpane.dtd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!ENTITY ac.panetitle "Anti-Container" >
<!ENTITY ac.plugins "Available plugins" >
<!ENTITY ac.plugins.install "Install Plugin" >
<!ENTITY ac.plugins.newplugin "Create Plugin" >
<!ENTITY ac.plugins.install "Install plugin" >
<!ENTITY ac.plugins.newplugin "Create plugin" >
<!ENTITY ac.plugins.cancel "Cancel" >
<!ENTITY ac.dtarequired "AntiContainer requires DownThemAll! to be installed!">
9 changes: 9 additions & 0 deletions plugins/facebook.com.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "resolver",
"ns": "downthemall.net",
"prefix": "facebook.com",
"match": "http://(www.)?facebook\\.com/photo\\.php\\?",
"finder": "<img[^>]+src=\"([^\"]+?)\"[^>]+id=\"myphoto\"[^>]*/>",
"builder": "{1}",
"useDefaultClean" : false
}