Skip to content

Commit

Permalink
fix(extension): highlight vue icon when detecting vue2 app
Browse files Browse the repository at this point in the history
  • Loading branch information
webfansplz committed Nov 5, 2024
1 parent 4c01b24 commit c68571b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/chrome-extension/src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ chrome.runtime.onMessage.addListener((req, sender) => {
tabId: sender.tab.id,
popup: chrome.runtime.getURL('popups/vue2-migration-guide.html'),
})
chrome.action.setIcon({
tabId: sender.tab.id,
path: {
16: chrome.runtime.getURL(`icons/16.png`),
48: chrome.runtime.getURL(`icons/48.png`),
128: chrome.runtime.getURL(`icons/128.png`),
},
})
}

if (sender.tab && req.vueDetected) {
Expand Down
8 changes: 8 additions & 0 deletions packages/firefox-extension/src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ chrome.runtime.onMessage.addListener((req, sender) => {
tabId: sender.tab.id,
popup: 'popups/vue2-migration-guide.html',
})
chrome.browserAction.setIcon({
tabId: sender.tab.id,
path: {
16: `icons/16.png`,
48: `icons/48.png`,
128: `icons/128.png`,
},
})
}

if (sender.tab && req.vueDetected) {
Expand Down

0 comments on commit c68571b

Please sign in to comment.