Skip to content

Commit

Permalink
refactor: added Firefox/Chrome comment on welcome page, removed conso…
Browse files Browse the repository at this point in the history
…le.log
  • Loading branch information
Aquafina-water-bottle authored and djahandarie committed Apr 2, 2023
1 parent 66521d3 commit 033d38d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ext/js/background/backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -2154,15 +2154,17 @@ class Backend {

async _openWelcomeGuidePageOnce() {
if (isObject(chrome.storage) && isObject(chrome.storage.session)) {
// Chrome
chrome.storage.session.get(['openedWelcomePage']).then((result) => {
console.log(new Date(), 'openedWelcomePage:', result.openedWelcomePage);
if (!result.openedWelcomePage) {
this._openWelcomeGuidePage();
chrome.storage.session.set({'openedWelcomePage': true});
}
});
} else {
// likely not mv3
// Firefox (storage.session is not supported yet)
// NOTE: This means that the welcome page will repeatedly open in Firefox
// until they support storage.session.
this._openWelcomeGuidePage();
}
}
Expand Down

0 comments on commit 033d38d

Please sign in to comment.