aboutsummaryrefslogtreecommitdiff
path: root/features/settings
diff options
context:
space:
mode:
Diffstat (limited to 'features/settings')
-rw-r--r--features/settings/helpDataLoader.js22
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
})
}