-
-
Save ststeiger/63cfd3c51fe9430921f6320d9d6266f1 to your computer and use it in GitHub Desktop.
How to recreate Facebook's console warning
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
const warningTitleCSS = 'color:red; font-size:60px; font-weight: bold; -webkit-text-stroke: 1px black;'; | |
const warningDescCSS = 'font-size: 18px;'; | |
console.log('%cStop!', warningTitleCSS); | |
console.log("%cThis is a browser feature intended for developers. If someone told you to copy and paste something here to enable a Facebook feature or \"hack\" someone's account, it is a scam and will give them access to your Facebook account.", warningDescCSS); | |
console.log('%cSee https://www.facebook.com/selfxss for more information.', warningDescCSS); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://stackoverflow.com/questions/27415145/how-does-facebook-log-to-console-like-this
https://m.facebook.com/language.php
https://(ISO-two-letter-language)-(top-level-domain).facebook.com/
e.g.
https://uk-ua.facebook.com/
or
https://fa-ir.facebook.com/
ISO 2-letter language name:
https://www.loc.gov/standards/iso639-2/php/code_list.php
Country top-level domains:
https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains
https://www.worldstandards.eu/other/tlds/