-
Notifications
You must be signed in to change notification settings - Fork 0
/
disable-discoverystream.diff
127 lines (123 loc) · 4.49 KB
/
disable-discoverystream.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
--- a/browser/components/newtab/lib/AboutPreferences.jsm.orig 2021-03-18 13:48:28.000000000 +0000
+++ b/browser/components/newtab/lib/AboutPreferences.jsm 2021-04-18 02:13:56.605573190 +0000
@@ -156,7 +156,6 @@
this.renderPreferences(window, [
...PREFS_BEFORE_SECTIONS(featureConfig),
...sections,
- ...PREFS_AFTER_SECTIONS(featureConfig),
]);
}
@@ -216,6 +215,11 @@
const { feed: name, titleString = {}, descString, nestedPrefs = [] } =
prefData || {};
+ // Remove topstories section entirely
+ if (id === "topstories") {
+ return;
+ }
+
// Don't show any sections that we don't want to expose in preferences UI
if (shouldHidePref) {
return;
@@ -244,19 +248,6 @@
linkPref(checkbox, name, "bool");
- // Specially add a link for stories
- if (id === "topstories") {
- const sponsoredHbox = createAppend("hbox", sectionVbox);
- sponsoredHbox.setAttribute("align", "center");
- sponsoredHbox.appendChild(checkbox);
- checkbox.classList.add("tail-with-learn-more");
-
- const link = createAppend("label", sponsoredHbox, { is: "text-link" });
- link.classList.add("learn-sponsored");
- link.setAttribute("href", sectionData.pref.learnMore.link.href);
- document.l10n.setAttributes(link, sectionData.pref.learnMore.link.id);
- }
-
// Add more details for the section (e.g., description, more prefs)
const detailVbox = createAppend("vbox", sectionVbox);
detailVbox.classList.add("indent");
--- a/browser/components/newtab/lib/SectionsManager.jsm.orig 2020-07-29 22:35:14.254579199 +0000
+++ b/browser/components/newtab/lib/SectionsManager.jsm 2020-07-29 22:35:23.767082702 +0000
@@ -108,14 +108,6 @@
name: "section.highlights.includeDownloads",
titleString: "home-prefs-highlights-option-most-recent-download",
},
- {
- name: "section.highlights.includePocket",
- titleString: "home-prefs-highlights-option-saved-to-pocket",
- hidden: !Services.prefs.getBoolPref(
- "extensions.pocket.enabled",
- true
- ),
- },
],
},
shouldHidePref: false,
--- a/browser/components/newtab/lib/DiscoveryStreamFeed.jsm.orig 2021-10-28 18:03:03.000000000 +0000
+++ b/browser/components/newtab/lib/DiscoveryStreamFeed.jsm 2021-11-06 03:00:17.374753813 +0000
@@ -1884,7 +1884,7 @@
}) => ({
lastUpdate: Date.now(),
spocs: {
- url: "https://spocs.getpocket.com/spocs",
+ url: "",
},
layout: [
{
@@ -1971,7 +1971,7 @@
feed: {
embed_reference: null,
url:
- "https://getpocket.cdn.mozilla.net/v3/firefox/global-recs?version=3&consumer_key=$apiKey&locale_lang=$locale®ion=$region&count=30",
+ "",
},
spocs: {
probability: 1,
@@ -1986,47 +1986,8 @@
properties: {
alignment: "left-align",
links: [
- {
- name: "Self improvement",
- url:
- "https://getpocket.com/explore/self-improvement?utm_source=pocket-newtab",
- },
- {
- name: "Food",
- url:
- "https://getpocket.com/explore/food?utm_source=pocket-newtab",
- },
- {
- name: "Entertainment",
- url:
- "https://getpocket.com/explore/entertainment?utm_source=pocket-newtab",
- },
- {
- name: "Health & fitness",
- url:
- "https://getpocket.com/explore/health?utm_source=pocket-newtab",
- },
- {
- name: "Science",
- url:
- "https://getpocket.com/explore/science?utm_source=pocket-newtab",
- },
- {
- name: "More recommendations ›",
- url: "https://getpocket.com/explore?utm_source=pocket-newtab",
- },
],
extraLinks: [
- {
- name: "Career",
- url:
- "https://getpocket.com/explore/career?utm_source=pocket-newtab",
- },
- {
- name: "Technology",
- url:
- "https://getpocket.com/explore/technology?utm_source=pocket-newtab",
- },
],
privacyNoticeURL: {
url: