diff --git a/plugin/lib/sandbox.html b/plugin/lib/sandbox.html deleted file mode 100644 index e69de29..0000000 diff --git a/plugin/lib/sandbox.js b/plugin/lib/sandbox.js deleted file mode 100644 index dcfa3b2..0000000 --- a/plugin/lib/sandbox.js +++ /dev/null @@ -1,13 +0,0 @@ -window._ = require("lodash") -window.utools = require("./utoolsLite")() -window.exit = () => { - process.exit() -} -// 绕过限制 -setTimeout(() => { - Object.assign(window, { - process, - Buffer, - require - }) -}, 100); diff --git a/plugin/lib/utoolsLite.js b/plugin/lib/utoolsLite.js index 32b34f9..982fffd 100644 --- a/plugin/lib/utoolsLite.js +++ b/plugin/lib/utoolsLite.js @@ -1,6 +1,6 @@ const getuToolsLite = () => { var utoolsLite = Object.assign({}, _.cloneDeep(utools)) - // if (utools.isDev()) return utoolsLite + // if (utools.isDev()) return utoolsLite const dbBlackList = ['db', 'dbStorage', 'removeFeature', 'setFeature', 'onDbPull'] const payBlackList = ['fetchUserServerTemporaryToken', 'getUserServerTemporaryToken', 'openPayment', 'fetchUserPayments'] const etcBlackList = ['onPluginEnter', 'onPluginOut', 'createBrowserWindow'] diff --git a/plugin/preload.js b/plugin/preload.js index df5c07d..d0a5a5b 100644 --- a/plugin/preload.js +++ b/plugin/preload.js @@ -176,24 +176,6 @@ window.quickcommand = { process.execPath child_process.exec(uToolsPath, () => {}) }, - - // 显示一个全功能的 devTools - showDevTools: function() { - if (!browserWindow || browserWindow.webContents.isDestroyed()) { - browserWindow = createBrowserWindow('lib/sandbox.html', { - show: false, - title: '快捷命令', - webPreferences: { - preload: 'lib/sandbox.js', - }, - }, () => {}) - } - browserWindow.webContents.openDevTools({ - mode: 'detach' - }) - // browserWindow.webContents.executeJavaScript(``) - return browserWindow - } } // 运行vbs脚本