diff --git a/bin/main/mainLoader.js b/bin/main/mainLoader.js index c5be473..e7bcdc2 100644 --- a/bin/main/mainLoader.js +++ b/bin/main/mainLoader.js @@ -131,7 +131,7 @@ const prebuildExecuteCode = executeScriptInfo => { if (prop === "localStorage" && ${!!executePreferences.localStorage} === false) { return undefined } - if (prop === "XMLHttpRequest" && ${!!executePreferences.XMLHTTPRequest} === false) { + if (prop === "XMLHttpRequest" && ${!!executePreferences.XMLHttpRequest} === false) { return undefined } if (prop === "WebSocket" && ${!!executePreferences.WebSocket} === false) { diff --git a/manager/Ping.js b/manager/Ping.js index 9675622..cbd3786 100644 --- a/manager/Ping.js +++ b/manager/Ping.js @@ -63,7 +63,7 @@ class Ping { _getService () { if (!this.services) return Promise.reject(new Error('services is null')) - const choseService = localStorage.getItem('choseService') + const choseService = window.localStorage.getItem('choseService') if (choseService) { this.currentService = this.serviceList.find(service => service === choseService) || @@ -110,6 +110,7 @@ class Ping { }) } + // 这个函数没有被使用 _renderError (err) { console.error(err) const serverTextDom = document.getElementById('serverText')