mdolr / survol

A browser extension to preview any link you hover
https://survol.me
Apache License 2.0
142 stars 67 forks source link

Added badge to extension icon #133

Closed katyasichov closed 3 years ago

katyasichov commented 3 years ago

Fixes https://github.com/mdolr/survol/issues/130. Badge added to the extension icon.

mdolr commented 3 years ago

You've added this in the popup's script, this should be situated in js/core.js

katyasichov commented 3 years ago

Thank you for feedback. I'll make the changes.

katyasichov commented 3 years ago

I changed the logic. I put the code in core.js and add event listener to chrome.storage. The badge is activated in auxiliary when the content script sends a message. The reason for this : chrome.browserAction.setBadgeText can only be executed in the background file. Let me know if additional changes are needed. Thank you