This commit is contained in:
Liwanyi 2022-09-29 19:18:25 +08:00
parent 3f1b6239ca
commit 4f71a18a1e
30 changed files with 436 additions and 1838 deletions

21
package-lock.json generated
View File

@ -30,6 +30,14 @@
"js-tokens": "^4.0.0" "js-tokens": "^4.0.0"
} }
}, },
"@rollup/plugin-json": {
"version": "4.1.0",
"resolved": "https://registry.npmmirror.com/@rollup/plugin-json/-/plugin-json-4.1.0.tgz",
"integrity": "sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==",
"requires": {
"@rollup/pluginutils": "^3.0.8"
}
},
"@rollup/plugin-typescript": { "@rollup/plugin-typescript": {
"version": "8.5.0", "version": "8.5.0",
"resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.5.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.5.0.tgz",
@ -44,7 +52,6 @@
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz",
"integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==",
"dev": true,
"requires": { "requires": {
"@types/estree": "0.0.39", "@types/estree": "0.0.39",
"estree-walker": "^1.0.1", "estree-walker": "^1.0.1",
@ -54,8 +61,7 @@
"@types/estree": { "@types/estree": {
"version": "0.0.39", "version": "0.0.39",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
"integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw=="
"dev": true
}, },
"@types/jquery": { "@types/jquery": {
"version": "3.5.14", "version": "3.5.14",
@ -122,8 +128,7 @@
"estree-walker": { "estree-walker": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz",
"integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg=="
"dev": true
}, },
"fsevents": { "fsevents": {
"version": "2.3.2", "version": "2.3.2",
@ -216,8 +221,7 @@
"picomatch": { "picomatch": {
"version": "2.3.1", "version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="
"dev": true
}, },
"resolve": { "resolve": {
"version": "1.22.1", "version": "1.22.1",
@ -297,7 +301,8 @@
"uglify-js": { "uglify-js": {
"version": "3.16.1", "version": "3.16.1",
"resolved": "https://registry.npmmirror.com/uglify-js/-/uglify-js-3.16.1.tgz", "resolved": "https://registry.npmmirror.com/uglify-js/-/uglify-js-3.16.1.tgz",
"integrity": "sha512-X5BGTIDH8U6IQ1TIRP62YC36k+ULAa1d59BxlWvPUJ1NkW5L3FwcGfEzuVvGmhJFBu0YJ5Ge25tmRISqCmLiRQ==" "integrity": "sha512-X5BGTIDH8U6IQ1TIRP62YC36k+ULAa1d59BxlWvPUJ1NkW5L3FwcGfEzuVvGmhJFBu0YJ5Ge25tmRISqCmLiRQ==",
"dev": true
} }
} }
} }

View File

@ -1,8 +1,7 @@
{ {
"name": "wuhu-torn-helper", "name": "wuhu-torn-helper",
"version": "0.5.1", "version": "0.5.1",
"dependencies": { "dependencies": {},
},
"scripts": { "scripts": {
"release": "npm run minify && node build.js", "release": "npm run minify && node build.js",
"minify": "uglifyjs misc/wuhu-torn-helper.js -o release.min.user.js -m", "minify": "uglifyjs misc/wuhu-torn-helper.js -o release.min.user.js -m",
@ -14,6 +13,7 @@
"@rollup/plugin-typescript": "^8.5.0", "@rollup/plugin-typescript": "^8.5.0",
"@types/jquery": "^3.5.14", "@types/jquery": "^3.5.14",
"@types/node": "^18.0.6", "@types/node": "^18.0.6",
"@rollup/plugin-json": "^4.1.0",
"rollup": "^2.79.0", "rollup": "^2.79.0",
"rollup-plugin-serve": "^2.0.1", "rollup-plugin-serve": "^2.0.1",
"tslib": "^2.4.0", "tslib": "^2.4.0",

View File

@ -1,4 +1,5 @@
import typescript from "@rollup/plugin-typescript"; import typescript from "@rollup/plugin-typescript";
import json from "@rollup/plugin-json";
export default { export default {
input: 'src/index.ts', input: 'src/index.ts',
@ -7,6 +8,7 @@ export default {
}, },
plugins: [ plugins: [
typescript(), typescript(),
json(),
// uglify(), // uglify(),
], ],
}; };

View File

@ -1,8 +1,8 @@
import WuhuBase from "./WuhuBase"; import WuhuBase from "./WuhuBase";
import WuHuTornHelper from "./WuhuTornHelper"; import WuHuTornHelper from "./WuhuTornHelper";
import ZhongIcon from "./ZhongIcon"; import ZhongIcon from "./ZhongIcon";
import { Common } from "../common"; import { Common } from "./Common";
import UrlPattern from "../urlMatch"; import UrlPattern from "./UrlMatch";
import WuhuConfig from "./WuhuConfig"; import WuhuConfig from "./WuhuConfig";
import translateMain from "../func/translate/translateMain"; import translateMain from "../func/translate/translateMain";
@ -23,7 +23,7 @@ export default class Application {
if (WuhuConfig.get('transEnable')) translateMain(glob.href); if (WuhuConfig.get('transEnable')) translateMain(glob.href);
let runTime = (performance.now() - started) | 0; let runTime: number = (performance.now() - started) | 0;
ZhongIcon.ZhongNode.initTimer.innerHTML = `助手加载时间 ${ runTime }ms`; ZhongIcon.ZhongNode.initTimer.innerHTML = `助手加载时间 ${ runTime }ms`;
} }
} }

View File

@ -1,10 +1,10 @@
import elementReady from "./func/utils/elementReady"; import elementReady from "../func/utils/elementReady";
import depoHelper from "./func/module/depoHelper"; import depoHelper from "../func/module/depoHelper";
import travelHelper from "./func/module/travelHelper"; import travelHelper from "../func/module/travelHelper";
import attackHelper from "./func/module/attackHelper"; import attackHelper from "../func/module/attackHelper";
import priceWatcherHandle from "./func/module/priceWatcherHandle"; import priceWatcherHandle from "../func/module/priceWatcherHandle";
import WuhuBase from "./class/WuhuBase"; import WuhuBase from "./WuhuBase";
import WuhuConfig from "./class/WuhuConfig"; import WuhuConfig from "./WuhuConfig";
export class Common extends WuhuBase { export class Common extends WuhuBase {
static resolve() { static resolve() {

View File

@ -1,12 +1,16 @@
export default class Log { export default class Log {
static info(...o): void { static info(...o): void {
if (this.debug()) { if (this.debug()) {
console.log('[WH]', this.getTime(), ...o) console.log('[WH] IFO', this.getTime(), ...o)
} }
} }
static error(...o): void { static error(...o): void {
(this.debug()) && (console.error('[WH]', this.getTime(), ...o)) (this.debug()) && (console.error('[WH] ERR', this.getTime(), ...o))
}
static warn(...o): void {
(this.debug()) && (console.warn('[WH] WRN', this.getTime(), ...o))
} }
static debug(): boolean { static debug(): boolean {

View File

@ -1,15 +1,15 @@
import getWhSettingObj from "./func/utils/getWhSettingObj"; import getWhSettingObj from "../func/utils/getWhSettingObj";
import cityFinder from "./func/module/cityFinder"; import cityFinder from "../func/module/cityFinder";
import elementReady from "./func/utils/elementReady"; import elementReady from "../func/utils/elementReady";
import { missionDict } from "./dictionary/translation"; import { missionDict } from "../dictionary/translation";
import getTaskHint from "./func/translate/getTaskHint"; import getTaskHint from "../func/translate/getTaskHint";
import Device from "./enum/Device"; import Device from "../enum/Device";
import WuhuBase from "./class/WuhuBase"; import WuhuBase from "./WuhuBase";
import Utils from "./class/utils/Utils"; import Utils from "./utils/Utils";
import Log from "./class/Log"; import Log from "./Log";
import WuhuConfig from "./class/WuhuConfig"; import WuhuConfig from "./WuhuConfig";
import Alert from "./class/utils/Alert"; import Alert from "./utils/Alert";
import InfoUtils from "./class/utils/InfoUtils"; import InfoUtils from "./utils/InfoUtils";
export default class UrlPattern extends WuhuBase { export default class UrlPattern extends WuhuBase {
constructor() { constructor() {

View File

@ -16,7 +16,7 @@ export default class WuhuConfig extends WuhuBase {
if (isNotify) if (isNotify)
new Alert('已保存设置') new Alert('已保存设置')
new Promise(() => callback()).then(); new Promise(() => callback()).then();
Log.info('值变更:' + prev + ' -> ' + val); Log.info(`值变更:[${ key }] ${ prev } -> ${ val }`);
return val; return val;
} }
} }

View File

@ -5,6 +5,7 @@ import TravelItem from "./action/TravelItem";
import Global from "./Global"; import Global from "./Global";
import Log from "./Log"; import Log from "./Log";
import WuhuConfig from "./WuhuConfig"; import WuhuConfig from "./WuhuConfig";
import * as css from "../json/css.json"
export default class WuHuTornHelper extends WuhuBase { export default class WuHuTornHelper extends WuhuBase {
@ -12,15 +13,19 @@ export default class WuHuTornHelper extends WuhuBase {
Log.info('WuHuTornHelper初始化'); Log.info('WuHuTornHelper初始化');
WuhuBase.glob = Global.getInstance() as Global; WuhuBase.glob = Global.getInstance() as Global;
let glob = WuHuTornHelper.glob; let glob = WuHuTornHelper.glob;
glob.fStock = TravelItem.getInstance() as TravelItem; glob.fStock = TravelItem.getInstance();
Log.info('fStock: ', glob.fStock) Log.info('fStock: ', glob.fStock)
// 请求通知权限 // 请求通知权限
if (window.Notification && window.Notification.permission !== 'granted') { if (window.Notification) {
window.alert("芜湖助手即将请求浏览器通知权限……"); if (window.Notification.permission !== 'granted') {
Log.info("芜湖助手即将请求浏览器通知权限……");
window.Notification.requestPermission().then(); window.Notification.requestPermission().then();
} else { } else {
Log.info({ Notification }); Log.warn('没有浏览器通知权限');
}
} else {
Log.error('当前浏览器不支持系统通知');
} }
// 扩展正则方法 // 扩展正则方法
@ -51,191 +56,7 @@ export default class WuHuTornHelper extends WuhuBase {
return clone; return clone;
}; };
Utils.addStyle(` Utils.addStyle(css.css);
.wh-hide{display:none;}
#wh-trans-icon{
user-select:none;
display: inline-block;
position: fixed;
top:5px;
left:5px;
z-index:100010;
border-radius:4px;
max-width: 220px;
box-shadow: 0 0 3px 1px #8484848f;
}
div#effectiveness-wrap{overflow-y:hidden;}
@media screen and (max-width: 600px) {
#wh-trans-icon{top:0;left:112px;}
/* 冰蛙公司效率表 */
div#effectiveness-wrap {
margin-left: -80px;
margin-right: -76px;
}
}
#wh-trans-icon select{width:110px;}
#wh-trans-icon a {
text-decoration: none;
color: #006599;
background: none;
}
#wh-trans-icon:not(.wh-icon-expanded):hover {background: #f8f8f8;}
#wh-trans-icon button{
margin:0;
padding:0;
border:0;
cursor:pointer;
}
#wh-inittimer{margin-top:6px;color:#b0b0b0;}
#wh-gSettings div{margin: 4px 0;}
#wh-trans-icon .wh-container{
margin:0;
padding:0 16px 16px;
border:0;
}
#wh-trans-icon-btn{
height:16px;
width:16px;
background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M160 144a32 32 0 0 0-32 32V864a32 32 0 0 0 32 32h688a32 32 0 0 0 32-32V176a32 32 0 0 0-32-32H160z m0-64h688a96 96 0 0 1 96 96V864a96 96 0 0 1-96 96H160a96 96 0 0 1-96-96V176a96 96 0 0 1 96-96z"/><path d="M482.176 262.272h59.616v94.4h196v239.072h-196v184.416h-59.616v-184.416H286.72v-239.04h195.456V262.24z m-137.504 277.152h137.504v-126.4H344.64v126.4z m197.12 0h138.048v-126.4H541.76v126.4z"/></svg>') no-repeat center;
padding:16px !important;
}
#wh-trans-icon .wh-container{display:none;}
#wh-trans-icon.wh-icon-expanded .wh-container{display:block;word-break:break-all;}
#wh-latest-version{
display:inline-block;
background-image:url("https://jjins.github.io/t2i/version.png?${ performance.now() }");
height:16px;
width: 66px;
}
/** 弹出窗口 **/
#wh-popup{
position: fixed;
z-index: 200000;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #00000090;
color:#333;
}
div#wh-popup::after {
content: '点击空白处关闭';
display: block;
color: #ffffffdb;
text-align: center;
font-size: 14px;
line-height: 22px;
}
#wh-popup-container{
max-width: 568px;
margin: 5em auto 0;
background: #d7d7d7;
min-height: 120px;
box-shadow: 0 0 5px 1px #898989;
border-radius: 4px;
}
#wh-popup-title p{
padding: 1em 0;
font-size: 16px;
font-weight: bold;
text-align: center;
}
/** 弹出窗口的内容 **/
#wh-popup-cont{
padding: 0 1em 1em;
max-height: 30em;
overflow-y: auto;
font-size:14px;
line-height: 16px;
}
#wh-popup-cont .gSetting > div{
display: inline-block;
width: 47%;
margin: 2px 0;
}
#wh-popup-cont .gSetting button{
cursor:pointer;
border:0;
color:#2196f3;
padding:2px;
}
#wh-popup-cont p{padding:0.25em 0;}
#wh-popup-cont a{color:red;text-decoration:none;}
#wh-popup-cont li{margin:4px 0;}
#wh-popup-cont h4{margin:0;padding: 0.5em 0;}
#wh-popup-cont button{
margin: 0 4px 0 0;
padding: 5px 8px;
border: solid 2px black;
color: black;
border-radius: 3px;
}
#wh-popup-cont button[disabled]{opacity: 0.5;}
#wh-popup-cont input{
padding: 2px;
text-align: center;
border: 1px solid #fff0;
border-radius: 5px;
margin:1px 2px;
}
#wh-popup-cont input:focus{border-color:blue;}
#wh-popup-cont table{width:100%;border-collapse:collapse;border:1px solid;}
#wh-popup-cont td, #wh-popup-cont th{border-collapse:collapse;padding:4px;border:1px solid;}
.wh-display-none{display:none !important;}
#wh-gym-info-cont{
background-color: #363636;
color: white;
padding: 8px;
font-size: 15px;
border-radius: 4px;
text-shadow: 0 0 2px black;
background-image: linear-gradient(90deg,transparent 50%,rgba(0,0,0,.07) 0);
background-size: 4px;
line-height: 20px;
}
#wh-gym-info-cont button{
cursor:pointer;
}
#wh-notify {
display: inline-block;
position: fixed;
top: 0;
left: calc(50% - 180px);
width: 360px;
z-index: 9999990;
color:#333;
}
#wh-notify a{
color:red;
text-decoration:none;
}
#wh-notify .wh-notify-item {
/*height: 50px;*/
background: rgb(239 249 255 / 90%);
border-radius: 2px;
margin: 0.5em 0 0 0;
box-shadow: 0 0 5px 0px #959595;
}
#wh-notify .wh-notify-item:hover {
background: rgb(239 249 255 / 98%);
}
#wh-notify .wh-notify-item .wh-notify-bar {
height:2px;
background:#2196f3;
}
#wh-notify .wh-notify-item .wh-notify-close {
float:right;
padding:0;
width:16px;height:16px;
background:url('data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%201024%201024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M923%20571H130.7c-27.6%200-50-22.4-50-50s22.4-50%2050-50H923c27.6%200%2050%2022.4%2050%2050s-22.4%2050-50%2050z%22%20fill%3D%22%232196f3%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E') no-repeat center;
background-size:100%;
margin: 6px 6px 0 0;
cursor: pointer;
}
#wh-notify .wh-notify-item .wh-notify-msg {
padding:12px;
}
`);
// 测试用 // 测试用
if ('Ok' !== localStorage['WHTEST']) { if ('Ok' !== localStorage['WHTEST']) {

View File

@ -1,8 +1,7 @@
import popupMsg from "../func/utils/popupMsg"; import popupMsg from "../func/utils/@deprecated/popupMsg";
import forStock from "../func/utils/forStock"; import forStock from "../func/utils/forStock";
import doQuickFly from "../func/module/doQuickFly"; import doQuickFly from "../func/module/doQuickFly";
import loadGS from "../func/module/loadGS"; import loadGS from "../func/module/loadGS";
import loading_gif_html from "../func/utils/loading_gif_html";
import adHelper from "../func/module/adHelper"; import adHelper from "../func/module/adHelper";
import safeKeeper from "../func/module/safeKeeper"; import safeKeeper from "../func/module/safeKeeper";
import mdParse from "../func/utils/MarkdownParser"; import mdParse from "../func/utils/MarkdownParser";
@ -15,6 +14,9 @@ import Utils from "./utils/Utils";
import WuhuConfig from "./WuhuConfig"; import WuhuConfig from "./WuhuConfig";
import Alert from "./utils/Alert"; import Alert from "./utils/Alert";
import IGlobal from "../interface/IGlobal"; import IGlobal from "../interface/IGlobal";
import Test from "../test/Test";
import * as EVENTS from "../json/event.json";
import * as FEST from "../json/fest.json";
export default class ZhongIcon extends WuhuBase { export default class ZhongIcon extends WuhuBase {
static ZhongNode: MyHTMLElement = null; static ZhongNode: MyHTMLElement = null;
@ -33,7 +35,7 @@ export default class ZhongIcon extends WuhuBase {
input.id = domId; input.id = domId;
input.checked = WuhuConfig.get(dictName); input.checked = WuhuConfig.get(dictName);
input.onchange = e => { input.onchange = e => {
WuhuConfig.set(dictName, (e.target as HTMLInputElement).checked); WuhuConfig.set(dictName, (e.target as HTMLInputElement).checked, true);
if (setting.changeEv) setting.changeEv(e); if (setting.changeEv) setting.changeEv(e);
}; };
label.innerHTML = domText; label.innerHTML = domText;
@ -84,6 +86,7 @@ export default class ZhongIcon extends WuhuBase {
} }
} }
// 移动节点 // 移动节点
Log.info('创建node', new_node);
return root_node.appendChild(new_node); return root_node.appendChild(new_node);
} }
@ -228,24 +231,7 @@ export default class ZhongIcon extends WuhuBase {
let fest_date_html = '<button>节日</button>: '; let fest_date_html = '<button>节日</button>: ';
{ {
// 节日字典 // 节日字典
const dict = { const dict = FEST.val;
'0105': { name: '周末自驾游', eff: '获得双倍的赛车点数与赛车技能等级增益' },
'0114': { name: '情人节', eff: '使用爱情果汁(Love Juice)后获得降低攻击与复活的能量消耗的增益' },
'0204': { name: '员工激励日', eff: '获得三倍的工作点数与火车增益' },
'0217': { name: '圣帕特里克日', eff: '获得双倍的酒类效果增益,城市中可以捡到绿色世涛(Green Stout)' },
'0320': { name: '420日', eff: '获得三倍的大麻(Cannabis)效果增益' },
'0418': { name: '博物馆日', eff: '获得10%提高的博物馆PT兑换增益' },
'0514': { name: '世界献血日', eff: '获得减半的抽血CD和扣血增益' },
'0611': { name: '世界人口日', eff: '获得双倍的通过攻击获取的经验的增益' },
'0629': { name: '世界老虎日', eff: '获得5倍的狩猎技能增益' },
'0705': { name: '国际啤酒节', eff: '获得5倍的啤酒物品效果增益' },
'0827': { name: '旅游节', eff: '获得双倍的起飞后物品携带容量增益' },
'0915': { name: '饮料节', eff: '获得双倍的能量饮料效果增益' },
'1014': { name: '世界糖尿病日', eff: '获得三倍的糖类效果增益' },
'1015': { name: '周年庆', eff: '左上角的TORN图标可以食用' },
'1025': { name: '黑色星期五', eff: '某些商家将提供1元购活动' },
'1114': { name: '住院日', eff: '获得降低75%的住院时间增益' },
};
menu_list.fest_date_dict = dict; menu_list.fest_date_dict = dict;
menu_list.fest_date_list = Object.keys(dict); menu_list.fest_date_list = Object.keys(dict);
const formatMMDD = (m, d) => { const formatMMDD = (m, d) => {
@ -284,43 +270,7 @@ export default class ZhongIcon extends WuhuBase {
let eventObj: EventWrapper = { let eventObj: EventWrapper = {
onEv: false, onEv: false,
daysLeft: Infinity, daysLeft: Infinity,
events: [ events: EVENTS,
{
start: [0, 17, 8], end: [0, 24, 8],
name: '捡垃圾周',
eff: '获得捡垃圾概率提升的增益',
},
{
start: [3, 5, 20], end: [3, 25, 20],
name: '复活节狩猎',
eff: '复活节彩蛋会随机出现集齐10个可兑换金蛋和一个独特的头像框(章)。',
},
{
start: [5, 20, 20], end: [5, 29, 20],
name: '狗牌',
eff: '击败其他玩家以获得狗牌,小心保护你的狗牌。',
},
{
start: [6, 5, 20], end: [6, 25, 20],
name: '托恩先生和托恩女士',
eff: '上传你的真实图片,然后拿章',
},
{
start: [8, 5, 20], end: [8, 23, 20],
name: '大逃杀',
eff: '加入特定队伍后攻击其他队伍玩家存活下来的3个队伍可以拿章',
},
{
start: [9, 25, 20], end: [10, 1, 20],
name: '不给糖就捣蛋',
eff: '买篮子之后攻击其他玩家后会随机掉落糖果,可用于兑换许多高价值物品',
},
{
start: [11, 14, 20], end: [11, 31, 20],
name: '圣诞小镇',
eff: '在小镇中闲逛来获取随机掉落的物品',
},
],
}; };
menu_list.events = eventObj.events; menu_list.events = eventObj.events;
eventObj.events.forEach((obj, index) => { eventObj.events.forEach((obj, index) => {
@ -741,7 +691,7 @@ background-size: 100% auto !important;
clickFunc: function () { clickFunc: function () {
// 弹出小窗口 // 弹出小窗口
const ifHTML = `<iframe src="/crimes.php?step=main" style="width:100%;max-width: 450px;margin: 0 auto;display: none;height: 340px;"></iframe>`; const ifHTML = `<iframe src="/crimes.php?step=main" style="width:100%;max-width: 450px;margin: 0 auto;display: none;height: 340px;"></iframe>`;
const popup_insert = `<p>加载中请稍后${ loading_gif_html() }</p><div id="wh-quick-crime-if-container"></div>`; const popup_insert = `<p>加载中请稍后${ Utils.loading_gif_html() }</p><div id="wh-quick-crime-if-container"></div>`;
const $popup = popupMsg(popup_insert, '小窗快速犯罪'); const $popup = popupMsg(popup_insert, '小窗快速犯罪');
// 运行状态node // 运行状态node
let loading_node = $popup.querySelector('p:first-of-type'); let loading_node = $popup.querySelector('p:first-of-type');
@ -962,7 +912,7 @@ color:black;
clickFunc: async function () { clickFunc: async function () {
Log.info('测试开始'); Log.info('测试开始');
Test.getInstance().test();
Log.info('测试结束'); Log.info('测试结束');
}, },

View File

@ -1,8 +1,8 @@
import Utils from "../utils/Utils"; import Utils from "../utils/Utils";
import WuhuBaseAction from "./WuhuBaseAction";
import Log from "../Log"; import Log from "../Log";
import WuhuBase from "../WuhuBase";
export default class TravelItem extends WuhuBaseAction { export default class TravelItem extends WuhuBase {
obj: any = null; obj: any = null;
res: any = null; res: any = null;
@ -25,4 +25,7 @@ export default class TravelItem extends WuhuBaseAction {
} }
return this.obj; return this.obj;
} }
public clickHandler() {
}
} }

View File

@ -1,7 +1,7 @@
import uuidv4 from "../../func/utils/uuidv4"; import uuidv4 from "../../func/utils/uuidv4";
import WuhuBaseAction from "./WuhuBaseAction"; import WuhuBase from "../WuhuBase";
export default class WindowActiveState extends WuhuBaseAction { export default class WindowActiveState extends WuhuBase {
isFocus = false; isFocus = false;
uuid = uuidv4(); uuid = uuidv4();

View File

@ -1,15 +1,15 @@
import WuhuBase from "../WuhuBase"; // import WuhuBase from "../WuhuBase";
//
export default class WuhuBaseAction extends WuhuBase { // export default class WuhuBaseAction extends WuhuBase {
name: string // name: string
//
protected constructor() { // protected constructor() {
super(); // super();
} // }
//
// static getInstance(this) { // // static getInstance(this) {
// if (!this.instance) // // if (!this.instance)
// this.instance = new this(); // // this.instance = new this();
// return this.instance; // // return this.instance;
// // }
// } // }
}

View File

@ -2,8 +2,9 @@ export default class Starter {
public static run(T): void { public static run(T): void {
try { try {
new T().main(); new T().main();
} catch (e) { } catch (error) {
console.log(e); console.log(error);
console.log('trace: ', JSON.stringify({ error }));
} }
} }
} }

46
src/class/utils/Popup.ts Normal file
View File

@ -0,0 +1,46 @@
import WuhuBase from "../WuhuBase";
export default class Popup extends WuhuBase {
private readonly container: HTMLElement = null;
private readonly node: HTMLElement = null;
constructor(innerHTML: string, title: string = '芜湖助手') {
super();
if (Popup.glob.popup_node) Popup.glob.popup_node.close();
const popup = document.createElement('div');
popup.id = 'wh-popup';
popup.innerHTML = `<div id="wh-popup-container">
<style>html{overflow: hidden !important;}</style>
<div id="wh-popup-title"><p>${ title }</p></div>
<div id="wh-popup-cont">${ innerHTML }</div>
</div>`;
document.body.append(popup);
popup.addEventListener('click', e => {
e.stopImmediatePropagation();
if (e.target === popup) this.close();
});
this.container = popup;
this.node = popup.querySelector('#wh-popup-cont');
this.hideChat();
}
public close() {
this.container.remove();
this.showChat();
}
public getElement(): HTMLElement {
return this.node;
}
private hideChat() {
document.querySelector('#chatRoot').classList.add('wh-hide');
}
private showChat() {
document.querySelector('#chatRoot').classList.remove('wh-hide');
}
private getInstance() {
}
}

View File

@ -4,6 +4,7 @@ import Log from "../Log";
import Device from "../../enum/Device"; import Device from "../../enum/Device";
import AjaxFetchOption from "../../interface/AjaxFetchOption"; import AjaxFetchOption from "../../interface/AjaxFetchOption";
import Alert from "./Alert"; import Alert from "./Alert";
import * as json from "../../json/loading.json";
export default class Utils extends WuhuBase { export default class Utils extends WuhuBase {
static getScriptEngine() { static getScriptEngine() {
@ -172,4 +173,8 @@ export default class Utils extends WuhuBase {
} }
Log.info('CSS规则已添加', element); Log.info('CSS规则已添加', element);
} }
static loading_gif_html(): string {
return json.html;
}
} }

View File

@ -1,4 +1,4 @@
import popupMsg from "../utils/popupMsg"; import popupMsg from "../utils/@deprecated/popupMsg";
// 传单助手 // 传单助手
export default function adHelper() { export default function adHelper() {

View File

@ -1,6 +1,6 @@
import getWhSettingObj from "../utils/getWhSettingObj"; import getWhSettingObj from "../utils/getWhSettingObj";
import setWhSetting from "../utils/setWhSetting"; import setWhSetting from "../utils/setWhSetting";
import popupMsg from "../utils/popupMsg"; import popupMsg from "../utils/@deprecated/popupMsg";
// 落地转跳设置 // 落地转跳设置
export default function landedRedirect() { export default function landedRedirect() {

View File

@ -1,4 +1,4 @@
import popupMsg from "../utils/popupMsg"; import popupMsg from "../utils/@deprecated/popupMsg";
import Alert from "../../class/utils/Alert"; import Alert from "../../class/utils/Alert";
import InfoUtils from "../../class/utils/InfoUtils"; import InfoUtils from "../../class/utils/InfoUtils";
import Log from "../../class/Log"; import Log from "../../class/Log";

View File

@ -1,4 +1,6 @@
// 返回一个加载中gif图形HTML /**
* @deprecated
*/
export default function loading_gif_html(): string { export default function loading_gif_html(): string {
const gif_base64 = `data:image/svg+xml,%3Csvg t='1656084442571' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='3924' width='14' height='14'%3E%3Cpath d='M512.032002 237.105181a29.310168 29.310168 0 0 1-29.310168-29.246172V29.310168a29.310168 29.310168 0 0 1 58.620336 0v178.548841A29.310168 29.310168 0 0 1 512.032002 237.105181zM512.032002 1024a29.310168 29.310168 0 0 1-29.310168-29.310168v-178.484845a29.310168 29.310168 0 1 1 58.620336 0v178.548841A29.310168 29.310168 0 0 1 512.032002 1024z m482.657834-482.657834h-178.484845a29.310168 29.310168 0 1 1 0-58.620336h178.548841a29.310168 29.310168 0 1 1 0 58.620336z m-786.830823 0H29.310172a29.310168 29.310168 0 0 1 0-58.620336h178.548841a29.310168 29.310168 0 0 1 0 58.620336z m519.263546-215.090557a29.182176 29.182176 0 0 1-20.734704-49.980876l126.264108-126.264108a29.310168 29.310168 0 1 1 41.405412 41.405412l-126.264108 126.264108a29.182176 29.182176 0 0 1-20.670708 8.575464zM170.741333 882.568839a29.182176 29.182176 0 0 1-20.734704-49.980876l126.264108-126.264108a29.246172 29.246172 0 1 1 41.405412 41.405412L191.412041 874.057371a29.182176 29.182176 0 0 1-20.670708 8.575464z m682.581338 0a29.182176 29.182176 0 0 1-20.670708-8.575464l-126.264108-126.264108a29.310168 29.310168 0 1 1 41.405412-41.405412l126.264108 126.264108a29.310168 29.310168 0 0 1-20.734704 49.91688zM297.005441 326.251609a29.182176 29.182176 0 0 1-20.670708-8.575464L150.006629 191.412037a29.310168 29.310168 0 1 1 41.405412-41.405412l126.264108 126.264108a29.310168 29.310168 0 0 1-20.734704 49.91688z' p-id='3925'%3E%3C/path%3E%3C/svg%3E` const gif_base64 = `data:image/svg+xml,%3Csvg t='1656084442571' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='3924' width='14' height='14'%3E%3Cpath d='M512.032002 237.105181a29.310168 29.310168 0 0 1-29.310168-29.246172V29.310168a29.310168 29.310168 0 0 1 58.620336 0v178.548841A29.310168 29.310168 0 0 1 512.032002 237.105181zM512.032002 1024a29.310168 29.310168 0 0 1-29.310168-29.310168v-178.484845a29.310168 29.310168 0 1 1 58.620336 0v178.548841A29.310168 29.310168 0 0 1 512.032002 1024z m482.657834-482.657834h-178.484845a29.310168 29.310168 0 1 1 0-58.620336h178.548841a29.310168 29.310168 0 1 1 0 58.620336z m-786.830823 0H29.310172a29.310168 29.310168 0 0 1 0-58.620336h178.548841a29.310168 29.310168 0 0 1 0 58.620336z m519.263546-215.090557a29.182176 29.182176 0 0 1-20.734704-49.980876l126.264108-126.264108a29.310168 29.310168 0 1 1 41.405412 41.405412l-126.264108 126.264108a29.182176 29.182176 0 0 1-20.670708 8.575464zM170.741333 882.568839a29.182176 29.182176 0 0 1-20.734704-49.980876l126.264108-126.264108a29.246172 29.246172 0 1 1 41.405412 41.405412L191.412041 874.057371a29.182176 29.182176 0 0 1-20.670708 8.575464z m682.581338 0a29.182176 29.182176 0 0 1-20.670708-8.575464l-126.264108-126.264108a29.310168 29.310168 0 1 1 41.405412-41.405412l126.264108 126.264108a29.310168 29.310168 0 0 1-20.734704 49.91688zM297.005441 326.251609a29.182176 29.182176 0 0 1-20.670708-8.575464L150.006629 191.412037a29.310168 29.310168 0 1 1 41.405412-41.405412l126.264108 126.264108a29.310168 29.310168 0 0 1-20.734704 49.91688z' p-id='3925'%3E%3C/path%3E%3C/svg%3E`
return `<img src="${ gif_base64 }" alt="lgif" style="width:14px;height:14px;" />`; return `<img src="${ gif_base64 }" alt="lgif" style="width:14px;height:14px;" />`;

View File

@ -1,10 +1,7 @@
import WuhuBase from "../../class/WuhuBase"; import WuhuBase from "../../../class/WuhuBase";
/** /**
* * @deprecated 使new Popup()
* @param {String} innerHTML html string
* @param {String} title
* @returns {null|Element}
*/ */
export default function popupMsg(innerHTML, title = '芜湖助手') { export default function popupMsg(innerHTML, title = '芜湖助手') {
let glob = WuhuBase.glob; let glob = WuhuBase.glob;

View File

@ -1,62 +1,19 @@
import UserScriptEngine from "../../enum/UserScriptEngine"; import UserScriptEngine from "../../enum/UserScriptEngine";
import getScriptEngine from "./getScriptEngine";
import popupMsg from "./popupMsg";
import loading_gif_html from "./loading_gif_html";
import WuhuBase from "../../class/WuhuBase"; import WuhuBase from "../../class/WuhuBase";
import Utils from "../../class/utils/Utils";
import InfoUtils from "../../class/utils/InfoUtils";
import Popup from "../../class/utils/Popup";
import * as FILTER from "../../json/ForStockItemFilter.json";
// 海外库存 // 海外库存
export default async function forStock() { export default async function forStock() {
if (getScriptEngine() === UserScriptEngine.RAW) { if (InfoUtils.getInstance().getScriptEngine() === UserScriptEngine.RAW) {
const insert = `<img alt="stock.png" src="https://jjins.github.io/t2i/stock.png?${ performance.now() }" style="max-width:100%;display:block;margin:0 auto;" />`; const insert = `<img alt="stock.png" src="https://jjins.github.io/t2i/stock.png?${ performance.now() }" style="max-width:100%;display:block;margin:0 auto;" />`;
popupMsg(insert, '飞花库存'); new Popup(insert, '飞花库存');
} else { } else {
const popup = popupMsg(`请稍后${ loading_gif_html() }`, '飞花库存'); const popup = new Popup(`请稍后${ Utils.loading_gif_html() }`, '飞花库存');
let table = `<table><tr><th colspan="2">目的地 - 更新时间</th><th colspan="3">库存</th></tr>`; let table = `<table><tr><th colspan="2">目的地 - 更新时间</th><th colspan="3">库存</th></tr>`;
const dest = [ const dest = FILTER;
{
name: 'mex', show: '墨西哥',
stocks: { 'Dahlia': '花', 'Jaguar Plushie': '偶' }
},
{
name: 'cay', show: '开曼',
stocks: { 'Banana Orchid': '花', 'Stingray Plushie': '偶' }
},
{
name: 'can', show: '加拿大',
stocks: { 'Crocus': '花', 'Wolverine Plushie': '偶' }
},
{
name: 'haw', show: '夏威夷',
stocks: { 'Orchid': '花', 'Large Suitcase': '大箱' }
},
{
name: 'uni', show: '嘤国',
stocks: { 'Heather': '花', 'Red Fox Plushie': '赤狐', 'Nessie Plushie': '水怪' }
},
{
name: 'arg', show: '阿根廷',
stocks: { 'Ceibo Flower': '花', 'Monkey Plushie': '偶', 'Tear Gas': '催泪弹' },
},
{
name: 'swi', show: '瑞士',
stocks: { 'Edelweiss': '花', 'Chamois Plushie': '偶' },
},
{
name: 'jap', show: '日本',
stocks: { 'Cherry Blossom': '花' },
},
{
name: 'chi', show: '祖国',
stocks: { 'Peony': '花', 'Panda Plushie': '偶' },
},
{
name: 'uae', show: '迪拜',
stocks: { 'Tribulus Omanense': '花', 'Camel Plushie': '偶' },
},
{
name: 'sou', show: '南非',
stocks: { 'African Violet': '花', 'Lion Plushie': '偶', 'Xanax': 'XAN' },
}];
const now = new Date(); const now = new Date();
const res = await WuhuBase.glob.fStock.get(); const res = await WuhuBase.glob.fStock.get();
if (!res['stocks']) return; if (!res['stocks']) return;
@ -77,6 +34,6 @@ export default async function forStock() {
table += '</tr>'; table += '</tr>';
}); });
table += '</table>'; table += '</table>';
popup.innerHTML = table; popup.getElement().innerHTML = table;
} }
} }

View File

@ -0,0 +1,92 @@
[
{
"name": "mex",
"show": "墨西哥",
"stocks": {
"Dahlia": "花",
"Jaguar Plushie": "偶"
}
},
{
"name": "cay",
"show": "开曼",
"stocks": {
"Banana Orchid": "花",
"Stingray Plushie": "偶"
}
},
{
"name": "can",
"show": "加拿大",
"stocks": {
"Crocus": "花",
"Wolverine Plushie": "偶"
}
},
{
"name": "haw",
"show": "夏威夷",
"stocks": {
"Orchid": "花",
"Large Suitcase": "大箱"
}
},
{
"name": "uni",
"show": "嘤国",
"stocks": {
"Heather": "花",
"Red Fox Plushie": "赤狐",
"Nessie Plushie": "水怪"
}
},
{
"name": "arg",
"show": "阿根廷",
"stocks": {
"Ceibo Flower": "花",
"Monkey Plushie": "偶",
"Tear Gas": "催泪弹"
}
},
{
"name": "swi",
"show": "瑞士",
"stocks": {
"Edelweiss": "花",
"Chamois Plushie": "偶"
}
},
{
"name": "jap",
"show": "日本",
"stocks": {
"Cherry Blossom": "花"
}
},
{
"name": "chi",
"show": "祖国",
"stocks": {
"Peony": "花",
"Panda Plushie": "偶"
}
},
{
"name": "uae",
"show": "迪拜",
"stocks": {
"Tribulus Omanense": "花",
"Camel Plushie": "偶"
}
},
{
"name": "sou",
"show": "南非",
"stocks": {
"African Violet": "花",
"Lion Plushie": "偶",
"Xanax": "XAN"
}
}
]

3
src/json/css.json Normal file
View File

@ -0,0 +1,3 @@
{
"css": ".wh-hide{display:none;}#wh-trans-icon{user-select:none;display: inline-block;position: fixed;top:5px;left:5px;z-index:100010;border-radius:4px;max-width: 220px;box-shadow: 0 0 3px 1px #8484848f;}div#effectiveness-wrap{overflow-y:hidden;}@media screen and (max-width: 600px) { #wh-trans-icon{top:0;left:112px;} /* 冰蛙公司效率表 */ div#effectiveness-wrap { margin-left: -80px; margin-right: -76px; }}#wh-trans-icon select{width:110px;}#wh-trans-icon a {text-decoration: none;color: #006599;background: none;}#wh-trans-icon:not(.wh-icon-expanded):hover {background: #f8f8f8;}#wh-trans-icon button{margin:0;padding:0;border:0;cursor:pointer;}#wh-inittimer{margin-top:6px;color:#b0b0b0;}#wh-gSettings div{margin: 4px 0;}#wh-trans-icon .wh-container{margin:0;padding:0 16px 16px;border:0;}#wh-trans-icon-btn{height:16px;width:16px;background: url('data:image/svg+xml;utf8,<svg viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\"><path d=\"M160 144a32 32 0 0 0-32 32V864a32 32 0 0 0 32 32h688a32 32 0 0 0 32-32V176a32 32 0 0 0-32-32H160z m0-64h688a96 96 0 0 1 96 96V864a96 96 0 0 1-96 96H160a96 96 0 0 1-96-96V176a96 96 0 0 1 96-96z\"/><path d=\"M482.176 262.272h59.616v94.4h196v239.072h-196v184.416h-59.616v-184.416H286.72v-239.04h195.456V262.24z m-137.504 277.152h137.504v-126.4H344.64v126.4z m197.12 0h138.048v-126.4H541.76v126.4z\"/></svg>') no-repeat center;padding:16px !important;}#wh-trans-icon .wh-container{display:none;}#wh-trans-icon.wh-icon-expanded .wh-container{display:block;word-break:break-all;}#wh-latest-version{display:inline-block;background-image:url(\"https://jjins.github.io/t2i/version.png?${ performance.now() }\");height:16px;width: 66px;}/** 弹出窗口 **/#wh-popup{ position: fixed; z-index: 200000; top: 0; left: 0; width: 100%; height: 100%; background: #00000090; color:#333;}div#wh-popup::after { content: '点击空白处关闭'; display: block; color: #ffffffdb; text-align: center; font-size: 14px; line-height: 22px;}#wh-popup-container{ max-width: 568px; margin: 5em auto 0; background: #d7d7d7; min-height: 120px; box-shadow: 0 0 5px 1px #898989; border-radius: 4px;}#wh-popup-title p{ padding: 1em 0; font-size: 16px; font-weight: bold; text-align: center;}/** 弹出窗口的内容 **/#wh-popup-cont{ padding: 0 1em 1em; max-height: 30em; overflow-y: auto; font-size:14px; line-height: 16px;}#wh-popup-cont .gSetting > div{ display: inline-block; width: 47%; margin: 2px 0;}#wh-popup-cont .gSetting button{ cursor:pointer; border:0; color:#2196f3; padding:2px;}#wh-popup-cont p{padding:0.25em 0;}#wh-popup-cont a{color:red;text-decoration:none;}#wh-popup-cont li{margin:4px 0;}#wh-popup-cont h4{margin:0;padding: 0.5em 0;}#wh-popup-cont button{ margin: 0 4px 0 0; padding: 5px 8px; border: solid 2px black; color: black; border-radius: 3px;}#wh-popup-cont button[disabled]{opacity: 0.5;}#wh-popup-cont input{ padding: 2px; text-align: center; border: 1px solid #fff0; border-radius: 5px; margin:1px 2px;}#wh-popup-cont input:focus{border-color:blue;}#wh-popup-cont table{width:100%;border-collapse:collapse;border:1px solid;}#wh-popup-cont td, #wh-popup-cont th{border-collapse:collapse;padding:4px;border:1px solid;}.wh-display-none{display:none !important;}#wh-gym-info-cont{ background-color: #363636; color: white; padding: 8px; font-size: 15px; border-radius: 4px; text-shadow: 0 0 2px black; background-image: linear-gradient(90deg,transparent 50%,rgba(0,0,0,.07) 0); background-size: 4px; line-height: 20px;}#wh-gym-info-cont button{cursor:pointer;}#wh-notify { display: inline-block; position: fixed; top: 0; left: calc(50% - 180px); width: 360px; z-index: 9999990; color:#333;}#wh-notify a{color:red;text-decoration:none;}#wh-notify .wh-notify-item { /*height: 50px;*/ background: rgb(239 249 255 / 90%); border-radius: 2px; margin: 0.5em 0 0 0; box-shadow: 0 0 5px 0px #959595;}#wh-notify .wh-notify-item:hover { background: rgb(239 249 255 / 98%);}#wh-notify .wh-notify-item .wh-notify-bar { height:2px; background:#2196f3;}#wh-notify .wh-notify-item .wh-notify-close { float:right; padding:0;width:16px;height:16px;background:url('data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%201024%201024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M923%20571H130.7c-27.6%200-50-22.4-50-50s22.4-50%2050-50H923c27.6%200%2050%2022.4%2050%2050s-22.4%2050-50%2050z%22%20fill%3D%22%232196f3%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E') no-repeat center;background-size:100%;margin: 6px 6px 0 0;cursor: pointer;}#wh-notify .wh-notify-item .wh-notify-msg { padding:12px;}"
}

100
src/json/event.json Normal file
View File

@ -0,0 +1,100 @@
[
{
"start": [
0,
17,
8
],
"end": [
0,
24,
8
],
"name": "捡垃圾周",
"eff": "获得捡垃圾概率提升的增益"
},
{
"start": [
3,
5,
20
],
"end": [
3,
25,
20
],
"name": "复活节狩猎",
"eff": "复活节彩蛋会随机出现集齐10个可兑换金蛋和一个独特的头像框(章)。"
},
{
"start": [
5,
20,
20
],
"end": [
5,
29,
20
],
"name": "狗牌",
"eff": "击败其他玩家以获得狗牌,小心保护你的狗牌。"
},
{
"start": [
6,
5,
20
],
"end": [
6,
25,
20
],
"name": "托恩先生和托恩女士",
"eff": "上传你的真实图片,然后拿章"
},
{
"start": [
8,
5,
20
],
"end": [
8,
23,
20
],
"name": "大逃杀",
"eff": "加入特定队伍后攻击其他队伍玩家存活下来的3个队伍可以拿章"
},
{
"start": [
9,
25,
20
],
"end": [
10,
1,
20
],
"name": "不给糖就捣蛋",
"eff": "买篮子之后攻击其他玩家后会随机掉落糖果,可用于兑换许多高价值物品"
},
{
"start": [
11,
14,
20
],
"end": [
11,
31,
20
],
"name": "圣诞小镇",
"eff": "在小镇中闲逛来获取随机掉落的物品"
}
]

68
src/json/fest.json Normal file
View File

@ -0,0 +1,68 @@
{
"val": {
"0105": {
"name": "周末自驾游",
"eff": "获得双倍的赛车点数与赛车技能等级增益"
},
"0114": {
"name": "情人节",
"eff": "使用爱情果汁(Love Juice)后获得降低攻击与复活的能量消耗的增益"
},
"0204": {
"name": "员工激励日",
"eff": "获得三倍的工作点数与火车增益"
},
"0217": {
"name": "圣帕特里克日",
"eff": "获得双倍的酒类效果增益,城市中可以捡到绿色世涛(Green Stout)"
},
"0320": {
"name": "420日",
"eff": "获得三倍的大麻(Cannabis)效果增益"
},
"0418": {
"name": "博物馆日",
"eff": "获得10%提高的博物馆PT兑换增益"
},
"0514": {
"name": "世界献血日",
"eff": "获得减半的抽血CD和扣血增益"
},
"0611": {
"name": "世界人口日",
"eff": "获得双倍的通过攻击获取的经验的增益"
},
"0629": {
"name": "世界老虎日",
"eff": "获得5倍的狩猎技能增益"
},
"0705": {
"name": "国际啤酒节",
"eff": "获得5倍的啤酒物品效果增益"
},
"0827": {
"name": "旅游节",
"eff": "获得双倍的起飞后物品携带容量增益"
},
"0915": {
"name": "饮料节",
"eff": "获得双倍的能量饮料效果增益"
},
"1014": {
"name": "世界糖尿病日",
"eff": "获得三倍的糖类效果增益"
},
"1015": {
"name": "周年庆",
"eff": "左上角的TORN图标可以食用"
},
"1025": {
"name": "黑色星期五",
"eff": "某些商家将提供1元购活动"
},
"1114": {
"name": "住院日",
"eff": "获得降低75%的住院时间增益"
}
}
}

4
src/json/loading.json Normal file
View File

@ -0,0 +1,4 @@
{
"name": "loading gif html",
"html": "<img src=\"data:image/svg+xml,%3Csvg t='1656084442571' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='3924' width='14' height='14'%3E%3Cpath d='M512.032002 237.105181a29.310168 29.310168 0 0 1-29.310168-29.246172V29.310168a29.310168 29.310168 0 0 1 58.620336 0v178.548841A29.310168 29.310168 0 0 1 512.032002 237.105181zM512.032002 1024a29.310168 29.310168 0 0 1-29.310168-29.310168v-178.484845a29.310168 29.310168 0 1 1 58.620336 0v178.548841A29.310168 29.310168 0 0 1 512.032002 1024z m482.657834-482.657834h-178.484845a29.310168 29.310168 0 1 1 0-58.620336h178.548841a29.310168 29.310168 0 1 1 0 58.620336z m-786.830823 0H29.310172a29.310168 29.310168 0 0 1 0-58.620336h178.548841a29.310168 29.310168 0 0 1 0 58.620336z m519.263546-215.090557a29.182176 29.182176 0 0 1-20.734704-49.980876l126.264108-126.264108a29.310168 29.310168 0 1 1 41.405412 41.405412l-126.264108 126.264108a29.182176 29.182176 0 0 1-20.670708 8.575464zM170.741333 882.568839a29.182176 29.182176 0 0 1-20.734704-49.980876l126.264108-126.264108a29.246172 29.246172 0 1 1 41.405412 41.405412L191.412041 874.057371a29.182176 29.182176 0 0 1-20.670708 8.575464z m682.581338 0a29.182176 29.182176 0 0 1-20.670708-8.575464l-126.264108-126.264108a29.310168 29.310168 0 1 1 41.405412-41.405412l126.264108 126.264108a29.310168 29.310168 0 0 1-20.734704 49.91688zM297.005441 326.251609a29.182176 29.182176 0 0 1-20.670708-8.575464L150.006629 191.412037a29.310168 29.310168 0 1 1 41.405412-41.405412l126.264108 126.264108a29.310168 29.310168 0 0 1-20.734704 49.91688z' p-id='3925'%3E%3C/path%3E%3C/svg%3E\" alt=\"lgif\" style=\"width:14px;height:14px;\" />"
}

8
src/test/Test.ts Normal file
View File

@ -0,0 +1,8 @@
import WuhuBase from "../class/WuhuBase";
import Popup from "../class/utils/Popup";
export default class Test extends WuhuBase {
public test(): void {
new Popup("123")
}
}

File diff suppressed because it is too large Load Diff

View File

@ -9,5 +9,6 @@
"target": "ES6", "target": "ES6",
"removeComments": true, "removeComments": true,
"sourceMap": false, "sourceMap": false,
"resolveJsonModule": true
} }
} }