2024-09-11 18:11:44 +01:00
|
|
|
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" });
|
2024-09-23 12:24:35 +01:00
|
|
|
} else if (e.data.type === "GET_DATA_FROM_PAGE") {
|
|
|
|
console.log(
|
|
|
|
document.querySelector('header[data-test="job-details-header"]'),
|
|
|
|
);
|
2024-09-11 18:11:44 +01:00
|
|
|
}
|
|
|
|
//console.log("here2", e);
|
|
|
|
});
|