diff --git a/scripts/fc.js b/scripts/fc.js new file mode 100644 index 0000000..df66013 --- /dev/null +++ b/scripts/fc.js @@ -0,0 +1,36 @@ +/* fc.js +This does not stand for "FamiCom" but instead on Finalization and Completion. This script provides installation run scripts. +*/ + +class fc { + + static hello() { + chrome.tabs.create({ url: `https://codeberg.org/buzzcode2007/ShopAI/wiki` }, function (tab) {}); + }; + + static setup() { + /* Initialize the set-up. + + Returns: the initialization result + */ + + + + + } + + static trigger() { + chrome.runtime.onInstalled.addListener(function (object) { + if (object.reason == chrome.runtime.OnInstalledReason.INSTALL) { + fc.hello(); + fc.setup(); + } + }); + } + + static run() { + /* main function */ + + fc.trigger(); + } +} diff --git a/scripts/shopAI.js b/scripts/shopAI.js index 697df9b..b0abef5 100644 --- a/scripts/shopAI.js +++ b/scripts/shopAI.js @@ -1,4 +1,5 @@ -/* ShopAI -Shop wisely with AI! +/* ShopAI +Shop wisely with AI! */ +importScripts('fc.js');