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" });
	} else if (e.data.type === "GET_DATA_FROM_PAGE") {
		console.log(
			document.querySelector('header[data-test="job-details-header"]'),
		);
	}
	//console.log("here2", e);
});
