添加叠E保护
This commit is contained in:
parent
8a533e5f9b
commit
5cf471b779
@ -1,8 +1,8 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @lastmodified 202202031949
|
// @lastmodified 202202111657
|
||||||
// @name 芜湖助手
|
// @name 芜湖助手
|
||||||
// @namespace WOOH
|
// @namespace WOOH
|
||||||
// @version 0.3.8
|
// @version 0.3.9
|
||||||
// @description 托恩,起飞!
|
// @description 托恩,起飞!
|
||||||
// @author Woohoo[2687093] Sabrina_Devil[2696209]
|
// @author Woohoo[2687093] Sabrina_Devil[2696209]
|
||||||
// @match https://www.torn.com/*
|
// @match https://www.torn.com/*
|
||||||
@ -23,13 +23,18 @@
|
|||||||
if (window.WHTRANS) return;
|
if (window.WHTRANS) return;
|
||||||
window.WHTRANS = true;
|
window.WHTRANS = true;
|
||||||
// 版本
|
// 版本
|
||||||
const version = '0.3.8';
|
const version = '0.3.9';
|
||||||
// 修改历史
|
// 修改历史
|
||||||
const changelist = [
|
const changelist = [
|
||||||
{
|
{
|
||||||
todo: true,
|
todo: true,
|
||||||
cont: `翻译:baza npc商店、imarket、imarket搜索结果`,
|
cont: `翻译:baza npc商店、imarket、imarket搜索结果`,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
ver: '0.3.9',
|
||||||
|
date: '20220211',
|
||||||
|
cont: `添加叠E保护`,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
ver: '0.3.8',
|
ver: '0.3.8',
|
||||||
date: '20220203',
|
date: '20220203',
|
||||||
@ -3074,6 +3079,8 @@
|
|||||||
{key: '_15Alarm', val: true},
|
{key: '_15Alarm', val: true},
|
||||||
// 捡垃圾助手
|
// 捡垃圾助手
|
||||||
{key: 'cityFinder', val: false},
|
{key: 'cityFinder', val: false},
|
||||||
|
// 叠E保护
|
||||||
|
{key: 'SEProtect', val: false},
|
||||||
// 光速拔刀 6-关闭
|
// 光速拔刀 6-关闭
|
||||||
{key: 'quickAttIndex', val: 2},
|
{key: 'quickAttIndex', val: 2},
|
||||||
// 光速跑路 0-leave 1-mug 2-hos 3-关闭
|
// 光速跑路 0-leave 1-mug 2-hos 3-关闭
|
||||||
@ -3112,6 +3119,8 @@
|
|||||||
_15Alarm: true,
|
_15Alarm: true,
|
||||||
// 捡垃圾助手
|
// 捡垃圾助手
|
||||||
cityFinder: false,
|
cityFinder: false,
|
||||||
|
// 叠E保护
|
||||||
|
SEProtect: false,
|
||||||
// 光速拔刀 6-关闭
|
// 光速拔刀 6-关闭
|
||||||
quickAttIndex: undefined,
|
quickAttIndex: undefined,
|
||||||
// 光速跑路 0-leave 1-mug 2-hos 3-关闭
|
// 光速跑路 0-leave 1-mug 2-hos 3-关闭
|
||||||
@ -3214,6 +3223,13 @@
|
|||||||
domText: ' 捡垃圾助手',
|
domText: ' 捡垃圾助手',
|
||||||
dictName: 'cityFinder',
|
dictName: 'cityFinder',
|
||||||
})
|
})
|
||||||
|
// 叠E保护
|
||||||
|
settingsArr.push({
|
||||||
|
domType: 'checkbox',
|
||||||
|
domId: 'wh-SEProtect-check',
|
||||||
|
domText: ' 叠E保护',
|
||||||
|
dictName: 'SEProtect',
|
||||||
|
})
|
||||||
// 光速拔刀
|
// 光速拔刀
|
||||||
settingsArr.push({
|
settingsArr.push({
|
||||||
domType: 'select',
|
domType: 'select',
|
||||||
@ -4995,7 +5011,8 @@ display:inline-block;
|
|||||||
/**
|
/**
|
||||||
* gym健身房页面
|
* gym健身房页面
|
||||||
*/
|
*/
|
||||||
if (wh_trans_settings.transEnable && window.location.href.indexOf('gym.php') >= 0) {
|
if (window.location.href.includes('gym.php')) {
|
||||||
|
if (wh_trans_settings.transEnable) {
|
||||||
const gymOB = new MutationObserver(gymOBInit);
|
const gymOB = new MutationObserver(gymOBInit);
|
||||||
|
|
||||||
function gymOBInit() {
|
function gymOBInit() {
|
||||||
@ -5107,6 +5124,37 @@ display:inline-block;
|
|||||||
|
|
||||||
gymTrans();
|
gymTrans();
|
||||||
gymOB.observe($('div.content-wrapper')[0], {childList: true, subtree: true, attributes: true});
|
gymOB.observe($('div.content-wrapper')[0], {childList: true, subtree: true, attributes: true});
|
||||||
|
}
|
||||||
|
if (wh_trans_settings.SEProtect) {
|
||||||
|
elementReady('#gymroot').then(node => {
|
||||||
|
addStyle(`.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;
|
||||||
|
}
|
||||||
|
#wh-gym-info-cont button{color:white;cursor:pointer;}`);
|
||||||
|
node.classList.add('wh-display-none');
|
||||||
|
const info = document.createElement('div');
|
||||||
|
info.id = 'wh-gym-info-cont';
|
||||||
|
info.innerHTML = `<p>【叠E保护】已为您关闭健身房。<button>点击关闭【叠E保护】</button></p>`;
|
||||||
|
node.after(info);
|
||||||
|
info.querySelector('button').addEventListener('click', (e) => {
|
||||||
|
e.target.disabled = true;
|
||||||
|
info.remove();
|
||||||
|
node.classList.remove('wh-display-none');
|
||||||
|
setAndSaveSettings('SEProtect', false);
|
||||||
|
if($zhongNode) $zhongNode.querySelector('#wh-SEProtect-check').checked = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8733,7 +8781,7 @@ top:0;
|
|||||||
left:0;
|
left:0;
|
||||||
z-index:100001;
|
z-index:100001;
|
||||||
}
|
}
|
||||||
`)
|
`);
|
||||||
let notify = WHNotify('加载中');
|
let notify = WHNotify('加载中');
|
||||||
ifr.onload = () => {
|
ifr.onload = () => {
|
||||||
notify.del();
|
notify.del();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user