添加生存手册的链接、添加了NPC Loot时间表

This commit is contained in:
Liwanyi 2022-01-10 15:43:57 +08:00
parent ae5d624624
commit 56852a1229

View File

@ -1,8 +1,8 @@
// ==UserScript==
// @lastmodified 202201081747
// @lastmodified 202201101539
// @name Torn翻译
// @namespace WOOH
// @version 0.2.0108b
// @version 0.2.0110a
// @description Torn UI翻译
// @author Woohoo-[2687093] sabrina_devil[2696209]
// @match https://www.torn.com/*
@ -15,13 +15,18 @@
___window___.WHTRANS = true;
const CC_set = /[\u4e00-\u9fa5]/;
const version = '0.2.0108b';
const version = '0.2.0110a';
const changelist = [
{
todo: true,
cont: `翻译baza npc商店、imarket、imarket搜索结果`,
},
{
ver: '0.2.0110a',
date: '20220110',
cont: `添加生存手册的链接、添加了NPC Loot时间表`,
},
{
ver: '0.2.0108b',
date: '20220108',
@ -3106,6 +3111,32 @@
popupMsg(insert, '飞花库存');
},
},
{
domType: 'button',
domId: 'wh-npc-loot-btn',
domText: 'NPC LOOT',
clickFunc: function (e) {
e.target.blur();
const insert = `<img alt="stock.png" src="https://jjins.github.io/t2i/loot.png?${performance.now()}" style="max-width:100%;display:block;margin:0 auto;" />
<p>点击开打</p>
<p><a href="https://www.torn.com/loader.php?sid=attack&user2ID=4" target="_blank">Duke</a>
<a href="https://www.torn.com/loader.php?sid=attack&user2ID=15" target="_blank">Leslie</a>
<a href="https://www.torn.com/loader.php?sid=attack&user2ID=19" target="_blank">Jimmy</a>
<a href="https://www.torn.com/loader.php?sid=attack&user2ID=20" target="_blank">Fernando</a>
<a href="https://www.torn.com/loader.php?sid=attack&user2ID=21" target="_blank">Tiny</a></p>
`;
popupMsg(insert, 'NPC LOOT');
},
},
{
domType: 'button',
domId: 'wh-link-shengcunshouce',
domText: '生存手册',
clickFunc: function (e) {
e.target.blur();
window.open('https://docs.qq.com/doc/DTVpmV2ZaRnB0RG56');
},
},
{
domType: 'checkbox',
domId: 'wh-dev-mode',
@ -3209,12 +3240,14 @@
addStyle(`#wh-trans-icon{
display: inline-block;
position: fixed;
top: calc(50% - 157px);
/*top: calc(50% - 157px);*/
top:0;
left: 0;
z-index: 20000;
z-index: 100010;
border: solid 1px #b5b5b5;
border-left: none;
border-radius: 0 4px 4px 0;
border-top: none;
border-radius: 0 0 4px 0;
max-width: 200px;
}
#wh-trans-icon button{
@ -7525,6 +7558,12 @@ margin: 0 0 3px;
};
break;
}
case 'plain': {
newNode.id = setting.domId;
newNode.innerHTML += setting.domHTML;
settingNode.appendChild(newNode);
break;
}
}
});
zhongNode.querySelector('#wh-trans-icon-btn').onclick = (e) => {