summaryrefslogtreecommitdiffstats
path: root/browser/base/content/newtab
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2017-11-01 02:42:25 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-03-13 17:12:06 +0100
commitd2a0a16054771b4b0bee38ee7241a976bc1dac75 (patch)
tree389ca64ef50ada1fe4a7f37b1bd852d2487c82ae /browser/base/content/newtab
parent240ba54a429c943c45ea87ca0bc4712610c8460f (diff)
downloadUXP-d2a0a16054771b4b0bee38ee7241a976bc1dac75.tar
UXP-d2a0a16054771b4b0bee38ee7241a976bc1dac75.tar.gz
UXP-d2a0a16054771b4b0bee38ee7241a976bc1dac75.tar.lz
UXP-d2a0a16054771b4b0bee38ee7241a976bc1dac75.tar.xz
UXP-d2a0a16054771b4b0bee38ee7241a976bc1dac75.zip
Hard-disable the use of sponsored tiles.
Diffstat (limited to 'browser/base/content/newtab')
-rw-r--r--browser/base/content/newtab/customize.js17
-rw-r--r--browser/base/content/newtab/newTab.xhtml11
2 files changed, 6 insertions, 22 deletions
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 @@
<div id="newtab-customize-title" class="newtab-customize-panel-item">
<label>&newtab.customize.cog.title2;</label>
</div>
-
- <div class="newtab-customize-complex-option">
- <div id="newtab-customize-classic" class="newtab-customize-panel-superitem newtab-customize-panel-item selectable">
- <label>&newtab.customize.classic;</label>
- </div>
- <div id="newtab-customize-enhanced" class="newtab-customize-panel-subitem">
- <label class="checkbox"></label>
- <label>&newtab.customize.cog.enhanced;</label>
- </div>
+ <div id="newtab-customize-classic" class="newtab-customize-panel-item selectable">
+ <label>&newtab.customize.classic;</label>
</div>
<div id="newtab-customize-blank" class="newtab-customize-panel-item selectable">
<label>&newtab.customize.blank2;</label>