From 4f8bf590850eb72dc95a2c83b7cb78f03ef67f49 Mon Sep 17 00:00:00 2001 From: Georg Koppen Date: Fri, 18 Jan 2019 09:18:26 +0000 Subject: [PATCH] Bug 29035: Post-YE campaign clean-up 2018 Removing the newsletter signup banner --- src/chrome/content/aboutTor/aboutTor-content.js | 21 ------- src/chrome/content/aboutTor/aboutTor.xhtml | 13 ----- src/chrome/content/torbutton.js | 17 ------ src/chrome/skin/aboutTor.css | 72 ------------------------ src/chrome/skin/newsletter_3x.png | Bin 6735 -> 0 bytes src/defaults/preferences/preferences.js | 1 - 6 files changed, 124 deletions(-) delete mode 100644 src/chrome/skin/newsletter_3x.png diff --git a/src/chrome/content/aboutTor/aboutTor-content.js b/src/chrome/content/aboutTor/aboutTor-content.js index e2167de0..94ecefe5 100644 --- a/src/chrome/content/aboutTor/aboutTor-content.js +++ b/src/chrome/content/aboutTor/aboutTor-content.js @@ -24,7 +24,6 @@ let { bindPrefAndInit, show_torbrowser_manual } = Cu.import("resource://torbutto var AboutTorListener = { kAboutTorLoadedMessage: "AboutTor:Loaded", kAboutTorChromeDataMessage: "AboutTor:ChromeData", - kAboutTorHideTorNewsBanner: "AboutTor:HideTorNewsBanner", get isAboutTor() { return content.document.documentURI.toLowerCase() == "about:tor"; @@ -59,24 +58,6 @@ var AboutTorListener = { } }, - setupBannerClosing: function () { - let that = this; - let closer = content.document.getElementById("tornews-banner-closer"); - closer.addEventListener("click", function () { - sendAsyncMessage(that.kAboutTorHideTorNewsBanner); - }); - let link = content.document.querySelector("#tornews-banner-message a"); - link.addEventListener("click", function () { - // Wait until page unloads so we don't hide banner before that. - content.addEventListener("unload", function () { - sendAsyncMessage(that.kAboutTorHideTorNewsBanner); - }); - }); - bindPrefAndInit("extensions.torbutton.tornews_banner_countdown", - countdown => content.document.body.setAttribute( - "show-tornews-banner", countdown > 0)); - }, - onPageLoad: function() { // Arrange to update localized text and links. bindPrefAndInit("intl.locale.requested", aNewVal => { @@ -85,8 +66,6 @@ var AboutTorListener = { } }); - this.setupBannerClosing(); - // Add message and event listeners. addMessageListener(this.kAboutTorChromeDataMessage, this); addEventListener("pagehide", this, false); diff --git a/src/chrome/content/aboutTor/aboutTor.xhtml b/src/chrome/content/aboutTor/aboutTor.xhtml index a34d0220..5ddf6ab9 100644 --- a/src/chrome/content/aboutTor/aboutTor.xhtml +++ b/src/chrome/content/aboutTor/aboutTor.xhtml @@ -32,19 +32,6 @@ window.addEventListener("pageshow", function() { -
-
-
-
-
&aboutTor.newsletter.tagline; - - &aboutTor.newsletter.link_text; - -
-
-
×
-
-
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js index dc8d9d97..f99be5b0 100644 --- a/src/chrome/content/torbutton.js +++ b/src/chrome/content/torbutton.js @@ -17,7 +17,6 @@ const k_tb_last_browser_version_pref = "extensions.torbutton.lastBrowserVersion" const k_tb_browser_update_needed_pref = "extensions.torbutton.updateNeeded"; const k_tb_last_update_check_pref = "extensions.torbutton.lastUpdateCheck"; const k_tb_tor_check_failed_topic = "Torbutton:TorCheckFailed"; -const k_tb_tornews_banner_countdown = "extensions.torbutton.tornews_banner_countdown"; var m_tb_prefs = Services.prefs; @@ -222,14 +221,6 @@ function torbutton_init_toolbutton() } } -// Show the Sign Up for Tor News banner a finite number of times. -function torbutton_tornews_banner_countdown() { - let count = m_tb_prefs.getIntPref(k_tb_tornews_banner_countdown, 0); - if (count > 0) { - m_tb_prefs.setIntPref(k_tb_tornews_banner_countdown, count - 1); - } -} - function torbutton_is_mobile() { return Services.appinfo.OS === "Android"; } @@ -342,10 +333,6 @@ function torbutton_init() { // Add about:tor IPC message listener. window.messageManager.addMessageListener("AboutTor:Loaded", torbutton_abouttor_message_handler); - window.messageManager.addMessageListener("AboutTor:HideTorNewsBanner", - torbutton_abouttor_message_handler); - - torbutton_tornews_banner_countdown(); setupPreferencesForMobile(); @@ -433,10 +420,6 @@ var torbutton_abouttor_message_handler = { aMessage.target.messageManager.sendAsyncMessage("AboutTor:ChromeData", this.chromeData); break; - case "AboutTor:HideTorNewsBanner": - torbutton_log(5, "message AboutTor:HideTorNewsBanner received"); - m_tb_prefs.setIntPref(k_tb_tornews_banner_countdown, 0); - break; } }, diff --git a/src/chrome/skin/aboutTor.css b/src/chrome/skin/aboutTor.css index 8560124b..982b147a 100644 --- a/src/chrome/skin/aboutTor.css +++ b/src/chrome/skin/aboutTor.css @@ -282,78 +282,6 @@ body:not([showmanual]) .showForManual { border-radius: 50px 50px 0 0; } -/* Tor News Signup Banner - * While this banner is present, we need to - * offset the elements normally at the top of - * the window. - */ - -#tornews-banner { - display: flex; - align-items: center; - background-color: white; - color: var(--abouttor-bg-toron-color); - font-size: 16px; - height: 60px; - justify-content: space-between; - left: 0px; - right: 0px; - top: 0px; - transform: translateY(-60px); - transition: transform 200ms; -} - -body[show-tornews-banner="true"] #tornews-banner { - transform: translateY(0px); - transition: transform 0ms; -} - -#tornews-banner-message { - align-items: center; - display: flex; - justify-content: center; -} - -#tornews-banner-message a { - color: var(--abouttor-bg-toron-color); -} - -#tornews-banner-icon { - background: url('chrome://torbutton/skin/newsletter_3x.png') no-repeat center center; - background-size: cover; - height: 32px; - margin: 0px 16px; - width: 32px; -} - -#tornews-banner-closer { - display: flex; - align-items: center; - font-size: 20px; - height: 22px; - justify-content: center; - margin: 4px 20px; - padding: 4px; - width: 22px; - -moz-user-select: none; -} - -#tornews-banner-closer:hover { - background-color: gray; - cursor: pointer; -} - -body[show-tornews-banner="false"] #torstatus-version, -body[show-tornews-banner="false"] #onboarding-overlay-button { - transition: transform 200ms; -} - -body[show-tornews-banner="true"] #torstatus-version, -body[show-tornews-banner="true"] #onboarding-overlay-button { - transform: translateY(60px); - transition: transform 0ms; -} - /* * Mobile specific css */ diff --git a/src/chrome/skin/newsletter_3x.png b/src/chrome/skin/newsletter_3x.png deleted file mode 100644 index 821572fa2cdf7970f34da28a68f5d37381fb0cc1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 6735 zcwPZd8nESwP)g6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