Created
July 31, 2014 17:43
-
-
Save rjacoby/46f7ceb900f97b0cc8f4 to your computer and use it in GitHub Desktop.
Facebook STOP! console code
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
__d("Chromedome", ["fbt"], function(a, b, c, d, e, f, g) { | |
f.start = function(h) { | |
if (h.off || top !== window ||!/(^|\.)facebook\.com$/.test(document.domain)) | |
return; | |
var i = h.stop || "Stop!", j = h.text || "This is a browser feature intended for developers. If someone told you to copy-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.", k = h.more || g._("For more information, see {url}.", [g.param("url", 'https://www.facebook.com/selfxss')]); | |
if ((window.chrome || window.safari)&&!h.textonly) { | |
var l = 'font-family:helvetica; font-size:20px; '; | |
[[i, h.c1 || l + 'font-size:50px; font-weight:bold; ' + 'color:red; -webkit-text-stroke:1px black;'], [j, h.c2 || l], [k, h.c3 || l], ['', '']].map(function(r) { | |
setTimeout(console.log.bind(console, '\n%c' + r[0], r[1])); | |
}); | |
} else { | |
var m = ['', ' .d8888b. 888 888', 'd88P Y88b 888 888', 'Y88b. 888 888', ' "Y888b. 888888 .d88b. 88888b. 888', ' "Y88b. 888 d88""88b 888 "88b 888', ' "888 888 888 888 888 888 Y8P', 'Y88b d88P Y88b. Y88..88P 888 d88P', ' "Y8888P" "Y888 "Y88P" 88888P" 888', ' 888', ' 888', ' 888'], n = ('' + j).match(/.{35}.+?\s+|.+$/g), o = Math.floor(Math.max(0, (m.length - n.length) / 2)); | |
for (var p = 0; p < m.length || p < n.length; p++) { | |
var q = m[p]; | |
m[p] = q + new Array(45 - q.length).join(' ') + (n[p - o] || ''); | |
} | |
console.log('\n\n\n' + m.join('\n') + '\n\n' + k + '\n'); | |
return; | |
} | |
}; | |
}, null); |
Got an example of this running?
Update: Got a good version working in my JS fiddle
So basically this:
console.log("%cGood to go!", "font: 2em roboto; color: yellow; background-color: green;");
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
waw, they push the console like no one.