From 1a6fa9466fc136154ff31e5667089e6d2e305006 Mon Sep 17 00:00:00 2001 From: Joel Gritter Date: Fri, 29 Jun 2018 09:23:55 -0400 Subject: [PATCH 1/2] Add console warning --- src/init.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/init.js b/src/init.js index 85e4b643f..2cc163d7a 100644 --- a/src/init.js +++ b/src/init.js @@ -36,3 +36,23 @@ const Raven = require('raven-js'); window._locale = updateLocale(); })(); + +/** + * ----------------------------------------------------------------------------- + * Console warning + * ----------------------------------------------------------------------------- + */ +(() => { + window.onload = function () { + console.log('%cStop!', 'color: #F00; font-size: 30px; -webkit-text-stroke: 1px black; font-weight:bold'); + console.log( + 'This is part of your browser intended for developers. ' + + 'If someone told you to copy-and-paste something here, ' + + 'don\'t do it! It could allow them to take over your ' + + 'Scratch account, delete all of your projects, or do many ' + + 'other harmful things. If you don\'t understand what exactly ' + + 'you are doing here, you should close this window without doing ' + + 'anything.' + ); + }; +})(); From b4c35122b94065a1c08865c204081306cb9caf45 Mon Sep 17 00:00:00 2001 From: Joel Gritter Date: Fri, 29 Jun 2018 09:57:46 -0400 Subject: [PATCH 2/2] eslint-disable for console.log's Should resolve the Travis-CI errors --- src/init.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/init.js b/src/init.js index 2cc163d7a..883aca0ad 100644 --- a/src/init.js +++ b/src/init.js @@ -44,6 +44,7 @@ const Raven = require('raven-js'); */ (() => { window.onload = function () { + /* eslint-disable no-console */ console.log('%cStop!', 'color: #F00; font-size: 30px; -webkit-text-stroke: 1px black; font-weight:bold'); console.log( 'This is part of your browser intended for developers. ' + @@ -54,5 +55,6 @@ const Raven = require('raven-js'); 'you are doing here, you should close this window without doing ' + 'anything.' ); + /* eslint-enable no-console */ }; })();