extension should now communicate with the official website and hide an element from it

This commit is contained in:
vuk 2024-08-22 15:54:57 +02:00
parent 4a8f5cc2cf
commit f68d9dad91
2 changed files with 8 additions and 4 deletions

View File

@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "browser-milje",
"description": "adds a milje table cloth on top of your browser viewport",
"version": "0.0.1",
"version": "0.0.2",
"action": {
"default_popup": "popup.html",
"default_icon": "assets/browser-milje.png"
@ -15,8 +15,9 @@
},
"content_scripts": [
{
"js": ["scripts/milje.js"],
"matches": ["<all_urls>", "file:///"]
"matches": ["<all_urls>", "file:///"],
"js": ["scripts/milje.js"]
}
]
}

View File

@ -20,4 +20,7 @@ div.style.backgroundSize = 'contain'
div.style.backgroundRepeat = 'no-repeat'
div.style.backgroundPosition = 'center'
div.style.transform = 'translateY(-50%)'
document.body.appendChild(div)
document.body.appendChild(div)
const message = { extensionDetected: true };
window.postMessage(message, "*");