From e3331c370a5888097fb5f46493d37bca7fd5ceb0 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Wed, 9 Jun 2021 23:42:36 +0200 Subject: [PATCH] automatically logout when the user enablesJavaScript commented out for now --- HISTORY.md | 5 +++-- src/gui.js | 10 +++++++++- src/store.js | 1 - 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index a8dd5acf..9acca20e 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -18,8 +18,9 @@ * blocks: register unsaved changes when the user edits a comment * new Hindi translation, thanks, Barthdry! * fixed bignums library and and made colors library faster, thanks, Brian! -* fixed setting the IDE language via a url parameter, thanks, Joan! -* reinstated JS-function control, disabled JS-functions by default +* gui: fixed setting the IDE language via a url parameter, thanks, Joan! +* threads, gui, objects, byob, store: reinstated JS-function control, disabled JS-functions by default +* gui, store: automatically logout when the user enablesJavaScript, commented out for now ## 6.8.1 * **Notable Fixes:** diff --git a/src/gui.js b/src/gui.js index 2e2d3b6c..30b94d6f 100644 --- a/src/gui.js +++ b/src/gui.js @@ -3497,6 +3497,11 @@ IDE_Morph.prototype.settingsMenu = function () { addPreference( 'JavaScript', () => { + /* + if (!Process.prototype.enableJS) { + this.logout(); + } + */ Process.prototype.enableJS = !Process.prototype.enableJS; this.currentSprite.blocksCache.operators = null; this.currentSprite.paletteCache.operators = null; @@ -3504,7 +3509,10 @@ IDE_Morph.prototype.settingsMenu = function () { }, Process.prototype.enableJS, 'uncheck to disable support for\nnative JavaScript functions', - 'check to support\nnative JavaScript functions' + 'check to support\nnative JavaScript functions' /* + + '.\n' + + 'NOTE: You will have to manually\n' + + 'sign in again to access your account.' */ ); if (isRetinaSupported()) { addPreference( diff --git a/src/store.js b/src/store.js index 0c562cb0..27b48afc 100644 --- a/src/store.js +++ b/src/store.js @@ -1295,7 +1295,6 @@ SnapSerializer.prototype.loadInput = function (model, input, block, object) { }); input.fixLayout(); } else if (model.tag === 'block' || model.tag === 'custom-block') { -// block.silentReplaceInput(input, this.loadBlock(model, true, object)); block.replaceInput(input, this.loadBlock(model, true, object)); } else if (model.tag === 'color') { input.setColor(this.loadColor(model.contents));