this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

v1 ready to ship

+25 -2
+15
background.js
··· 1 + const tabsWithDID = new Set() 2 + 1 3 function setIcon(tabId, iconName) { 2 4 chrome.action.setIcon({ path: iconName, tabId }) 3 5 } ··· 11 13 chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { 12 14 if (message.type === "DID_FOUND") { 13 15 setIcon(sender.tab.id, "logo48.png") 16 + tabsWithDID.add(sender.tab.id) 14 17 } else { 15 18 setIcon(sender.tab.id, "logo48_gray.png") 19 + tabsWithDID.delete(sender.tab.id) 20 + } 21 + }) 22 + 23 + chrome.action.onClicked.addListener((tab) => { 24 + if (tabsWithDID.has(tab.id)) { 25 + chrome.tabs.sendMessage(tab.id, { type: "GET_DOMAIN" }, (response) => { 26 + if (response && response.domain) { 27 + const newUrl = `https://staging.bsky.app/profile/${response.domain}` 28 + chrome.tabs.create({ url: newUrl }) 29 + } 30 + }) 16 31 } 17 32 })
+6
content.js
··· 21 21 chrome.runtime.sendMessage({ type: "DID_NOT_FOUND" }) 22 22 } 23 23 })() 24 + 25 + chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { 26 + if (message.type === "GET_DOMAIN") { 27 + sendResponse({ domain: getDomainName() }) 28 + } 29 + })
+4 -2
manifest.json
··· 4 4 "version": "1.0", 5 5 "description": "Detects Decentralized Identifiers (DIDs) in a domain's TXT records and updates the icon.", 6 6 "action": { 7 - "default_popup": "popup/build/index.html", 8 - "default_icon": { "48": "logo48_gray.png", "128": "logo128_gray.png" } 7 + "default_icon": { 8 + "48": "logo48_gray.png", 9 + "128": "logo128_gray.png" 10 + } 9 11 }, 10 12 "permissions": ["activeTab", "tabs"], 11 13 "background": {