diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-07-14 18:17:53 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-07-14 18:17:53 +0800 |
commit | 9ffe3b2c22e30974087d4812bc757155f09d6e57 (patch) | |
tree | 3af726747089775e4f6da2b2f0b1d9f8b612d8aa /features/settings | |
parent | 598dadc9efadf69401f08d27e5b0ff1b36a0f2bc (diff) | |
download | SoopyV2-9ffe3b2c22e30974087d4812bc757155f09d6e57.tar.gz SoopyV2-9ffe3b2c22e30974087d4812bc757155f09d6e57.tar.bz2 SoopyV2-9ffe3b2c22e30974087d4812bc757155f09d6e57.zip |
+ Update website url
Diffstat (limited to 'features/settings')
-rw-r--r-- | features/settings/helpDataLoader.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/features/settings/helpDataLoader.js b/features/settings/helpDataLoader.js index 3a2e8f5..7c463b2 100644 --- a/features/settings/helpDataLoader.js +++ b/features/settings/helpDataLoader.js @@ -5,30 +5,30 @@ class HelpDataLoader { this.availableHelpData = {} this.dataCach = {} - fetch("http://soopymc.my.to/api/soopyv2/settingshelpoptions.json").json(data=>{ - Object.keys(data).forEach(category=>{ + fetch("http://soopy.dev/api/soopyv2/settingshelpoptions.json").json(data => { + Object.keys(data).forEach(category => { this.availableHelpData[category] = new Set(data[category]) }); }) } - hasData(category, id){ + hasData(category, id) { return this.availableHelpData[category] && this.availableHelpData[category].has(id) } - getData(category, id, callback){ - if(!this.hasData(category, id)){ + getData(category, id, callback) { + if (!this.hasData(category, id)) { callback("") return } - if(this.dataCach[category] && this.dataCach[category][id]){ + if (this.dataCach[category] && this.dataCach[category][id]) { callback(this.dataCach[category][id]) return } - fetch("http://soopymc.my.to/api/soopyv2/settingshelp/" + category + "/" + id).text(data=>{ - if(!this.dataCach[category]){ + fetch("http://soopy.dev/api/soopyv2/settingshelp/" + category + "/" + id).text(data => { + if (!this.dataCach[category]) { this.dataCach[category] = {} } @@ -39,10 +39,10 @@ class HelpDataLoader { } } -if(!global.helpDataLoader){ +if (!global.helpDataLoader) { global.helpDataLoader = new HelpDataLoader(); - - register("gameUnload", ()=>{ + + register("gameUnload", () => { global.helpDataLoader = undefined }) } |