diff --git a/client/commonFramework/add-loop-protect.js b/client/commonFramework/add-loop-protect.js index 65aebd0ed47..56ad7389b2e 100644 --- a/client/commonFramework/add-loop-protect.js +++ b/client/commonFramework/add-loop-protect.js @@ -5,7 +5,11 @@ window.common = (function(global) { } = global; loopProtect.hit = function hit(line) { - var err = `Error: Exiting potential infinite loop at line ${line}.`; + var err = 'Error: Exiting potential infinite loop at line ' + + line + + '. To disable loop protection, write: \n\\/\\/ noprotect\nas the first' + + 'line. Beware that if you do have an infinite loop in your code' + + 'this will crash your browser.'; console.error(err); }; diff --git a/client/commonFramework/update-preview.js b/client/commonFramework/update-preview.js index ab99e46a6f0..138a9f2fd35 100644 --- a/client/commonFramework/update-preview.js +++ b/client/commonFramework/update-preview.js @@ -13,7 +13,11 @@ window.common = (function(global) { window.__err = null; window.loopProtect.hit = function(line) { window.__err = new Error( - 'Potential infinite loop at line ' + line + 'Potential infinite loop at line ' + + line + + '. To disable loop protection, write: \\n\\/\\/ noprotect\\nas the first' + + ' line. Beware that if you do have an infinite loop in your code' + + ' this will crash your browser.' ); };