Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How did Facebook change the font of Javascript console output? [duplicate]

Tags:

Example screenshot from the JavaScript console (Google Chrome 35, Win7) on a Facebook page:

Example screenshot

How is this done? Is there a way to inspect/debug the console?

like image 830
Elle Avatar asked Jun 10 '14 21:06

Elle


1 Answers

Console API Reference:

https://developers.google.com/web/tools/chrome-devtools/console/console-write#styling_console_output_with_css

Nice example of using the console.log:

console.log("%cUser %s has %d points", "color:orange; background:blue; font-size: 16pt", 'User', 100); 

Just paste it into the console :)

like image 113
gustavodidomenico Avatar answered Oct 20 '22 15:10

gustavodidomenico