Skip to content

Commit 80bc914

Browse files
authored
Merge branch 'main' into main
2 parents b2e1f8d + 18238c1 commit 80bc914

File tree

11 files changed

+711
-739
lines changed

11 files changed

+711
-739
lines changed

bookmark-it/background.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ browser.browserAction.onClicked.addListener(toggleBookmark);
3939
/*
4040
* Switches currentTab and currentBookmark to reflect the currently active tab
4141
*/
42-
function updateActiveTab(tabs) {
42+
function updateAddonStateForActiveTab(tabs) {
4343

4444
function isSupportedProtocol(urlString) {
4545
let supportedProtocols = ["https:", "http:", "ftp:", "file:"];
@@ -68,19 +68,19 @@ function updateActiveTab(tabs) {
6868
}
6969

7070
// listen for bookmarks being created
71-
browser.bookmarks.onCreated.addListener(updateActiveTab);
71+
browser.bookmarks.onCreated.addListener(updateAddonStateForActiveTab);
7272

7373
// listen for bookmarks being removed
74-
browser.bookmarks.onRemoved.addListener(updateActiveTab);
74+
browser.bookmarks.onRemoved.addListener(updateAddonStateForActiveTab);
7575

7676
// listen to tab URL changes
77-
browser.tabs.onUpdated.addListener(updateActiveTab);
77+
browser.tabs.onUpdated.addListener(updateAddonStateForActiveTab);
7878

7979
// listen to tab switching
80-
browser.tabs.onActivated.addListener(updateActiveTab);
80+
browser.tabs.onActivated.addListener(updateAddonStateForActiveTab);
8181

8282
// listen for window switching
83-
browser.windows.onFocusChanged.addListener(updateActiveTab);
83+
browser.windows.onFocusChanged.addListener(updateAddonStateForActiveTab);
8484

8585
// update when the extension loads initially
86-
updateActiveTab();
86+
updateAddonStateForActiveTab();

0 commit comments

Comments
 (0)