diff options
| author | LLLL Colonq <llll@colonq> | 2024-11-05 02:59:06 -0500 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2024-11-05 02:59:06 -0500 |
| commit | c8e4f88739d52717de9e5faea4e752918e6457b3 (patch) | |
| tree | cae66186cbb569026ddc90e4d6573e020435c08a /fig-frontend-client/extension/background.js | |
| parent | e1a38bb1fa9bd08633c4e760997ee5571a962505 (diff) | |
Move frontend out of repo
Diffstat (limited to 'fig-frontend-client/extension/background.js')
| -rw-r--r-- | fig-frontend-client/extension/background.js | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/fig-frontend-client/extension/background.js b/fig-frontend-client/extension/background.js deleted file mode 100644 index a0f4c91..0000000 --- a/fig-frontend-client/extension/background.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Retrieve any previously set cookie and send to content script */ - -function getActiveTab() { - return browser.tabs.query({active: true, currentWindow: true}); -} - -function cookieUpdate() { - getActiveTab().then((tabs) => { - // get any previously set cookie for the current tab - let gettingCookies = browser.cookies.get({ - url: tabs[0].url, - name: "name" - }); - gettingCookies.then((cookie) => { - browser.tabs.sendMessage(tabs[0].id, cookie.value); - }); - }); -} - -// update when the tab is updated -browser.tabs.onUpdated.addListener(cookieUpdate); -// update when the tab is activated -browser.tabs.onActivated.addListener(cookieUpdate); |
