Skip to content

Instantly share code, notes, and snippets.

@jennasalau
Created May 31, 2018 23:31
Show Gist options
  • Save jennasalau/14c5ed67131a5296fec2352dbf3d50be to your computer and use it in GitHub Desktop.
Save jennasalau/14c5ed67131a5296fec2352dbf3d50be to your computer and use it in GitHub Desktop.
Social Engineering Self-XSS Warning Like Facebook
if (process.env.NODE_ENV === 'production') {
if (typeof window !== 'undefined' && typeof console === 'object' && typeof console.log === 'function') { // eslint-disable-line no-console
console.log('%cWARNING!', 'color:white; background:red; font-size: 16pt'); // eslint-disable-line no-console
console.log('%cThis is a browser feature intended for developers. Using this console may allow attackers to impersonate you and steal your information. Do not enter or paste code that you do not understand.', 'font-size: 14pt'); // eslint-disable-line no-console
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment