mirror of
https://github.com/miljegen/miljegen-website.git
synced 2024-10-30 07:23:43 +00:00
website should now communicate with the extension and hide an element based on it's presence
This commit is contained in:
parent
79013efd2e
commit
833f0c47f6
20
index.html
20
index.html
@ -3,9 +3,27 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<style>
|
||||
#test-milje {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 1000;
|
||||
}
|
||||
</style>
|
||||
<script async>
|
||||
window.addEventListener("message", (event) => {
|
||||
if (event.data.extensionDetected) {
|
||||
const elementToHide = document.getElementById("element-id");
|
||||
if (elementToHide) elementToHide.style.display = "none";
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<title>миљеген</title>
|
||||
</head>
|
||||
<body>
|
||||
<img id="test-milje" src="test-milje.png" alt="не би требало да видиш ову слику...">
|
||||
<h1>миљеген</h1>
|
||||
<h2>званична страница</h2>
|
||||
<p>бојлерплејт хихи</p>
|
||||
|
BIN
test-milje.png
Normal file
BIN
test-milje.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 517 KiB |
Loading…
Reference in New Issue
Block a user