parent
56c1476e67
commit
51ad84e6a9
|
@ -63,18 +63,6 @@ prefs.subscribe(['iconset'], () => updateIcon({id: undefined}, {}));
|
||||||
{
|
{
|
||||||
const onInstall = ({reason}) => {
|
const onInstall = ({reason}) => {
|
||||||
chrome.runtime.onInstalled.removeListener(onInstall);
|
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
|
// reset L10N cache on update
|
||||||
if (reason === 'update') {
|
if (reason === 'update') {
|
||||||
localStorage.L10N = JSON.stringify({
|
localStorage.L10N = JSON.stringify({
|
||||||
|
|
Loading…
Reference in New Issue
Block a user