Skip to content

Commit c68571b

Browse files
committedNov 5, 2024·
fix(extension): highlight vue icon when detecting vue2 app
1 parent 4c01b24 commit c68571b

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
 

‎packages/chrome-extension/src/background.ts

+8
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ chrome.runtime.onMessage.addListener((req, sender) => {
9494
tabId: sender.tab.id,
9595
popup: chrome.runtime.getURL('popups/vue2-migration-guide.html'),
9696
})
97+
chrome.action.setIcon({
98+
tabId: sender.tab.id,
99+
path: {
100+
16: chrome.runtime.getURL(`icons/16.png`),
101+
48: chrome.runtime.getURL(`icons/48.png`),
102+
128: chrome.runtime.getURL(`icons/128.png`),
103+
},
104+
})
97105
}
98106

99107
if (sender.tab && req.vueDetected) {

‎packages/firefox-extension/src/background.ts

+8
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ chrome.runtime.onMessage.addListener((req, sender) => {
9292
tabId: sender.tab.id,
9393
popup: 'popups/vue2-migration-guide.html',
9494
})
95+
chrome.browserAction.setIcon({
96+
tabId: sender.tab.id,
97+
path: {
98+
16: `icons/16.png`,
99+
48: `icons/48.png`,
100+
128: `icons/128.png`,
101+
},
102+
})
95103
}
96104

97105
if (sender.tab && req.vueDetected) {

0 commit comments

Comments
 (0)
Please sign in to comment.