From 56852a12291220fdedba016884b1aa1fd47ef2e2 Mon Sep 17 00:00:00 2001 From: Liwanyi Date: Mon, 10 Jan 2022 15:43:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=94=9F=E5=AD=98=E6=89=8B?= =?UTF-8?q?=E5=86=8C=E7=9A=84=E9=93=BE=E6=8E=A5=E3=80=81=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=BA=86NPC=20Loot=E6=97=B6=E9=97=B4=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- torn-trans-zhcn.user.js | 51 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/torn-trans-zhcn.user.js b/torn-trans-zhcn.user.js index ffa86b7..bdea7e8 100644 --- a/torn-trans-zhcn.user.js +++ b/torn-trans-zhcn.user.js @@ -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 = `stock.png +

点击开打:

+

Duke +Leslie +Jimmy +Fernando +Tiny

+`; + 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) => {