Skip to content

Commit

Permalink
fix: firefox manually loaded extension
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie committed Jul 27, 2023
1 parent 0519dcf commit 95b8553
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/content-scripts/content-script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,12 @@ document.addEventListener(DomEventName.psbtRequest, ((event: PsbtRequestEvent) =
});
}) as EventListener);

window.addEventListener('load', () => {
function addHiroWalletToPage() {
const inpage = document.createElement('script');
inpage.src = chrome.runtime.getURL('inpage.js');
inpage.id = 'stacks-wallet-provider';
inpage.id = 'hiro-wallet-provider';
document.body.appendChild(inpage);
});
}

// Don't block thread to add Hiro Wallet to page
requestAnimationFrame(() => addHiroWalletToPage());

0 comments on commit 95b8553

Please sign in to comment.