summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorGaming4JC <g4jc@bulletmail.org>2018-05-28 16:03:08 -0400
committerGaming4JC <g4jc@bulletmail.org>2018-05-28 16:03:08 -0400
commitee91e75791ad73fd2bafbd996f5d5c510d197598 (patch)
tree5833124a77247fb41eb0a819d3cab34b37486155 /components
parentc5e716381f12eca6093d8470dca5755ae6a3613c (diff)
downloadiceweasel-uxp-ee91e75791ad73fd2bafbd996f5d5c510d197598.tar.gz
remove sync promos
Diffstat (limited to 'components')
-rw-r--r--components/customizableui/CustomizableWidgets.jsm34
-rw-r--r--components/preferences/in-content/sync.js7
-rw-r--r--components/syncedtabs/SyncedTabsDeckComponent.js10
3 files changed, 0 insertions, 51 deletions
diff --git a/components/customizableui/CustomizableWidgets.jsm b/components/customizableui/CustomizableWidgets.jsm
index 3e00d38..5ee8634 100644
--- a/components/customizableui/CustomizableWidgets.jsm
+++ b/components/customizableui/CustomizableWidgets.jsm
@@ -314,40 +314,6 @@ const CustomizableWidgets = [
obnode.setAttribute("element", "sync-status");
obnode.setAttribute("attribute", "syncstatus");
aNode.appendChild(obnode);
-
- // A somewhat complicated dance to format the mobilepromo label.
- let bundle = doc.getElementById("bundle_browser");
- let formatArgs = ["android", "ios"].map(os => {
- let link = doc.createElement("label");
- link.textContent = bundle.getString(`appMenuRemoteTabs.mobilePromo.${os}`);
- link.setAttribute("mobile-promo-os", os);
- link.className = "text-link remotetabs-promo-link";
- return link.outerHTML;
- });
- let promoParentElt = doc.getElementById("PanelUI-remotetabs-mobile-promo");
- // Put it all together...
- let contents = bundle.getFormattedString("appMenuRemoteTabs.mobilePromo.text2", formatArgs);
- promoParentElt.innerHTML = contents;
- // We manually manage the "click" event to open the promo links because
- // allowing the "text-link" widget handle it has 2 problems: (1) it only
- // supports button 0 and (2) it's tricky to intercept when it does the
- // open and auto-close the panel. (1) can probably be fixed, but (2) is
- // trickier without hard-coding here the knowledge of exactly what buttons
- // it does support.
- // So we allow left and middle clicks to open the link in a new tab and
- // close the panel; not setting a "href" attribute prevents the text-link
- // widget handling it, and we build the final URL in the click handler to
- // make testing easier (ie, so tests can change the pref after the links
- // were created and have the new pref value used.)
- promoParentElt.addEventListener("click", e => {
- let os = e.target.getAttribute("mobile-promo-os");
- if (!os || e.button > 1) {
- return;
- }
- let link = Services.prefs.getCharPref(`identity.mobilepromo.${os}`) + "synced-tabs";
- doc.defaultView.openUILinkIn(link, "tab");
- CustomizableUI.hidePanelForNode(e.target);
- });
},
onViewShowing(aEvent) {
let doc = aEvent.target.ownerDocument;
diff --git a/components/preferences/in-content/sync.js b/components/preferences/in-content/sync.js
index 27f7cd4..eba8d0f 100644
--- a/components/preferences/in-content/sync.js
+++ b/components/preferences/in-content/sync.js
@@ -140,13 +140,6 @@ var gSyncPane = {
return Services.strings.createBundle("chrome://browser/locale/accounts.properties");
});
- let url = Services.prefs.getCharPref("identity.mobilepromo.android") + "sync-preferences";
- document.getElementById("fxaMobilePromo-android").setAttribute("href", url);
- document.getElementById("fxaMobilePromo-android-hasFxaAccount").setAttribute("href", url);
- url = Services.prefs.getCharPref("identity.mobilepromo.ios") + "sync-preferences";
- document.getElementById("fxaMobilePromo-ios").setAttribute("href", url);
- document.getElementById("fxaMobilePromo-ios-hasFxaAccount").setAttribute("href", url);
-
document.getElementById("tosPP-small-ToS").setAttribute("href", gSyncUtils.tosURL);
document.getElementById("tosPP-normal-ToS").setAttribute("href", gSyncUtils.tosURL);
document.getElementById("tosPP-small-PP").setAttribute("href", gSyncUtils.privacyPolicyURL);
diff --git a/components/syncedtabs/SyncedTabsDeckComponent.js b/components/syncedtabs/SyncedTabsDeckComponent.js
index c352777..0d8ca1f 100644
--- a/components/syncedtabs/SyncedTabsDeckComponent.js
+++ b/components/syncedtabs/SyncedTabsDeckComponent.js
@@ -148,16 +148,6 @@ SyncedTabsDeckComponent.prototype = {
.catch(Cu.reportError);
},
- openAndroidLink(event) {
- let href = Services.prefs.getCharPref("identity.mobilepromo.android") + "synced-tabs-sidebar";
- this._openUrl(href, event);
- },
-
- openiOSLink(event) {
- let href = Services.prefs.getCharPref("identity.mobilepromo.ios") + "synced-tabs-sidebar";
- this._openUrl(href, event);
- },
-
_openUrl(url, event) {
this._window.openUILink(url, event);
},