diff --git a/thegreenweb/background.js b/thegreenweb/background.js index 822e12e..2f95ad9 100644 --- a/thegreenweb/background.js +++ b/thegreenweb/background.js @@ -1,19 +1,9 @@ import browser from "webextension-polyfill" import { getUrl, - stripProtocolFromUrl, - stripQueryStringFromUrl, - stripPageFromUrl, - stripPortFromUrl, - getGreenwebLinkNode, - getFooterElement, - getLinkNode, - getImageNode, getImagePath, - getResultNode, getIcon, getTitle, - getTitleWithLink, } from './thegreenweb-utils' import { GreenChecker } from './src/greencheck' @@ -205,3 +195,19 @@ function showIcon(resp, tabId) { browser.pageAction.onClicked.addListener(function () { browser.runtime.openOptionsPage() }); + + +browser.runtime.onInstalled.addListener((details) => { + console.log("NEW INSTALL") + console.log({ details }) + switch (details.reason) { + case "install": + // show installation onboarding page + browser.tabs.create({ + url: browser.runtime.getURL("/installation.html"), + active: true + }); + break; + } + +}); diff --git a/thegreenweb/installation.html b/thegreenweb/installation.html new file mode 100644 index 0000000..3fe25bd --- /dev/null +++ b/thegreenweb/installation.html @@ -0,0 +1,30 @@ + + + +
+ +
+