browser-milje/scripts/contentScript.js
2024-11-04 23:42:55 +01:00

5 lines
188 B
JavaScript

chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
if (message.type === "setMilje") {
document.body.style.background = `url(${message.milje})`;
}
});