Skip to content

Instantly share code, notes, and snippets.

@whoami15
Forked from tosbourn/facebook_warning.html
Last active May 26, 2019 10:37
Show Gist options
  • Save whoami15/4c6d9f47a4a142ac3e0b2775db9178dd to your computer and use it in GitHub Desktop.
Save whoami15/4c6d9f47a4a142ac3e0b2775db9178dd to your computer and use it in GitHub Desktop.
How to recreate Facebook's console warning
<!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);
//setTimeout(console.log.bind(console, '%cStop', 'color: #FF0000;font-size: 90px;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;'), 0);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment