From 177e5127db7d24cb9ccdb9d15d011df19b1e3777 Mon Sep 17 00:00:00 2001 From: Jeremy Schomery Date: Tue, 14 Mar 2017 12:44:10 +0330 Subject: [PATCH] do not display the FAQs page in development mode --- background.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/background.js b/background.js index 3cdfe973..880b798a 100644 --- a/background.js +++ b/background.js @@ -184,16 +184,19 @@ chrome.storage.local.get('version', prefs => { // Open FAQs page once after installation to guide new users, // https://github.com/schomery/stylish-chrome/issues/22#issuecomment-279936160 if (!prefs.version) { - let version = chrome.runtime.getManifest().version; - chrome.storage.local.set({ - version - }, () => { - window.setTimeout(() => { - chrome.tabs.create({ - url: 'http://add0n.com/stylus.html?version=' + version + '&type=install' - }); - }, 3000); - }) + // do not display the FAQs page in development mode + if ('update_url' in chrome.runtime.getManifest()) { + let version = chrome.runtime.getManifest().version; + chrome.storage.local.set({ + version + }, () => { + window.setTimeout(() => { + chrome.tabs.create({ + url: 'http://add0n.com/stylus.html?version=' + version + '&type=install' + }); + }, 3000); + }) + } } });