Add styled console warning

merge-requests/451/head
Alex Gleason 4 years ago
parent 47dd4287d0
commit 760bac1377
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7

@ -150,6 +150,30 @@ class SoapboxMount extends React.PureComponent {
export default class Soapbox extends React.PureComponent {
printConsoleWarning = () => {
/* eslint-disable no-console */
console.log('%cStop!', [
'color: #ff0000',
'display: block',
'font-family: system-ui, -apple-system, BlinkMacSystemFont, Roboto, Ubuntu, "Helvetica Neue", sans-serif',
'font-size: 50px',
'font-weight: 800',
'padding: 4px 0',
].join(';'));
console.log('%cThis is a browser feature intended for developers. If someone told you to copy-paste something here it is a scam and will give them access to your account.', [
'color: #111111',
'display: block',
'font-family: system-ui, -apple-system, BlinkMacSystemFont, Roboto, Ubuntu, "Helvetica Neue", sans-serif',
'font-size: 18px',
'padding: 4px 0 16px',
].join(';'));
/* eslint-enable no-console */
}
componentDidMount() {
this.printConsoleWarning();
}
render() {
return (
<Provider store={store}>

Loading…
Cancel
Save