Last active
July 11, 2018 13:08
-
-
Save Shilo/d1d7bf310376b0c0b02fc47a1d73a597 to your computer and use it in GitHub Desktop.
One Line Javascript CSS Injection.
This file contains 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
(function() { var css = `body{background-color:black;}`; var cssDiv = document.createElement('div'); cssDiv.innerHTML = '­<style>' + css + '</style>'; document.body.appendChild(cssDiv.childNodes[1]); })(); |
This file contains 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
(function() { var css = `body { background-color: black; }`; var cssDiv = $('<div />', { html: '­<style>' + css + '</style>' }).children().appendTo('body'); })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment