Skip to content

Commit

Permalink
fix: Reset badge text to empty on extension startup (#462)
Browse files Browse the repository at this point in the history
For some reason, chrome restores the previous badge state on restart causing inconsistency with actual rikaikun state.

TESTED=Loaded unpacked extension and used chrome://restart to ensure badge text reset.
Fixes #82
  • Loading branch information
melink14 committed May 8, 2021
1 parent d8a0a9d commit b4afd3f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions extension/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ chrome.runtime.onMessage.addListener(function (request, sender, response) {
}
});

// Clear browser action badge text on first load
// Chrome preserves last state which is usually 'On'
chrome.browserAction.setBadgeText({ text: '' });

rcxMain.config = {};

const optionsList = [
Expand Down

0 comments on commit b4afd3f

Please sign in to comment.