don't open the homepage on first install as it's not helpful

see #112
This commit is contained in:
tophf 2017-12-13 05:34:44 +03:00
parent 56c1476e67
commit 51ad84e6a9

View File

@ -63,18 +63,6 @@ prefs.subscribe(['iconset'], () => updateIcon({id: undefined}, {}));
{
const onInstall = ({reason}) => {
chrome.runtime.onInstalled.removeListener(onInstall);
const manifest = chrome.runtime.getManifest();
// Open FAQs page once after installation to guide new users.
// Do not display it in development mode.
if (reason === 'install' && manifest.update_url) {
// don't hardcode homepage URL, extract it from "Get Help" label translation
// TODO: add a built-in tour page in the extension
const getHelpHtml = chrome.i18n.getMessage('manageText').match(/<a\s+href=[^>]+/g);
const url = (getHelpHtml[1] || '').replace(/^.+?=\s*/, '').replace(/^['"]|["']$/g, '');
if (url) {
setTimeout(openURL, 100, {url});
}
}
// reset L10N cache on update
if (reason === 'update') {
localStorage.L10N = JSON.stringify({