mirror of
				https://github.com/miljegen/miljegen-website.git
				synced 2025-10-31 10:15:57 +00:00 
			
		
		
		
	website should now communicate with the extension and hide an element based on it's presence
This commit is contained in:
		
							
								
								
									
										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 | 
		Reference in New Issue
	
	Block a user