EN
JavaScript - display security warning for non-programmers in web browser console
1
points
In this article, we would like to show how to print security warnings in the web browser console that warns non-programmers about dangers caused by pasting, copying, or executing some code there.

Note:
console.log()
print was formatted with styles / CSS.
Practical example:
<!doctype html>
<html>
<body>
<script>
var headStyle = 'text-shadow: 0px 0px 4px #ff0; font-weight: 700; font-size: 50px; color: red';
var textStyle = 'font-weight: 700; font-size: 16px; color: blue';
var warningStyle = 'font-weight: 700; font-size: 20px; color: red';
console.log(
'\n' +
'%cStop!\n' +
'%cThis feature is created only for software developers.\n' +
'%cIf someone asked you to copy, paste or do something here don\'t do it!\n\n' +
'%cIt can be dangerous and can lead to HACKs on your account!\n\n',
headStyle, textStyle, textStyle, warningStyle
);
</script>
</body>
</html>