Created
May 23, 2024 22:53
-
-
Save marvinhagemeister/cd53192855c7de649a2b62d0e87a8c0e to your computer and use it in GitHub Desktop.
cursed noscript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Document</title> | |
</head> | |
<body> | |
<h1>hello</h1> | |
<div id="target"></div> | |
<script> | |
const el = document.getElementById("target"); | |
const noscript = document.createElement("noscript"); | |
const style = document.createElement("style"); | |
style.textContent = "*{outline: 1px dotted orange;}"; | |
noscript.appendChild(style); | |
el.appendChild(noscript); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment