mirror of
https://github.com/momenbasel/keyFinder.git
synced 2026-06-07 08:33:54 +02:00
fdd3be3d99
Cherry-picks @anthonyonazure's closed PR #11 onto master post-Firefox port, adds Firefox parity for the nonce-validated interceptor bridge, and ships GH Actions for tag-driven releases plus PR validation. Closes #11 Co-Authored-By: Anthony <anthony@anthonyonazure.com>
17 lines
614 B
JavaScript
17 lines
614 B
JavaScript
(function () {
|
|
"use strict";
|
|
|
|
const nonce = crypto.randomUUID();
|
|
|
|
// Store nonce where both MAIN world (interceptor) and ISOLATED world (content.js) can read it.
|
|
// The interceptor removes data-kf-nonce after reading; data-kf-verify stays for content.js.
|
|
const el = document.documentElement;
|
|
el.setAttribute("data-kf-nonce", nonce);
|
|
el.setAttribute("data-kf-verify", nonce);
|
|
|
|
const script = document.createElement("script");
|
|
script.src = chrome.runtime.getURL("js/interceptor.js");
|
|
(document.head || document.documentElement).appendChild(script);
|
|
script.onload = () => script.remove();
|
|
})();
|