applications-tracker/extensions/definitions.js
2024-09-11 18:11:44 +01:00

16 lines
451 B
JavaScript

browser.runtime.onMessage.addListener(function (message) {
if (message.type === "MY_GET_URL_R") {
window.postMessage(message);
}
});
window.addEventListener("message", function (e) {
if (e.data.type === "MY_GET_URL") {
browser.runtime.sendMessage({ type: "MY_GET_URL" });
} else if (e.data.type === "HAS_EXTENSION_Q") {
console.log("Got request for ext");
window.postMessage({ type: "HAS_EXTENSION" });
}
//console.log("here2", e);
});