Skip to content

Commit

Permalink
Rename Extension DownItAll!
Browse files Browse the repository at this point in the history
  • Loading branch information
RealityRipple committed Jun 15, 2021
1 parent 5908411 commit 3b64990
Show file tree
Hide file tree
Showing 106 changed files with 1,159 additions and 1,281 deletions.
6 changes: 3 additions & 3 deletions bootstrap.js
Expand Up @@ -20,7 +20,7 @@ function uninstall() {
function startup(data) {
// will unload itself
let _g = {};
Components.utils.import("chrome://dta-modules/content/glue.jsm", _g);
Components.utils.import("chrome://dia-modules/content/glue.jsm", _g);

if (AddonManager.addUpgradeListener && data.instanceID) {
AddonManager.addUpgradeListener(data.instanceID, upgrade => {
Expand Down Expand Up @@ -48,7 +48,7 @@ function shutdown(data, reason) {
return;
}
let _g = {};
Components.utils.import("chrome://dta-modules/content/glue.jsm", _g);
Components.utils.import("chrome://dia-modules/content/glue.jsm", _g);
_g.unload("shutdown", reason === ADDON_UPGRADE);
Components.utils.unload("chrome://dta-modules/content/glue.jsm");
Components.utils.unload("chrome://dia-modules/content/glue.jsm");
}
20 changes: 10 additions & 10 deletions chrome.manifest
@@ -1,18 +1,18 @@
## actual content packages ##
content dta chrome/content/
content dtaicon ./
skin dta classic/1.0 chrome/skin/
content dta-locale chrome/locale/en-US/
locale dta en-US chrome/locale/en-US/
content dta-public chrome/public/ contentaccessible
skin dta-public classic/1.0 chrome/public/
content dia chrome/content/
content diaicon ./
skin dia classic/1.0 chrome/skin/
content dia-locale chrome/locale/en-US/
locale dia en-US chrome/locale/en-US/
content dia-public chrome/public/ contentaccessible
skin dia-public classic/1.0 chrome/public/

## aux packages ##
content dta-modules modules/
content dia-modules modules/

## platform package ##
content dta-platform chrome/content/ platform
skin dta-platform classic/1.0 chrome/skin/
content dia-platform chrome/content/ platform
skin dia-platform classic/1.0 chrome/skin/

# Hack to prevent .Net Framework Assistant from messing up the browser, courtesy of AdBlock Plus
override chrome://dotnetassistant/content/bootstrap.xul data:text/xml,<nada/>
16 changes: 8 additions & 8 deletions chrome/content/common/bindings.css
Expand Up @@ -2,12 +2,12 @@

/* rebind as a workaround for the hidden image */
menu.menu-iconic {
-moz-binding: url(chrome://dta/content/common/bindings.xml#menu-iconic-addressable);
-moz-binding: url(chrome://dia/content/common/bindings.xml#menu-iconic-addressable);
}

/* splitmenu */
splitmenu {
-moz-binding: url(chrome://dta/content/common/bindings.xml#splitmenu);
-moz-binding: url(chrome://dia/content/common/bindings.xml#splitmenu);
}
.splitmenu-menu > .menu-text,
.splitmenu-menu > .menu-accel-container,
Expand All @@ -17,13 +17,13 @@ splitmenu {

/* closebox */
.closer {
-moz-binding: url(chrome://dta/content/common/bindings.xml#closebox);
-moz-binding: url(chrome://dia/content/common/bindings.xml#closebox);
}
.closer .childrenbox {
margin-left: 13px;
}
.closer > .closebox-title {
-moz-binding: url(chrome://dta/content/common/bindings.xml#closebox-title);
-moz-binding: url(chrome://dia/content/common/bindings.xml#closebox-title);
}
.closebox-title {
cursor: pointer !important;
Expand All @@ -37,22 +37,22 @@ splitmenu {

/* saveddropdown */
saveddropdown {
-moz-binding: url(chrome://dta/content/common/bindings.xml#saveddropdown);
-moz-binding: url(chrome://dia/content/common/bindings.xml#saveddropdown);
}

/* metalinker */
richlistbox.metalinker .item {
-moz-binding: url(chrome://dta/content/common/bindings.xml#metalinker-item);
-moz-binding: url(chrome://dia/content/common/bindings.xml#metalinker-item);
}

/* hashinput */
hashinput {
-moz-binding: url(chrome://dta/content/common/bindings.xml#hashinput);
-moz-binding: url(chrome://dia/content/common/bindings.xml#hashinput);
}

/* speed list */
menupopup.speedlimitlist-popup {
-moz-binding: url(chrome://dta/content/common/bindings.xml#speed-limit-list-popup);
-moz-binding: url(chrome://dia/content/common/bindings.xml#speed-limit-list-popup);
}
menu > menupopup.speedlimitlist-popup menuitem[checked] {
font-weight: bold;
Expand Down
16 changes: 8 additions & 8 deletions chrome/content/common/bindings.xml
Expand Up @@ -5,9 +5,9 @@
<!DOCTYPE bindings [
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
%globalDTD;
<!ENTITY % mirrorsDTD SYSTEM "chrome://dta/locale/mirrors.dtd">
<!ENTITY % mirrorsDTD SYSTEM "chrome://dia/locale/mirrors.dtd">
%mirrorsDTD;
<!ENTITY % defmirrorsDTD SYSTEM "chrome://dta-locale/content/mirrors.dtd">
<!ENTITY % defmirrorsDTD SYSTEM "chrome://dia-locale/content/mirrors.dtd">
%defmirrorsDTD;
]>

Expand Down Expand Up @@ -109,7 +109,7 @@
<body><![CDATA[
try {
let glue = {};
Components.utils.import("chrome://dta-modules/content/glue.jsm", glue);
Components.utils.import("chrome://dia-modules/content/glue.jsm", glue);
this.hist = glue.require("support/historymanager").getHistory(this._pref, this.isPrivate);
}
catch (ex) {
Expand Down Expand Up @@ -250,7 +250,7 @@
<implementation>
<constructor><![CDATA[
this._typemap = {};
for (x in DTA.SUPPORTED_HASHES) {
for (x in DIA.SUPPORTED_HASHES) {
var e = document.createElement('menuitem');
e.setAttribute('value', x);
e.setAttribute('label', x);
Expand All @@ -273,7 +273,7 @@
<getter><![CDATA[
try {
if (this._hash.value.length) {
new DTA.Hash(this._hash.value, this._type.value);
new DIA.Hash(this._hash.value, this._type.value);
}
return true;
}
Expand All @@ -285,7 +285,7 @@
<property name="value">
<getter><![CDATA[
if (this._hash.value.length) {
return new DTA.Hash(this._hash.value, this._type.value);
return new DIA.Hash(this._hash.value, this._type.value);
}
return null;
]]></getter>
Expand Down Expand Up @@ -507,7 +507,7 @@
<property name="charset" onget="return this.getAttribute('charset');"/>
</implementation>
</binding>
<binding id="mirror-item" extends="chrome://dta/content/common/bindings.xml#mirror-item-base">
<binding id="mirror-item" extends="chrome://dia/content/common/bindings.xml#mirror-item-base">
<content>
<xul:vbox pack="center">
<xul:hbox pack="center">
Expand Down Expand Up @@ -547,7 +547,7 @@
]]></handler>
</handlers>
</binding>
<binding id="mirror-item-editing" extends="chrome://dta/content/common/bindings.xml#mirror-item-base">
<binding id="mirror-item-editing" extends="chrome://dia/content/common/bindings.xml#mirror-item-base">
<content>
<xul:vbox pack="center">
<xul:hbox pack="center">
Expand Down
6 changes: 3 additions & 3 deletions chrome/content/common/internalFunctions.js
Expand Up @@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/* dTa-only code! - DO NOT include in overlays or such! */
/* DiA-only code! - DO NOT include in overlays or such! */
"use strict";
/* jshint strict:true, globalstrict:true, browser:true */
/* global _, Cc:true, Ci:true, Cr:true, Cu:true, ctor:true, Exception:true */
Expand All @@ -15,7 +15,7 @@ var Exception = Components.Exception;

// shared state defines

Cu.import("chrome://dta-modules/content/glue.jsm", this);
Cu.import("chrome://dia-modules/content/glue.jsm", this);
(function() {
for (let [k,v] in new Iterator(require("constants"))) {
Object.defineProperty(this, k, {value: v, enumerable:true});
Expand All @@ -26,7 +26,7 @@ var Mediator = require("support/mediator");
var {FilterManager} = require("support/filtermanager");
var {toURI, toURL} = require("support/stringfuncs");
var {unloadWindow} = require("support/overlays");
var DTA = require("api");
var DIA = require("api");

function showPreferences(pane, command) {
return Mediator.showPreferences(window, pane, command);
Expand Down
20 changes: 10 additions & 10 deletions chrome/content/dta/addurl.js → chrome/content/dia/addurl.js
Expand Up @@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/* global _, DTA, $, $$, Utils, Preferences, getDefaultDownloadsDirectory, unloadWindow */
/* global _, DIA, $, $$, Utils, Preferences, getDefaultDownloadsDirectory, unloadWindow */
/* jshint globalstrict:true, strict:true, browser:true */
var prompts = require("prompts");
var Version = require("version");
Expand Down Expand Up @@ -96,7 +96,7 @@ var Dialog = {
}
else if (typeof(a.url) === 'object' && 'url' in a.url) {
address._item = a;
// we've got a DTA.URL.
// we've got a DIA.URL.
// In this case it is not safe to modify it because of encoding
// issues.
address.value = a.url.usable;
Expand All @@ -115,7 +115,7 @@ var Dialog = {
}
}
try {
let referrer = (new DTA.URL(Services.io.newURI(a.referrer, null, null))).url.spec;
let referrer = (new DIA.URL(Services.io.newURI(a.referrer, null, null))).url.spec;
try {
referrer = decodeURIComponent(referrer);
} catch (ex) {}
Expand All @@ -139,7 +139,7 @@ var Dialog = {
let str = {}, len = {};
trans.getTransferData("text/unicode", str, len);
if (len.value && (str.value instanceof Ci.nsISupportsString)) {
let url = new DTA.URL(Services.io.newURI(str.value.data, null, null));
let url = new DIA.URL(Services.io.newURI(str.value.data, null, null));
if (url.hash) {
hash = url.hash;
delete url.hash;
Expand Down Expand Up @@ -201,7 +201,7 @@ var Dialog = {
catch (ex) {
url = uri.spec;
}
url = new DTA.URL(Services.io.newURI(url, null, null));
url = new DIA.URL(Services.io.newURI(url, null, null));
if (url.hash) {
$('hash').value = hash;
}
Expand Down Expand Up @@ -247,7 +247,7 @@ var Dialog = {
return this.downloadPlain(start, url, hash);
},
downloadPlain: function(start, url, hash) {
let num = DTA.currentSeries();
let num = DIA.currentSeries();
let batch;
try {
batch = new BatchGenerator(url);
Expand Down Expand Up @@ -287,7 +287,7 @@ var Dialog = {
let filename = $("filename").value || null;
let desc = $('description').value;
let ref = $('URLref').value;
let URL = DTA.URL;
let URL = DIA.URL;
let newURI = Services.io.newURI;

function QueueItem(url, fn) {
Expand Down Expand Up @@ -328,15 +328,15 @@ var Dialog = {
}
item.description = $('description').value;
item.referrer = $('URLref').value;
item.numIstance = DTA.currentSeries();
item.numIstance = DIA.currentSeries();
item.mask = this.ddRenaming.value;
item.dirSave = this.ddDirectory.value;
item.url.hash = item.url.hash || hash;

return this.sendDownloads(start, [item], item.isPrivate);
},
sendDownloads: function(start, downloads, isPrivate) {
DTA.incrementSeries();
DIA.incrementSeries();
let clq = start;
if (!clq) {
clq = Preferences.getExt("confirmlastqueued", 0);
Expand Down Expand Up @@ -365,7 +365,7 @@ var Dialog = {
this.ddRenaming.save($("renamingOnce").checked);
this.ddDirectory.save();

DTA.sendLinksToManager(window, start, downloads);
DIA.sendLinksToManager(window, start, downloads);

close();
return false;
Expand Down
24 changes: 12 additions & 12 deletions chrome/content/dta/addurl.xul → chrome/content/dia/addurl.xul
Expand Up @@ -12,27 +12,27 @@
*
* ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://dta/skin/common/style.css" type="text/css" ?>
<?xml-stylesheet href="chrome://dta/skin/add/style.css" type="text/css" ?>
<?xml-stylesheet href="chrome://dia/skin/common/style.css" type="text/css" ?>
<?xml-stylesheet href="chrome://dia/skin/add/style.css" type="text/css" ?>

<!DOCTYPE dialog [
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/">
%globalDTD;
<!ENTITY % commonDTD SYSTEM "chrome://dta/locale/">
<!ENTITY % commonDTD SYSTEM "chrome://dia/locale/">
%commonDTD;
<!ENTITY % defcommonDTD SYSTEM "chrome://dta-locale/content/dta.dtd">
<!ENTITY % defcommonDTD SYSTEM "chrome://dia-locale/content/dia.dtd">
%defcommonDTD;
<!ENTITY % addUrlDTD SYSTEM "chrome://dta/locale/addurl.dtd">
<!ENTITY % addUrlDTD SYSTEM "chrome://dia/locale/addurl.dtd">
%addUrlDTD;
<!ENTITY % defaddUrlDTD SYSTEM "chrome://dta-locale/content/addurl.dtd">
<!ENTITY % defaddUrlDTD SYSTEM "chrome://dia-locale/content/addurl.dtd">
%defaddUrlDTD;
]>

<dialog
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
title="&windowtitle;"
id="DownThemAll"
id="DownItAll"
onload="Dialog.load();"
persist="screenX screenY width"
ondialogaccept="return Dialog.download(true);"
Expand All @@ -44,12 +44,12 @@
buttonaccesskeyextra1="&queue.key;"
>

<script type="application/javascript" src="chrome://dta/content/common/internalFunctions.js"/>
<script type="application/javascript" src="chrome://dta/content/dta/addurl.js"/>
<script type="application/javascript" src="chrome://dia/content/common/internalFunctions.js"/>
<script type="application/javascript" src="chrome://dia/content/dia/addurl.js"/>

<stringbundleset xmlns="http://www.downthemall.net/properties#">
<stringbundle src="chrome://dta/locale/addurl.properties"/>
<stringbundle src="chrome://dta/locale/common.properties"/>
<stringbundleset xmlns="http://downitall.realityripple.com/properties#">
<stringbundle src="chrome://dia/locale/addurl.properties"/>
<stringbundle src="chrome://dia/locale/common.properties"/>
</stringbundleset>

<keyset>
Expand Down
5 changes: 5 additions & 0 deletions chrome/content/dia/manager.xul
@@ -0,0 +1,5 @@
<?xml version="1.0"?>
<?xul-overlay href="chrome://dia/content/dia/manager/manager.xul"?>
<!DOCTYPE dialog>

<window id="DownItAll" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"/>
File renamed without changes.
Expand Up @@ -9,17 +9,17 @@
*
* ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="chrome://dta/skin/common/style.css" type="text/css" ?>
<?xml-stylesheet href="chrome://dia/skin/common/style.css" type="text/css" ?>

<!DOCTYPE window [
<!ENTITY % conflictsDTD SYSTEM "chrome://dta/locale/conflicts.dtd">
<!ENTITY % conflictsDTD SYSTEM "chrome://dia/locale/conflicts.dtd">
%conflictsDTD;
<!ENTITY % defconflictsDTD SYSTEM "chrome://dta-locale/content/conflicts.dtd">
<!ENTITY % defconflictsDTD SYSTEM "chrome://dia-locale/content/conflicts.dtd">
%defconflictsDTD;
]>

<dialog
id="DownThemAll"
id="DownItAll"
title="&window.title;"
onload="load();"
buttons="accept"
Expand All @@ -28,13 +28,13 @@
ondialogcancel="return false;"
width="460px"
>
<stringbundleset xmlns="http://www.downthemall.net/properties#">
<stringbundle src="chrome://dta/locale/conflicts.properties"/>
<stringbundleset xmlns="http://downitall.realityripple.com/properties#">
<stringbundle src="chrome://dia/locale/conflicts.properties"/>
</stringbundleset>
<script type="application/javascript" src="chrome://dta/content/common/internalFunctions.js"/>
<script type="application/javascript" src="chrome://dia/content/common/internalFunctions.js"/>
<script type="application/javascript" src="conflicts.js"/>

<vbox flex="1" style="padding-left: 35px; background: url('chrome://dta/skin/common/alert.png') no-repeat 0 0;">
<vbox flex="1" style="padding-left: 35px; background: url('chrome://dia/skin/common/alert.png') no-repeat 0 0;">
<description id="text"/>
<description id="question"/>

Expand Down

0 comments on commit 3b64990

Please sign in to comment.