From 4fb11cd5966461bccc3ed1599b808237be6b0de9 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Sat, 10 Feb 2018 02:49:12 -0500 Subject: Move WebExtensions enabled Add-ons Manager --- .../mozapps/webextensions/content/extensions.xml | 2008 ++++++++++++++++++++ 1 file changed, 2008 insertions(+) create mode 100644 toolkit/mozapps/webextensions/content/extensions.xml (limited to 'toolkit/mozapps/webextensions/content/extensions.xml') diff --git a/toolkit/mozapps/webextensions/content/extensions.xml b/toolkit/mozapps/webextensions/content/extensions.xml new file mode 100644 index 000000000..b49645cf0 --- /dev/null +++ b/toolkit/mozapps/webextensions/content/extensions.xml @@ -0,0 +1,2008 @@ + + + + + +%extensionsDTD; +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + i); + ]]> + + + + + + + + + + + + this._updateStars(); + + + + + + + + + + + + + + + + + + + + + + + + + + + document.getAnonymousElementByAttribute(this, "anonid", "progress"); + + + document.getAnonymousElementByAttribute(this, "anonid", "cancel-btn"); + + + document.getAnonymousElementByAttribute(this, "anonid", "status"); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + null + + document.getAnonymousElementByAttribute(this, "anonid", "name-btn"); + + + document.getAnonymousElementByAttribute(this, "anonid", "date-btn"); + + + document.getAnonymousElementByAttribute(this, "anonid", "price-btn"); + + + document.getAnonymousElementByAttribute(this, "anonid", "relevance-btn"); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + = 0); + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + document.getAnonymousElementByAttribute(this, "anonid", "label"); + + + document.getAnonymousElementByAttribute(this, "anonid", "creator-link"); + + + document.getAnonymousElementByAttribute(this, "anonid", "creator-name"); + + + + + + + + + + + + + + + + + + + + + + + + + document.getAnonymousElementByAttribute(this, "anonid", "message"); + + + document.getAnonymousElementByAttribute(this, "anonid", "progress"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "purchase-remote-btn"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "install-remote-btn"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "restart-needed"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "undo-btn"); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + document.getAnonymousElementByAttribute(this, "anonid", + "warning-container"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "warning"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "warning-link"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "warning-btn"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "error-container"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "error"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "error-link"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "pending-container"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "pending"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "info-container"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "info"); + + + document.getAnonymousElementByAttribute(this, "anonid", "experiment-state"); + + + document.getAnonymousElementByAttribute(this, "anonid", "experiment-time"); + + + document.getAnonymousElementByAttribute(this, "anonid", "icon"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "date-updated"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "description"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "state-menulist"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "ask-to-activate-menuitem"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "always-activate-menuitem"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "never-activate-menuitem"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "preferences-btn"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "enable-btn"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "disable-btn"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "remove-btn"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "update-btn"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "control-container"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "install-status"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "checking-update"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "update-available"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "include-update"); + + false + + document.getAnonymousElementByAttribute(this, "anonid", + "relnotes-toggle-btn"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "relnotes-loading"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "relnotes-error"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "relnotes-container"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "relnotes"); + + + + + + + + + + + + + + + { + // This can return after the binding has been destroyed, + // so try to detect that and return early + if (!("onNewInstall" in this)) + return; + for (let install of aInstallsList) { + if (install.existingAddon && + install.existingAddon.id == this.mAddon.id && + install.state == AddonManager.STATE_AVAILABLE) { + this.onNewInstall(install); + this.onIncludeUpdateChanged(); + } + } + }); + } + ]]> + + + + + + + + + + + + + this.hasPermission(perm)); + this._stateMenulist.disabled = !hasActivatePermission; + this._stateMenulist.hidden = false; + this._stateMenulist.classList.add('no-auto-hide'); + } else { + this._stateMenulist.hidden = true; + + let enableTooltip = gViewController.commands["cmd_enableItem"] + .getTooltip(this.mAddon); + this._enableBtn.setAttribute("tooltiptext", enableTooltip); + if (this.hasPermission("enable")) { + this._enableBtn.hidden = false; + } else { + this._enableBtn.hidden = true; + } + + let disableTooltip = gViewController.commands["cmd_disableItem"] + .getTooltip(this.mAddon); + this._disableBtn.setAttribute("tooltiptext", disableTooltip); + if (this.hasPermission("disable")) { + this._disableBtn.hidden = false; + } else { + this._disableBtn.hidden = true; + } + } + + let uninstallTooltip = gViewController.commands["cmd_uninstallItem"] + .getTooltip(this.mAddon); + this._removeBtn.setAttribute("tooltiptext", uninstallTooltip); + if (this.hasPermission("uninstall")) { + this._removeBtn.hidden = false; + } else { + this._removeBtn.hidden = true; + } + + this.setAttribute("active", this.mAddon.isActive); + + var showProgress = this.mAddon.purchaseURL || (this.mAddon.install && + this.mAddon.install.state != AddonManager.STATE_INSTALLED); + this._showStatus(showProgress ? "progress" : "none"); + + if (this.mAddon.type == "experiment") { + this.removeAttribute("notification"); + let prefix = "experiment."; + let active = this.mAddon.isActive; + + if (!showProgress) { + let stateKey = prefix + "state." + (active ? "active" : "complete"); + this._experimentState.value = gStrings.ext.GetStringFromName(stateKey); + + let now = Date.now(); + let end = this.endDate; + let days = Math.abs(end - now) / (24 * 60 * 60 * 1000); + + let timeKey = prefix + "time."; + let timeMessage; + + if (days < 1) { + timeKey += (active ? "endsToday" : "endedToday"); + timeMessage = gStrings.ext.GetStringFromName(timeKey); + } else { + timeKey += (active ? "daysRemaining" : "daysPassed"); + days = Math.round(days); + let timeString = gStrings.ext.GetStringFromName(timeKey); + timeMessage = PluralForm.get(days, timeString) + .replace("#1", days); + } + + this._experimentTime.value = timeMessage; + } + } + ]]> + + + + + { + var event = document.createEvent("Events"); + event.initEvent("RelNotesToggle", true, true); + this.dispatchEvent(event); + } + + let showRelNotes = () => { + if (!relNotesData || !transformData) + return; + + this._relNotesLoading.hidden = true; + + var processor = Components.classes["@mozilla.org/document-transformer;1?type=xslt"] + .createInstance(Components.interfaces.nsIXSLTProcessor); + processor.flags |= Components.interfaces.nsIXSLTProcessorPrivate.DISABLE_ALL_LOADS; + + processor.importStylesheet(transformData); + var fragment = processor.transformToFragment(relNotesData, document); + this._relNotes.appendChild(fragment); + if (this.hasAttribute("show-relnotes")) { + var container = this._relNotesContainer; + container.style.height = container.scrollHeight + "px"; + } + sendToggleEvent(); + } + + let handleError = () => { + dataReq.abort(); + styleReq.abort(); + this._relNotesLoading.hidden = true; + this._relNotesError.hidden = false; + this._relNotesLoaded = false; // allow loading to be re-tried + sendToggleEvent(); + } + + function handleResponse(aEvent) { + var req = aEvent.target; + var ct = req.getResponseHeader("content-type"); + if ((!ct || ct.indexOf("text/html") < 0) && + req.responseXML && + req.responseXML.documentElement.namespaceURI != XMLURI_PARSE_ERROR) { + if (req == dataReq) + relNotesData = req.responseXML; + else + transformData = req.responseXML; + showRelNotes(); + } else { + handleError(); + } + } + + var dataReq = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"] + .createInstance(Components.interfaces.nsIXMLHttpRequest); + dataReq.open("GET", aURI.spec, true); + dataReq.responseType = "document"; + dataReq.addEventListener("load", handleResponse, false); + dataReq.addEventListener("error", handleError, false); + dataReq.send(null); + + var styleReq = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"] + .createInstance(Components.interfaces.nsIXMLHttpRequest); + styleReq.open("GET", UPDATES_RELEASENOTES_TRANSFORMFILE, true); + styleReq.responseType = "document"; + styleReq.addEventListener("load", handleResponse, false); + styleReq.addEventListener("error", handleError, false); + styleReq.send(null); + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + document.getAnonymousElementByAttribute(this, "anonid", "notice"); + + + document.getAnonymousElementByAttribute(this, "anonid", "restart-btn"); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + document.getAnonymousElementByAttribute(this, "anonid", "icon"); + + + document.getAnonymousElementByAttribute(this, "anonid", "name"); + + + document.getAnonymousElementByAttribute(this, "anonid", "warning"); + + + document.getAnonymousElementByAttribute(this, "anonid", "warning-link"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "install-status"); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3