From 6fb655f50b482477f06c5f040ef5474169563fa4 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Wed, 5 Jun 2019 23:58:17 -0400 Subject: add patch --- mk | 1 + newtab.patch | 369 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 370 insertions(+) create mode 100755 mk create mode 100644 newtab.patch diff --git a/mk b/mk new file mode 100755 index 00000000..4de3f1a5 --- /dev/null +++ b/mk @@ -0,0 +1 @@ +npm run buildmc diff --git a/newtab.patch b/newtab.patch new file mode 100644 index 00000000..d5c42cff --- /dev/null +++ b/newtab.patch @@ -0,0 +1,369 @@ +diff --git a/browser/components/newtab/content-src/components/Base/Base.jsx b/browser/components/newtab/content-src/components/Base/Base.jsx +index 4166267..9959f99 100644 +--- a/browser/components/newtab/content-src/components/Base/Base.jsx ++++ b/browser/components/newtab/content-src/components/Base/Base.jsx +@@ -144,6 +144,7 @@ export class BaseContent extends React.PureComponent { +
+
+
++
+ {prefs.showSearch && +
+ +diff --git a/browser/components/newtab/content-src/components/Base/_Base.scss b/browser/components/newtab/content-src/components/Base/_Base.scss +index 1d21362..9cdf875 100644 +--- a/browser/components/newtab/content-src/components/Base/_Base.scss ++++ b/browser/components/newtab/content-src/components/Base/_Base.scss +@@ -119,3 +119,9 @@ main { + } + } + } ++ ++#iceweasel-logo-div ++{ ++ width: 100% ; height: 130px ; ++ background: url(../../../data/content/assets/iceweasel_logo.svg) bottom center no-repeat ; ++} +diff --git a/browser/components/newtab/css/activity-stream-linux.css b/browser/components/newtab/css/activity-stream-linux.css +index cd46f8c..3b1264f 100644 +--- a/browser/components/newtab/css/activity-stream-linux.css ++++ b/browser/components/newtab/css/activity-stream-linux.css +@@ -440,6 +440,11 @@ main { + .prefs-button button:active { + background-color: var(--newtab-element-active-color); } + ++#iceweasel-logo-div { ++ width: 100%; ++ height: 130px; ++ background: url(../../../data/content/assets/iceweasel_logo.svg) bottom center no-repeat; } ++ + .as-error-fallback { + align-items: center; + border-radius: 3px; +diff --git a/browser/components/newtab/css/activity-stream-mac.css b/browser/components/newtab/css/activity-stream-mac.css +index ed8a132..7fc8d48 100644 +--- a/browser/components/newtab/css/activity-stream-mac.css ++++ b/browser/components/newtab/css/activity-stream-mac.css +@@ -443,6 +443,11 @@ main { + .prefs-button button:active { + background-color: var(--newtab-element-active-color); } + ++#iceweasel-logo-div { ++ width: 100%; ++ height: 130px; ++ background: url(../../../data/content/assets/iceweasel_logo.svg) bottom center no-repeat; } ++ + .as-error-fallback { + align-items: center; + border-radius: 3px; +diff --git a/browser/components/newtab/css/activity-stream-windows.css b/browser/components/newtab/css/activity-stream-windows.css +index bd9529f..5916797 100644 +--- a/browser/components/newtab/css/activity-stream-windows.css ++++ b/browser/components/newtab/css/activity-stream-windows.css +@@ -440,6 +440,11 @@ main { + .prefs-button button:active { + background-color: var(--newtab-element-active-color); } + ++#iceweasel-logo-div { ++ width: 100%; ++ height: 130px; ++ background: url(../../../data/content/assets/iceweasel_logo.svg) bottom center no-repeat; } ++ + .as-error-fallback { + align-items: center; + border-radius: 3px; +diff --git a/browser/components/newtab/data/content/activity-stream.bundle.js b/browser/components/newtab/data/content/activity-stream.bundle.js +index 16206f3..455c4cf 100644 +--- a/browser/components/newtab/data/content/activity-stream.bundle.js ++++ b/browser/components/newtab/data/content/activity-stream.bundle.js +@@ -734,7 +734,11 @@ class BaseContent extends react__WEBPACK_IMPORTED_MODULE_8___default.a.PureCompo + 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(" "); + return react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", { + className: outerClassName +- }, react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("main", null, prefs.showSearch && react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", { ++ }, react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("main", null, react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("a", { ++ href: "https://www.parabola.nu" ++ }, react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", { ++ id: "iceweasel-logo-div" ++ })), prefs.showSearch && react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", { + className: "non-collapsible-section" + }, 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({ + showLogo: false, +diff --git a/browser/components/newtab/data/content/tippytop/top_sites.json b/browser/components/newtab/data/content/tippytop/top_sites.json +index 20d5472..de827de 100644 +--- a/browser/components/newtab/data/content/tippytop/top_sites.json ++++ b/browser/components/newtab/data/content/tippytop/top_sites.json +@@ -1,107 +1,42 @@ + [ + { +- "title": "aliexpress", +- "url": "https://www.aliexpress.com/", +- "image_url": "aliexpress-com@2x.png" ++ "title": "parabola", ++ "url": "https://www.parabola.nu/", ++ "image_url": "parabola-gnu-freedood.png" + }, + { +- "title": "allegro", +- "url": "https://www.allegro.pl/", +- "image_url": "allegro-pl@2x.png" ++ "title": "gnu", ++ "url": "https://www.gnu.org/", ++ "image_url": "gnu-logo.png" + }, + { +- "title": "amazon", +- "urls": ["https://www.amazon.ca/", "https://www.amazon.co.uk/", "https://www.amazon.com/", "https://www.amazon.de/", "https://www.amazon.fr/"], +- "image_url": "amazon@2x.png" ++ "title": "fsf", ++ "url": "https://www.fsf.org/", ++ "image_url": "fsf-logo.png" + }, + { +- "title": "avito", +- "url": "https://www.avito.ru/", +- "image_url": "avito-ru@2x.png" ++ "title": "libreplanet", ++ "url": "https://libreplanet.org/", ++ "image_url": "libreplanet-logo.png" + }, + { + "title": "baidu", + "url": "https://www.baidu.com/", + "image_url": "baidu-com@2x.png" + }, +- { +- "title": "bbc", +- "url": "https://www.bbc.co.uk/", +- "image_url": "bbc-uk@2x.png" +- }, +- { +- "title": "bing", +- "url": "https://www.bing.com/", +- "image_url": "bing-com@2x.png" +- }, + { + "title": "duckduckgo", + "url": "https://www.duckduckgo.com/", + "image_url": "duckduckgo-com@2x.png" + }, +- { +- "title": "ebay", +- "urls": ["https://www.ebay.com", "https://www.ebay.co.uk/", "https://ebay.de"], +- "image_url": "ebay@2x.png" +- }, +- { +- "title": "facebook", +- "url": "https://www.facebook.com/", +- "image_url": "facebook-com@2x.png" +- }, +- { +- "title": "google", +- "url": "https://www.google.com/", +- "image_url": "google-com@2x.png" +- }, +- { +- "title": "leboncoin", +- "url": "http://www.leboncoin.fr/", +- "image_url": "leboncoin-fr@2x.png" +- }, +- { +- "title": "ok", +- "url": "https://www.ok.ru/", +- "image_url": "ok-ru@2x.png" +- }, +- { +- "title": "olx", +- "url": "https://www.olx.pl/", +- "image_url": "olx-pl@2x.png" +- }, +- { +- "title": "reddit", +- "url": "https://www.reddit.com/", +- "image_url": "reddit-com@2x.png" +- }, +- { +- "title": "twitter", +- "url": "https://twitter.com/", +- "image_url": "twitter-com@2x.png" +- }, +- { +- "title": "vk", +- "url": "https://vk.com/", +- "image_url": "vk-com@2x.png" +- }, + { + "title": "wikipedia", + "url": "https://www.wikipedia.org/", + "image_url": "wikipedia-org@2x.png" + }, +- { +- "title": "wykop", +- "url": "https://www.wykop.pl/", +- "image_url": "wykop-pl@2x.png" +- }, + { + "title": "yandex", + "url": "https://www.yandex.com/", + "image_url": "yandex-com@2x.png" +- }, +- { +- "title": "youtube", +- "url": "https://www.youtube.com/", +- "image_url": "youtube-com@2x.png" + } + ] +diff --git a/browser/components/newtab/lib/ActivityStream.jsm b/browser/components/newtab/lib/ActivityStream.jsm +index 080cfa6..c059a10 100644 +--- a/browser/components/newtab/lib/ActivityStream.jsm ++++ b/browser/components/newtab/lib/ActivityStream.jsm +@@ -21,7 +21,6 @@ const {PlacesFeed} = ChromeUtils.import("resource://activity-stream/lib/PlacesFe + const {PrefsFeed} = ChromeUtils.import("resource://activity-stream/lib/PrefsFeed.jsm"); + const {Store} = ChromeUtils.import("resource://activity-stream/lib/Store.jsm"); + const {SystemTickFeed} = ChromeUtils.import("resource://activity-stream/lib/SystemTickFeed.jsm"); +-const {TelemetryFeed} = ChromeUtils.import("resource://activity-stream/lib/TelemetryFeed.jsm"); + const {FaviconFeed} = ChromeUtils.import("resource://activity-stream/lib/FaviconFeed.jsm"); + const {TopSitesFeed} = ChromeUtils.import("resource://activity-stream/lib/TopSitesFeed.jsm"); + const {TopStoriesFeed} = ChromeUtils.import("resource://activity-stream/lib/TopStoriesFeed.jsm"); +@@ -31,14 +30,7 @@ const {DiscoveryStreamFeed} = ChromeUtils.import("resource://activity-stream/lib + + const DEFAULT_SITES = new Map([ + // This first item is the global list fallback for any unexpected geos +- ["", "https://www.youtube.com/,https://www.facebook.com/,https://www.wikipedia.org/,https://www.reddit.com/,https://www.amazon.com/,https://twitter.com/"], +- ["US", "https://www.youtube.com/,https://www.facebook.com/,https://www.amazon.com/,https://www.reddit.com/,https://www.wikipedia.org/,https://twitter.com/"], +- ["CA", "https://www.youtube.com/,https://www.facebook.com/,https://www.reddit.com/,https://www.wikipedia.org/,https://www.amazon.ca/,https://twitter.com/"], +- ["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/"], +- ["PL", "https://www.youtube.com/,https://www.facebook.com/,https://allegro.pl/,https://www.wikipedia.org/,https://www.olx.pl/,https://www.wykop.pl/"], +- ["RU", "https://vk.com/,https://www.youtube.com/,https://ok.ru/,https://www.avito.ru/,https://www.aliexpress.com/,https://www.wikipedia.org/"], +- ["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/"], +- ["FR", "https://www.youtube.com/,https://www.facebook.com/,https://www.wikipedia.org/,https://www.amazon.fr/,https://www.leboncoin.fr/,https://twitter.com/"], ++ ["", "https://www.parabola.nu/,https://www.gnu.org/,https://www.fsf.org/,https://libreplanet.org/"] + ]); + const GEO_PREF = "browser.search.region"; + const SPOCS_GEOS = ["US"]; +@@ -65,10 +57,10 @@ const PREFS_CONFIG = new Map([ + hidden: !PREFS_CONFIG.get("feeds.section.topstories").getValue(args), + provider_icon: "pocket", + provider_name: "Pocket", +- read_more_endpoint: "https://getpocket.com/explore/trending?src=fx_new_tab", +- 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"}`, +- stories_referrer: "https://getpocket.com/recommendations", +- topics_endpoint: `https://getpocket.cdn.mozilla.net/v3/firefox/trending-topics?version=2&consumer_key=$apiKey&locale_lang=${args.locale}`, ++ read_more_endpoint: "https://parabola.nu/feeds.section.topstories.options", ++ stories_endpoint: `https://parabola.nu/feeds.section.topstories.options`, ++ stories_referrer: "https://parabola.nu/feeds.section.topstories.options", ++ topics_endpoint: `https://parabola.nu/feeds.section.topstories.options`, + 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"], + show_spocs: showSpocs(args), + personalized: true, +@@ -77,7 +69,7 @@ const PREFS_CONFIG = new Map([ + }], + ["showSponsored", { + title: "Show sponsored cards in spoc experiment (show_spocs in topstories.options has to be set to true as well)", +- value: true, ++ value: false, + }], + ["pocketCta", { + title: "Pocket cta and button for logged out users.", +@@ -102,7 +94,7 @@ const PREFS_CONFIG = new Map([ + }], + ["feeds.snippets", { + title: "Show snippets on activity stream", +- value: true, ++ value: false, + }], + ["topSitesRows", { + title: "Number of rows of Top Sites to display", +@@ -110,26 +102,26 @@ const PREFS_CONFIG = new Map([ + }], + ["telemetry", { + title: "Enable system error and usage data collection", +- value: true, ++ value: false, + value_local_dev: false, + }], + ["telemetry.ut.events", { + title: "Enable Unified Telemetry event data collection", +- value: AppConstants.EARLY_BETA_OR_EARLIER, ++ value: false, + value_local_dev: false, + }], + ["telemetry.structuredIngestion", { + title: "Enable Structured Ingestion Telemetry data collection", +- value: true, ++ value: false, + value_local_dev: false, + }], + ["telemetry.structuredIngestion.endpoint", { + title: "Structured Ingestion telemetry server endpoint", +- value: "https://incoming.telemetry.mozilla.org/submit/activity-stream", ++ value: "https://parabola.nu/telemetry.structuredIngestion.endpoint", + }], + ["telemetry.ping.endpoint", { + title: "Telemetry server endpoint", +- value: "https://tiles.services.mozilla.com/v4/links/activity-stream", ++ value: "https://parabola.nu/telemetry.ping.endpoint", + }], + ["section.highlights.includeVisited", { + title: "Boolean flag that decides whether or not to show visited pages in highlights.", +@@ -176,10 +168,7 @@ const PREFS_CONFIG = new Map([ + } else if (["BY", "KZ", "RU", "TR"].includes(geo)) { + searchShortcuts.push("yandex"); + } else { +- searchShortcuts.push("google"); +- } +- if (["DE", "FR", "GB", "IT", "JP", "US"].includes(geo)) { +- searchShortcuts.push("amazon"); ++ searchShortcuts.push("duckduckgo"); + } + return searchShortcuts.join(","); + }, +@@ -238,13 +227,13 @@ const PREFS_CONFIG = new Map([ + hardcoded_layout: true, + personalized: false, + // This is currently an exmple layout used for dev purposes. +- layout_endpoint: "https://getpocket.cdn.mozilla.net/v3/newtab/layout?version=1&consumer_key=$apiKey&layout_variant=basic", ++ layout_endpoint: "https://parabola.nu/extensions.pocket.oAuthConsumerKey", + }); + }, + }], + ["discoverystream.endpoints", { + title: "Endpoint prefixes (comma-separated) that are allowed to be requested", +- value: "https://getpocket.cdn.mozilla.net/", ++ value: "https://parabola.nu/discoverystream.endpoints", + }], + ["discoverystream.spoc.impressions", { + title: "Track spoc impressions", +@@ -307,7 +296,7 @@ const FEEDS_DATA = [ + "CA": ["en-CA", "en-GB", "en-US", "en-ZA"], + "DE": ["de", "de-DE", "de-AT", "de-CH"], + })[geo]; +- return !!locales && locales.includes(locale); ++ return false; + }, + }, + { +@@ -320,7 +309,7 @@ const FEEDS_DATA = [ + name: "telemetry", + factory: () => new TelemetryFeed(), + title: "Relays telemetry-related actions to PingCentre", +- value: true, ++ value: false, + }, + { + name: "favicon", +diff --git a/browser/components/newtab/lib/SearchShortcuts.jsm b/browser/components/newtab/lib/SearchShortcuts.jsm +index a82b0d3..0f5a4f1 100644 +--- a/browser/components/newtab/lib/SearchShortcuts.jsm ++++ b/browser/components/newtab/lib/SearchShortcuts.jsm +@@ -8,9 +8,8 @@ const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm"); + // List of sites we match against Topsites in order to identify sites + // that should be converted to search Topsites + const SEARCH_SHORTCUTS = [ +- {keyword: "@amazon", shortURL: "amazon", url: "https://amazon.com"}, + {keyword: "@\u767E\u5EA6", shortURL: "baidu", url: "https://baidu.com"}, +- {keyword: "@google", shortURL: "google", url: "https://google.com"}, ++ {keyword: "@duckduckgo", shortURL: "duckduckgo", url: "https://duckduckgo.com"}, + {keyword: "@\u044F\u043D\u0434\u0435\u043A\u0441", shortURL: "yandex", url: "https://yandex.com"}, + ]; + this.SEARCH_SHORTCUTS = SEARCH_SHORTCUTS; -- cgit v1.2.2