Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/subscriptionInit.js

Issue 29759558: Issue 6599 - Hotfix to drop updated page everywhere (Closed)
Patch Set: removed also skin/updates Created April 24, 2018, 10:37 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/prefs.js ('k') | metadata.chrome » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/subscriptionInit.js
===================================================================
--- a/lib/subscriptionInit.js
+++ b/lib/subscriptionInit.js
@@ -25,17 +25,16 @@
require("../adblockpluscore/lib/subscriptionClasses");
const {FilterStorage} = require("../adblockpluscore/lib/filterStorage");
const {FilterNotifier} = require("../adblockpluscore/lib/filterNotifier");
const info = require("../buildtools/info");
const {Prefs} = require("./prefs");
const {Synchronizer} = require("../adblockpluscore/lib/synchronizer");
const {Utils} = require("./utils");
const {initNotifications} = require("./notificationHelper");
-const {updatesVersion} = require("../adblockplusui/lib/prefs");
let firstRun;
let subscriptionsCallback = null;
/**
* If there aren't any filters, the default subscriptions are added.
* However, if patterns.ini already did exist and/or any preference
* is set to a non-default value, this indicates that this isn't the
@@ -233,39 +232,19 @@
for (let subscription of subscriptions)
{
FilterStorage.addSubscription(subscription);
if (subscription instanceof DownloadableSubscription &&
!subscription.lastDownload)
Synchronizer.execute(subscription);
}
- if (!Prefs.suppress_first_run_page)
+ if (!Prefs.suppress_first_run_page && firstRun)
{
- let page = null;
- if (firstRun)
- {
- page = "firstRun.html";
- }
- // For now we're limiting the updates page to users of
- // Chromium-based browsers to gage its impact
- else if (info.platform == "chromium" &&
- updatesVersion > Prefs.last_updates_page_displayed)
- {
- page = "updates.html";
- }
-
- if (page)
- {
- browser.tabs.create({url: browser.extension.getURL(page)});
-
- // For new users and users that have already seen this updates page we
- // want to avoid showing it again for subsequent updates.
- Prefs.last_updates_page_displayed = updatesVersion;
- }
+ browser.tabs.create({url: browser.extension.getURL("firstRun.html")});
}
initNotifications();
}
Promise.all([FilterNotifier.once("load"),
Prefs.untilLoaded]).then(detectFirstRun)
.then(getSubscriptions)
« no previous file with comments | « lib/prefs.js ('k') | metadata.chrome » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld