From d2a0a16054771b4b0bee38ee7241a976bc1dac75 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 1 Nov 2017 02:42:25 +0100 Subject: Hard-disable the use of sponsored tiles. --- browser/base/content/newtab/customize.js | 17 ++++------------- browser/base/content/newtab/newTab.xhtml | 11 ++--------- 2 files changed, 6 insertions(+), 22 deletions(-) (limited to 'browser/base/content/newtab') diff --git a/browser/base/content/newtab/customize.js b/browser/base/content/newtab/customize.js index 28a52373c..39724fa91 100644 --- a/browser/base/content/newtab/customize.js +++ b/browser/base/content/newtab/customize.js @@ -25,7 +25,6 @@ var gCustomize = { this._nodes.button.addEventListener("click", e => this.showPanel(e)); this._nodes.blank.addEventListener("click", this); this._nodes.classic.addEventListener("click", this); - this._nodes.enhanced.addEventListener("click", this); this._nodes.learn.addEventListener("click", this); this.updateSelected(); @@ -87,11 +86,7 @@ var gCustomize = { sendAsyncMessage("NewTab:Customize", {enabled: false, enhanced: false}); break; case "newtab-customize-classic": - if (this._nodes.enhanced.getAttribute("selected")){ - sendAsyncMessage("NewTab:Customize", {enabled: true, enhanced: true}); - } else { - sendAsyncMessage("NewTab:Customize", {enabled: true, enhanced: false}); - } + sendAsyncMessage("NewTab:Customize", {enabled: true, enhanced: false}); break; case "newtab-customize-enhanced": sendAsyncMessage("NewTab:Customize", {enabled: true, enhanced: !gAllPages.enhanced}); @@ -114,9 +109,9 @@ var gCustomize = { }, updateSelected: function() { - let {enabled, enhanced} = gAllPages; - let selected = enabled ? enhanced ? "enhanced" : "classic" : "blank"; - ["enhanced", "classic", "blank"].forEach(id => { + let {enabled} = gAllPages; + let selected = enabled ? "classic" : "blank"; + ["classic", "blank"].forEach(id => { let node = this._nodes[id]; if (id == selected) { node.setAttribute("selected", true); @@ -125,9 +120,5 @@ var gCustomize = { node.removeAttribute("selected"); } }); - if (selected == "enhanced") { - // If enhanced is selected, so is classic (since enhanced is a subitem of classic) - this._nodes.classic.setAttribute("selected", true); - } }, }; diff --git a/browser/base/content/newtab/newTab.xhtml b/browser/base/content/newtab/newTab.xhtml index 07fb0093e..eef51b4b2 100644 --- a/browser/base/content/newtab/newTab.xhtml +++ b/browser/base/content/newtab/newTab.xhtml @@ -33,15 +33,8 @@
- -
-
- -
-
- - -
+
+
-- cgit v1.2.3