diff --git a/torn-trans-zhcn.user.js b/torn-trans-zhcn.user.js index 176b313..b7e5c9d 100644 --- a/torn-trans-zhcn.user.js +++ b/torn-trans-zhcn.user.js @@ -1,8 +1,8 @@ // ==UserScript== -// @lastmodified 202203311604 +// @lastmodified 202203312033 // @name 芜湖助手 // @namespace WOOH -// @version 0.3.28 +// @version 0.3.29 // @description 托恩,起飞! // @author Woohoo[2687093] Sabrina_Devil[2696209] // @match https://www.torn.com/* @@ -23,13 +23,18 @@ if (window.WHTRANS) return; window.WHTRANS = true; // 版本 - const version = '0.3.28'; + const version = '0.3.29'; // 修改历史 const changelist = [ { todo: true, cont: `翻译:baza npc商店、imarket、imarket搜索结果`, }, + { + ver: '0.3.29', + date: '20220331', + cont: `增加一键起飞`, + }, { ver: '0.3.28', date: '20220331', @@ -3667,6 +3672,60 @@ } }, }); + // 一键起飞 + settingsArr.push({ + domType: 'button', + domId: 'wh-quick-fly-btn', + domText: '✈一键起飞', + clickFunc: async function () { + if (window.hasWHQuickFlyOpt) return; + window.hasWHQuickFlyOpt = true; + addStyle(`#wh-quick-fly-opt{ + position:fixed; + left:64px; + top:64px; + background: #008000db; + padding: 8px; + border-radius: 4px; + box-shadow: 0 0 5px 1px #ffffff29; + color: white; + font-size: 16px; + width: 220px; + z-index: 999999; +} +#wh-quick-fly-opt label{ +display:block; +} +#wh-quick-fly-opt select{ +width: 100%; + padding: 2px; + margin: 4px 0; +} +#wh-quick-fly-opt button{ +font-size:16px; +color:white; +} +`); + const node = document.createElement('div'); + node.id = 'wh-quick-fly-opt'; + node.innerHTML = ` +
先选好目的地和飞机,出院后点起飞
+