Skip to content

Commit

Permalink
refactor background comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ttop32 committed Feb 3, 2024
1 parent b56aea0 commit 7c18de8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ var stopTtsTimestamp = 0;

(async function backgroundInit() {
try {
injectContentScriptForAllTab();
addInstallUrl(introSiteUrl);
injectContentScriptForAllTab(); // check extension updated, then re inject content script
addInstallUrl(introSiteUrl); // check first start and redirect to how to use url
// addUninstallUrl(util.getReviewUrl());

await getSetting();
addCopyRequestListener();
addTabSwitchEventListener();
addPdfFileTabListener();
addSearchBarListener();
addMessageListener();
await getSetting(); // load setting
addCopyRequestListener(); // listen copy context menu and shortcut key
addTabSwitchEventListener(); // listen tab switch for kill tts
addPdfFileTabListener(); //listen drag and drop pdf
addSearchBarListener(); // listen url search bar for translate omnibox
addMessageListener(); // listen message from content script for handle translate & tts
} catch (error) {
console.log(error);
}
Expand Down

0 comments on commit 7c18de8

Please sign in to comment.