newtab.patch 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370
  1. diff --git a/browser/components/newtab/content-src/components/Base/Base.jsx b/browser/components/newtab/content-src/components/Base/Base.jsx
  2. index 4166267..9959f99 100644
  3. --- a/browser/components/newtab/content-src/components/Base/Base.jsx
  4. +++ b/browser/components/newtab/content-src/components/Base/Base.jsx
  5. @@ -144,6 +144,7 @@ export class BaseContent extends React.PureComponent {
  6. <div>
  7. <div className={outerClassName}>
  8. <main>
  9. + <a href="https://www.parabola.nu"><div id="iceweasel-logo-div"></div></a>
  10. {prefs.showSearch &&
  11. <div className="non-collapsible-section">
  12. <ErrorBoundary>
  13. diff --git a/browser/components/newtab/content-src/components/Base/_Base.scss b/browser/components/newtab/content-src/components/Base/_Base.scss
  14. index 1d21362..9cdf875 100644
  15. --- a/browser/components/newtab/content-src/components/Base/_Base.scss
  16. +++ b/browser/components/newtab/content-src/components/Base/_Base.scss
  17. @@ -119,3 +119,9 @@ main {
  18. }
  19. }
  20. }
  21. +
  22. +#iceweasel-logo-div
  23. +{
  24. + width: 100% ; height: 130px ;
  25. + background: url(../../../data/content/assets/iceweasel_logo.svg) bottom center no-repeat ;
  26. +}
  27. diff --git a/browser/components/newtab/css/activity-stream-linux.css b/browser/components/newtab/css/activity-stream-linux.css
  28. index cd46f8c..3b1264f 100644
  29. --- a/browser/components/newtab/css/activity-stream-linux.css
  30. +++ b/browser/components/newtab/css/activity-stream-linux.css
  31. @@ -440,6 +440,11 @@ main {
  32. .prefs-button button:active {
  33. background-color: var(--newtab-element-active-color); }
  34. +#iceweasel-logo-div {
  35. + width: 100%;
  36. + height: 130px;
  37. + background: url(../../../data/content/assets/iceweasel_logo.svg) bottom center no-repeat; }
  38. +
  39. .as-error-fallback {
  40. align-items: center;
  41. border-radius: 3px;
  42. diff --git a/browser/components/newtab/css/activity-stream-mac.css b/browser/components/newtab/css/activity-stream-mac.css
  43. index ed8a132..7fc8d48 100644
  44. --- a/browser/components/newtab/css/activity-stream-mac.css
  45. +++ b/browser/components/newtab/css/activity-stream-mac.css
  46. @@ -443,6 +443,11 @@ main {
  47. .prefs-button button:active {
  48. background-color: var(--newtab-element-active-color); }
  49. +#iceweasel-logo-div {
  50. + width: 100%;
  51. + height: 130px;
  52. + background: url(../../../data/content/assets/iceweasel_logo.svg) bottom center no-repeat; }
  53. +
  54. .as-error-fallback {
  55. align-items: center;
  56. border-radius: 3px;
  57. diff --git a/browser/components/newtab/css/activity-stream-windows.css b/browser/components/newtab/css/activity-stream-windows.css
  58. index bd9529f..5916797 100644
  59. --- a/browser/components/newtab/css/activity-stream-windows.css
  60. +++ b/browser/components/newtab/css/activity-stream-windows.css
  61. @@ -440,6 +440,11 @@ main {
  62. .prefs-button button:active {
  63. background-color: var(--newtab-element-active-color); }
  64. +#iceweasel-logo-div {
  65. + width: 100%;
  66. + height: 130px;
  67. + background: url(../../../data/content/assets/iceweasel_logo.svg) bottom center no-repeat; }
  68. +
  69. .as-error-fallback {
  70. align-items: center;
  71. border-radius: 3px;
  72. diff --git a/browser/components/newtab/data/content/activity-stream.bundle.js b/browser/components/newtab/data/content/activity-stream.bundle.js
  73. index 16206f3..455c4cf 100644
  74. --- a/browser/components/newtab/data/content/activity-stream.bundle.js
  75. +++ b/browser/components/newtab/data/content/activity-stream.bundle.js
  76. @@ -734,7 +734,11 @@ class BaseContent extends react__WEBPACK_IMPORTED_MODULE_8___default.a.PureCompo
  77. const outerClassName = ["outer-wrapper", isDiscoveryStream && "ds-outer-wrapper-search-alignment", isDiscoveryStream && "ds-outer-wrapper-breakpoint-override", prefs.showSearch && this.state.fixedSearch && !noSectionsEnabled && "fixed-search", prefs.showSearch && noSectionsEnabled && "only-search"].filter(v => v).join(" ");
  78. return react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", {
  79. className: outerClassName
  80. - }, react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("main", null, prefs.showSearch && react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", {
  81. + }, react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("main", null, react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("a", {
  82. + href: "https://www.parabola.nu"
  83. + }, react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", {
  84. + id: "iceweasel-logo-div"
  85. + })), prefs.showSearch && react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", {
  86. className: "non-collapsible-section"
  87. }, react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(content_src_components_ErrorBoundary_ErrorBoundary__WEBPACK_IMPORTED_MODULE_7__["ErrorBoundary"], null, react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(content_src_components_Search_Search__WEBPACK_IMPORTED_MODULE_9__["Search"], _extends({
  88. showLogo: false,
  89. diff --git a/browser/components/newtab/data/content/tippytop/top_sites.json b/browser/components/newtab/data/content/tippytop/top_sites.json
  90. index 20d5472..de827de 100644
  91. --- a/browser/components/newtab/data/content/tippytop/top_sites.json
  92. +++ b/browser/components/newtab/data/content/tippytop/top_sites.json
  93. @@ -1,107 +1,42 @@
  94. [
  95. {
  96. - "title": "aliexpress",
  97. - "url": "https://www.aliexpress.com/",
  98. - "image_url": "aliexpress-com@2x.png"
  99. + "title": "parabola",
  100. + "url": "https://www.parabola.nu/",
  101. + "image_url": "parabola-gnu-freedood.png"
  102. },
  103. {
  104. - "title": "allegro",
  105. - "url": "https://www.allegro.pl/",
  106. - "image_url": "allegro-pl@2x.png"
  107. + "title": "gnu",
  108. + "url": "https://www.gnu.org/",
  109. + "image_url": "gnu-logo.png"
  110. },
  111. {
  112. - "title": "amazon",
  113. - "urls": ["https://www.amazon.ca/", "https://www.amazon.co.uk/", "https://www.amazon.com/", "https://www.amazon.de/", "https://www.amazon.fr/"],
  114. - "image_url": "amazon@2x.png"
  115. + "title": "fsf",
  116. + "url": "https://www.fsf.org/",
  117. + "image_url": "fsf-logo.png"
  118. },
  119. {
  120. - "title": "avito",
  121. - "url": "https://www.avito.ru/",
  122. - "image_url": "avito-ru@2x.png"
  123. + "title": "libreplanet",
  124. + "url": "https://libreplanet.org/",
  125. + "image_url": "libreplanet-logo.png"
  126. },
  127. {
  128. "title": "baidu",
  129. "url": "https://www.baidu.com/",
  130. "image_url": "baidu-com@2x.png"
  131. },
  132. - {
  133. - "title": "bbc",
  134. - "url": "https://www.bbc.co.uk/",
  135. - "image_url": "bbc-uk@2x.png"
  136. - },
  137. - {
  138. - "title": "bing",
  139. - "url": "https://www.bing.com/",
  140. - "image_url": "bing-com@2x.png"
  141. - },
  142. {
  143. "title": "duckduckgo",
  144. "url": "https://www.duckduckgo.com/",
  145. "image_url": "duckduckgo-com@2x.png"
  146. },
  147. - {
  148. - "title": "ebay",
  149. - "urls": ["https://www.ebay.com", "https://www.ebay.co.uk/", "https://ebay.de"],
  150. - "image_url": "ebay@2x.png"
  151. - },
  152. - {
  153. - "title": "facebook",
  154. - "url": "https://www.facebook.com/",
  155. - "image_url": "facebook-com@2x.png"
  156. - },
  157. - {
  158. - "title": "google",
  159. - "url": "https://www.google.com/",
  160. - "image_url": "google-com@2x.png"
  161. - },
  162. - {
  163. - "title": "leboncoin",
  164. - "url": "http://www.leboncoin.fr/",
  165. - "image_url": "leboncoin-fr@2x.png"
  166. - },
  167. - {
  168. - "title": "ok",
  169. - "url": "https://www.ok.ru/",
  170. - "image_url": "ok-ru@2x.png"
  171. - },
  172. - {
  173. - "title": "olx",
  174. - "url": "https://www.olx.pl/",
  175. - "image_url": "olx-pl@2x.png"
  176. - },
  177. - {
  178. - "title": "reddit",
  179. - "url": "https://www.reddit.com/",
  180. - "image_url": "reddit-com@2x.png"
  181. - },
  182. - {
  183. - "title": "twitter",
  184. - "url": "https://twitter.com/",
  185. - "image_url": "twitter-com@2x.png"
  186. - },
  187. - {
  188. - "title": "vk",
  189. - "url": "https://vk.com/",
  190. - "image_url": "vk-com@2x.png"
  191. - },
  192. {
  193. "title": "wikipedia",
  194. "url": "https://www.wikipedia.org/",
  195. "image_url": "wikipedia-org@2x.png"
  196. },
  197. - {
  198. - "title": "wykop",
  199. - "url": "https://www.wykop.pl/",
  200. - "image_url": "wykop-pl@2x.png"
  201. - },
  202. {
  203. "title": "yandex",
  204. "url": "https://www.yandex.com/",
  205. "image_url": "yandex-com@2x.png"
  206. - },
  207. - {
  208. - "title": "youtube",
  209. - "url": "https://www.youtube.com/",
  210. - "image_url": "youtube-com@2x.png"
  211. }
  212. ]
  213. diff --git a/browser/components/newtab/lib/ActivityStream.jsm b/browser/components/newtab/lib/ActivityStream.jsm
  214. index 080cfa6..c059a10 100644
  215. --- a/browser/components/newtab/lib/ActivityStream.jsm
  216. +++ b/browser/components/newtab/lib/ActivityStream.jsm
  217. @@ -21,7 +21,6 @@ const {PlacesFeed} = ChromeUtils.import("resource://activity-stream/lib/PlacesFe
  218. const {PrefsFeed} = ChromeUtils.import("resource://activity-stream/lib/PrefsFeed.jsm");
  219. const {Store} = ChromeUtils.import("resource://activity-stream/lib/Store.jsm");
  220. const {SystemTickFeed} = ChromeUtils.import("resource://activity-stream/lib/SystemTickFeed.jsm");
  221. -const {TelemetryFeed} = ChromeUtils.import("resource://activity-stream/lib/TelemetryFeed.jsm");
  222. const {FaviconFeed} = ChromeUtils.import("resource://activity-stream/lib/FaviconFeed.jsm");
  223. const {TopSitesFeed} = ChromeUtils.import("resource://activity-stream/lib/TopSitesFeed.jsm");
  224. const {TopStoriesFeed} = ChromeUtils.import("resource://activity-stream/lib/TopStoriesFeed.jsm");
  225. @@ -31,14 +30,7 @@ const {DiscoveryStreamFeed} = ChromeUtils.import("resource://activity-stream/lib
  226. const DEFAULT_SITES = new Map([
  227. // This first item is the global list fallback for any unexpected geos
  228. - ["", "https://www.youtube.com/,https://www.facebook.com/,https://www.wikipedia.org/,https://www.reddit.com/,https://www.amazon.com/,https://twitter.com/"],
  229. - ["US", "https://www.youtube.com/,https://www.facebook.com/,https://www.amazon.com/,https://www.reddit.com/,https://www.wikipedia.org/,https://twitter.com/"],
  230. - ["CA", "https://www.youtube.com/,https://www.facebook.com/,https://www.reddit.com/,https://www.wikipedia.org/,https://www.amazon.ca/,https://twitter.com/"],
  231. - ["DE", "https://www.youtube.com/,https://www.facebook.com/,https://www.amazon.de/,https://www.ebay.de/,https://www.wikipedia.org/,https://www.reddit.com/"],
  232. - ["PL", "https://www.youtube.com/,https://www.facebook.com/,https://allegro.pl/,https://www.wikipedia.org/,https://www.olx.pl/,https://www.wykop.pl/"],
  233. - ["RU", "https://vk.com/,https://www.youtube.com/,https://ok.ru/,https://www.avito.ru/,https://www.aliexpress.com/,https://www.wikipedia.org/"],
  234. - ["GB", "https://www.youtube.com/,https://www.facebook.com/,https://www.reddit.com/,https://www.amazon.co.uk/,https://www.bbc.co.uk/,https://www.ebay.co.uk/"],
  235. - ["FR", "https://www.youtube.com/,https://www.facebook.com/,https://www.wikipedia.org/,https://www.amazon.fr/,https://www.leboncoin.fr/,https://twitter.com/"],
  236. + ["", "https://www.parabola.nu/,https://www.gnu.org/,https://www.fsf.org/,https://libreplanet.org/"]
  237. ]);
  238. const GEO_PREF = "browser.search.region";
  239. const SPOCS_GEOS = ["US"];
  240. @@ -65,10 +57,10 @@ const PREFS_CONFIG = new Map([
  241. hidden: !PREFS_CONFIG.get("feeds.section.topstories").getValue(args),
  242. provider_icon: "pocket",
  243. provider_name: "Pocket",
  244. - read_more_endpoint: "https://getpocket.com/explore/trending?src=fx_new_tab",
  245. - stories_endpoint: `https://getpocket.cdn.mozilla.net/v3/firefox/global-recs?version=3&consumer_key=$apiKey&locale_lang=${args.locale}&feed_variant=${showSpocs(args) ? "default_spocs_on" : "default_spocs_off"}`,
  246. - stories_referrer: "https://getpocket.com/recommendations",
  247. - topics_endpoint: `https://getpocket.cdn.mozilla.net/v3/firefox/trending-topics?version=2&consumer_key=$apiKey&locale_lang=${args.locale}`,
  248. + read_more_endpoint: "https://parabola.nu/feeds.section.topstories.options",
  249. + stories_endpoint: `https://parabola.nu/feeds.section.topstories.options`,
  250. + stories_referrer: "https://parabola.nu/feeds.section.topstories.options",
  251. + topics_endpoint: `https://parabola.nu/feeds.section.topstories.options`,
  252. model_keys: ["nmf_model_animals", "nmf_model_business", "nmf_model_career", "nmf_model_datascience", "nmf_model_design", "nmf_model_education", "nmf_model_entertainment", "nmf_model_environment", "nmf_model_fashion", "nmf_model_finance", "nmf_model_food", "nmf_model_health", "nmf_model_home", "nmf_model_life", "nmf_model_marketing", "nmf_model_politics", "nmf_model_programming", "nmf_model_science", "nmf_model_shopping", "nmf_model_sports", "nmf_model_tech", "nmf_model_travel", "nb_model_animals", "nb_model_books", "nb_model_business", "nb_model_career", "nb_model_datascience", "nb_model_design", "nb_model_economics", "nb_model_education", "nb_model_entertainment", "nb_model_environment", "nb_model_fashion", "nb_model_finance", "nb_model_food", "nb_model_game", "nb_model_health", "nb_model_history", "nb_model_home", "nb_model_life", "nb_model_marketing", "nb_model_military", "nb_model_philosophy", "nb_model_photography", "nb_model_politics", "nb_model_productivity", "nb_model_programming", "nb_model_psychology", "nb_model_science", "nb_model_shopping", "nb_model_society", "nb_model_space", "nb_model_sports", "nb_model_tech", "nb_model_travel", "nb_model_writing"],
  253. show_spocs: showSpocs(args),
  254. personalized: true,
  255. @@ -77,7 +69,7 @@ const PREFS_CONFIG = new Map([
  256. }],
  257. ["showSponsored", {
  258. title: "Show sponsored cards in spoc experiment (show_spocs in topstories.options has to be set to true as well)",
  259. - value: true,
  260. + value: false,
  261. }],
  262. ["pocketCta", {
  263. title: "Pocket cta and button for logged out users.",
  264. @@ -102,7 +94,7 @@ const PREFS_CONFIG = new Map([
  265. }],
  266. ["feeds.snippets", {
  267. title: "Show snippets on activity stream",
  268. - value: true,
  269. + value: false,
  270. }],
  271. ["topSitesRows", {
  272. title: "Number of rows of Top Sites to display",
  273. @@ -110,26 +102,26 @@ const PREFS_CONFIG = new Map([
  274. }],
  275. ["telemetry", {
  276. title: "Enable system error and usage data collection",
  277. - value: true,
  278. + value: false,
  279. value_local_dev: false,
  280. }],
  281. ["telemetry.ut.events", {
  282. title: "Enable Unified Telemetry event data collection",
  283. - value: AppConstants.EARLY_BETA_OR_EARLIER,
  284. + value: false,
  285. value_local_dev: false,
  286. }],
  287. ["telemetry.structuredIngestion", {
  288. title: "Enable Structured Ingestion Telemetry data collection",
  289. - value: true,
  290. + value: false,
  291. value_local_dev: false,
  292. }],
  293. ["telemetry.structuredIngestion.endpoint", {
  294. title: "Structured Ingestion telemetry server endpoint",
  295. - value: "https://incoming.telemetry.mozilla.org/submit/activity-stream",
  296. + value: "https://parabola.nu/telemetry.structuredIngestion.endpoint",
  297. }],
  298. ["telemetry.ping.endpoint", {
  299. title: "Telemetry server endpoint",
  300. - value: "https://tiles.services.mozilla.com/v4/links/activity-stream",
  301. + value: "https://parabola.nu/telemetry.ping.endpoint",
  302. }],
  303. ["section.highlights.includeVisited", {
  304. title: "Boolean flag that decides whether or not to show visited pages in highlights.",
  305. @@ -176,10 +168,7 @@ const PREFS_CONFIG = new Map([
  306. } else if (["BY", "KZ", "RU", "TR"].includes(geo)) {
  307. searchShortcuts.push("yandex");
  308. } else {
  309. - searchShortcuts.push("google");
  310. - }
  311. - if (["DE", "FR", "GB", "IT", "JP", "US"].includes(geo)) {
  312. - searchShortcuts.push("amazon");
  313. + searchShortcuts.push("duckduckgo");
  314. }
  315. return searchShortcuts.join(",");
  316. },
  317. @@ -238,13 +227,13 @@ const PREFS_CONFIG = new Map([
  318. hardcoded_layout: true,
  319. personalized: false,
  320. // This is currently an exmple layout used for dev purposes.
  321. - layout_endpoint: "https://getpocket.cdn.mozilla.net/v3/newtab/layout?version=1&consumer_key=$apiKey&layout_variant=basic",
  322. + layout_endpoint: "https://parabola.nu/extensions.pocket.oAuthConsumerKey",
  323. });
  324. },
  325. }],
  326. ["discoverystream.endpoints", {
  327. title: "Endpoint prefixes (comma-separated) that are allowed to be requested",
  328. - value: "https://getpocket.cdn.mozilla.net/",
  329. + value: "https://parabola.nu/discoverystream.endpoints",
  330. }],
  331. ["discoverystream.spoc.impressions", {
  332. title: "Track spoc impressions",
  333. @@ -307,7 +296,7 @@ const FEEDS_DATA = [
  334. "CA": ["en-CA", "en-GB", "en-US", "en-ZA"],
  335. "DE": ["de", "de-DE", "de-AT", "de-CH"],
  336. })[geo];
  337. - return !!locales && locales.includes(locale);
  338. + return false;
  339. },
  340. },
  341. {
  342. @@ -320,7 +309,7 @@ const FEEDS_DATA = [
  343. name: "telemetry",
  344. factory: () => new TelemetryFeed(),
  345. title: "Relays telemetry-related actions to PingCentre",
  346. - value: true,
  347. + value: false,
  348. },
  349. {
  350. name: "favicon",
  351. diff --git a/browser/components/newtab/lib/SearchShortcuts.jsm b/browser/components/newtab/lib/SearchShortcuts.jsm
  352. index a82b0d3..0f5a4f1 100644
  353. --- a/browser/components/newtab/lib/SearchShortcuts.jsm
  354. +++ b/browser/components/newtab/lib/SearchShortcuts.jsm
  355. @@ -8,9 +8,8 @@ const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
  356. // List of sites we match against Topsites in order to identify sites
  357. // that should be converted to search Topsites
  358. const SEARCH_SHORTCUTS = [
  359. - {keyword: "@amazon", shortURL: "amazon", url: "https://amazon.com"},
  360. {keyword: "@\u767E\u5EA6", shortURL: "baidu", url: "https://baidu.com"},
  361. - {keyword: "@google", shortURL: "google", url: "https://google.com"},
  362. + {keyword: "@duckduckgo", shortURL: "duckduckgo", url: "https://duckduckgo.com"},
  363. {keyword: "@\u044F\u043D\u0434\u0435\u043A\u0441", shortURL: "yandex", url: "https://yandex.com"},
  364. ];
  365. this.SEARCH_SHORTCUTS = SEARCH_SHORTCUTS;