Secret option to ignore install hook. Useful during development.
This commit is contained in:
@@ -2,10 +2,13 @@ import { generatePrivateKey, getPublicKey, signEvent, nip04, nip19 } from "nostr
|
||||
|
||||
const storage = browser.storage.local;
|
||||
|
||||
browser.runtime.onInstalled.addListener(({reason}) => {
|
||||
console.log('install handler run');
|
||||
browser.runtime.onInstalled.addListener(async ({reason}) => {
|
||||
// I would like to be able to skip this for development purposes
|
||||
let ignoreHook = (await storage.get('ignoreInstallHook')).ignoreInstallHook
|
||||
if (ignoreHook === true) {
|
||||
return;
|
||||
}
|
||||
if (['install'].includes(reason)) {
|
||||
console.log('install handler create tab');
|
||||
browser.tabs.create({
|
||||
url: 'https://ursus.camp/nostore'
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user