From 96cf79451b22cbea1e672041e12ec4db59cf50e0 Mon Sep 17 00:00:00 2001 From: sanex3339 Date: Mon, 7 Nov 2016 16:49:09 +0300 Subject: [PATCH] template change: getGlobal() function strings should be inserted to different unicodeArray indexes in different customNodes. small changes between templates can allow this. --- dist/index.js | 7 ++++--- .../ConsoleOutputDisableExpressionTemplate.ts | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 409e9434..a40e1fad 100644 --- a/dist/index.js +++ b/dist/index.js @@ -88,7 +88,7 @@ module.exports = /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 86); +/******/ return __webpack_require__(__webpack_require__.s = 87); /******/ }) /************************************************************************/ /******/ ([ @@ -4127,7 +4127,7 @@ exports.SingleNodeCallControllerTemplate = SingleNodeCallControllerTemplate; "use strict"; function ConsoleOutputDisableExpressionTemplate() { - return "\n var {consoleLogDisableFunctionName} = {singleNodeCallControllerFunctionName}(this, function () {\n var getGlobal = Function('return (function () ' + '{}.constructor(\"return this\")()' + ');');\n \n var func = Function('for ' + '(;;)' + ' {}');\n var that = getGlobal();\n \n that.console.log = func; \n that.console.error = func;\n that.console.warn = func;\n that.console.info = func;\n });\n \n {consoleLogDisableFunctionName}();\n "; + return "\n var {consoleLogDisableFunctionName} = {singleNodeCallControllerFunctionName}(this, function () {\n var getGlobal = Function('return (function() ' + '{}.constructor(\"return this\")( )' + ');');\n \n var func = Function('for ' + '(;;)' + ' {}');\n var that = getGlobal();\n \n that.console.log = func; \n that.console.error = func;\n that.console.warn = func;\n that.console.info = func;\n });\n \n {consoleLogDisableFunctionName}();\n "; } exports.ConsoleOutputDisableExpressionTemplate = ConsoleOutputDisableExpressionTemplate; @@ -4324,7 +4324,8 @@ module.exports = require("fs"); module.exports = require("mkdirp"); /***/ }, -/* 86 */ +/* 86 */, +/* 87 */ /***/ function(module, exports, __webpack_require__) { "use strict"; diff --git a/src/templates/custom-nodes/console-output-nodes/console-output-disable-expression-node/ConsoleOutputDisableExpressionTemplate.ts b/src/templates/custom-nodes/console-output-nodes/console-output-disable-expression-node/ConsoleOutputDisableExpressionTemplate.ts index 434bb508..a69212fe 100644 --- a/src/templates/custom-nodes/console-output-nodes/console-output-disable-expression-node/ConsoleOutputDisableExpressionTemplate.ts +++ b/src/templates/custom-nodes/console-output-nodes/console-output-disable-expression-node/ConsoleOutputDisableExpressionTemplate.ts @@ -4,7 +4,7 @@ export function ConsoleOutputDisableExpressionTemplate (): string { return ` var {consoleLogDisableFunctionName} = {singleNodeCallControllerFunctionName}(this, function () { - var getGlobal = Function('return (function () ' + '{}.constructor("return this")()' + ');'); + var getGlobal = Function('return (function() ' + '{}.constructor("return this")( )' + ');'); var func = Function('for ' + '(;;)' + ' {}'); var that = getGlobal();