Enables attack button even if the target is in the hospital and changes icon to red
当前为
// ==UserScript==
// @name Doobie's Hospital Attack Button Bypass Script
// @namespace http://tampermonkey.net/DoobiesHospitalBypass
// @version 1.0
// @description Enables attack button even if the target is in the hospital and changes icon to red
// @match https://www.torn.com/profiles.php*
// @grant none
// ==/UserScript==
(function(){
'use strict';
window.onload=function(){
let attackButton=document.querySelector('.profile-button-attack.disabled');
if(attackButton){
attackButton.classList.remove('disabled');
attackButton.classList.add('active');
attackButton.style.pointerEvents='auto';
attackButton.style.opacity='1';
attackButton.setAttribute('aria-label','Attack (Bypass Hospital Restriction)');
let svgIcon=attackButton.querySelector('svg');
if(svgIcon){
svgIcon.style.filter='none';
svgIcon.style.fill='#cf3b13';
}
attackButton.addEventListener('click',function(e){
e.preventDefault();
window.location.href=attackButton.getAttribute('href');
});
}
};
})();
//Made with Love by DoobieSuckin [3255641]