diff --git a/src/class/UrlMatch.ts b/src/class/UrlMatch.ts
index 44fbd29..65636f2 100644
--- a/src/class/UrlMatch.ts
+++ b/src/class/UrlMatch.ts
@@ -310,7 +310,7 @@ $1,000
// 圣诞小镇
if (href.contains(/christmas_town\.php/)) {
let $root = document.querySelector('#christmastownroot');
- const { xmasTownWT, xmasTownNotify } = getWhSettingObj()
+ const [xmasTownWT, xmasTownNotify] = WuhuConfig.get(['xmasTownWT', 'xmasTownNotify']);
// 解密攻略
if (xmasTownWT) {
const insert_html = `
diff --git a/src/class/WuhuConfig.ts b/src/class/WuhuConfig.ts
index 3d3f148..cae881c 100644
--- a/src/class/WuhuConfig.ts
+++ b/src/class/WuhuConfig.ts
@@ -3,8 +3,16 @@ import Alert from "./utils/Alert";
import Log from "./Log";
export default class WuhuConfig extends WuhuBase {
- static get(key: string) {
- return WuhuConfig.getLocal()[key];
+ static get(key: string | string[]) {
+ let localPool = this.getLocal();
+ if (typeof key === 'string') return localPool[key];
+ else {
+ let ret: string[] = [];
+ key.forEach(k => {
+ ret.push(localPool[k])
+ });
+ return ret;
+ }
}
static set(key: string, val: any, isNotify = false, callback: Function = () => null) {
diff --git a/src/class/action/TravelItem.ts b/src/class/action/TravelItem.ts
index 8210403..29af229 100644
--- a/src/class/action/TravelItem.ts
+++ b/src/class/action/TravelItem.ts
@@ -3,7 +3,7 @@ import Log from "../Log";
import WuhuBase from "../WuhuBase";
import UserScriptEngine from "../../enum/UserScriptEngine";
import Popup from "../utils/Popup";
-import * as STOCK_PNG from "../../json/github.io.stock.png.json";
+import STOCK_IMG_HTML from "../../html/stock_img.html";
import * as FILTER from "../../json/ForStockItemFilter.json";
export default class TravelItem extends WuhuBase {
@@ -35,7 +35,7 @@ export default class TravelItem extends WuhuBase {
// 呈现内容
public async clickHandler(): Promise
{
if (CommonUtils.getScriptEngine() === UserScriptEngine.RAW) {
- new Popup(STOCK_PNG.html.replace('{{}}', performance.now().toString()), '飞花库存');
+ new Popup(STOCK_IMG_HTML.replace('{{}}', performance.now().toString()), '飞花库存');
} else {
const popup = new Popup("请稍后 " + CommonUtils.loading_gif_html(), '飞花库存');
let table = `| 目的地 - 更新时间 | 库存 |
`;
diff --git a/src/class/utils/CommonUtils.ts b/src/class/utils/CommonUtils.ts
index 155aa7c..ec48470 100644
--- a/src/class/utils/CommonUtils.ts
+++ b/src/class/utils/CommonUtils.ts
@@ -4,7 +4,7 @@ import Log from "../Log";
import Device from "../../enum/Device";
import AjaxFetchOption from "../../interface/AjaxFetchOption";
import Alert from "./Alert";
-import * as LOADING_JSON from "../../json/loading.json";
+import LOADING_IMG_HTML from "../../html/loading_img.html";
export default class CommonUtils extends WuhuBase {
static getScriptEngine() {
@@ -175,6 +175,6 @@ export default class CommonUtils extends WuhuBase {
}
static loading_gif_html(): string {
- return LOADING_JSON.html;
+ return LOADING_IMG_HTML;
}
}
\ No newline at end of file
diff --git a/src/html/loading_img.html b/src/html/loading_img.html
new file mode 100644
index 0000000..c3d64ec
--- /dev/null
+++ b/src/html/loading_img.html
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/src/html/stock_img.html b/src/html/stock_img.html
new file mode 100644
index 0000000..232f308
--- /dev/null
+++ b/src/html/stock_img.html
@@ -0,0 +1,2 @@
+
\ No newline at end of file
diff --git a/src/json/github.io.stock.png.json b/src/json/github.io.stock.png.json
deleted file mode 100644
index 2df561e..0000000
--- a/src/json/github.io.stock.png.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "html": "
"
-}
\ No newline at end of file
diff --git a/src/json/loading.json b/src/json/loading.json
deleted file mode 100644
index e467d5f..0000000
--- a/src/json/loading.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "loading gif html",
- "html": "
"
-}
\ No newline at end of file