GM
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
browser.tabs.query({ active: true, currentWindow: true }, (tabs) => {
|
||||
const tabId = tabs[0].id;
|
||||
|
||||
browser.runtime.sendMessage({ action: "getNostrLinks", tabId }, (response) => {
|
||||
const menu = document.getElementById("link-menu");
|
||||
if (response.links && response.links.length > 0) {
|
||||
menu.innerHTML = response.links
|
||||
.map(
|
||||
(link) => `
|
||||
<li>
|
||||
<a href="web+nostr:${link.uri}" target="_blank">
|
||||
${link.text || "Open on Nostr"}
|
||||
</a>
|
||||
</li>
|
||||
`
|
||||
)
|
||||
.join("");
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user