HEG Kwack Button

A button to heg kwack

目前為 2024-11-09 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         HEG Kwack Button
// @version      2024-11-09
// @description  A button to heg kwack
// @license      MIT
// @author       Clyoth [3477744]
// @match        https://www.torn.com/*
// @icon         https://play-lh.googleusercontent.com/BkaIDbibtUpGcziVQsgCya-eC7oxTUHL5G8m8v3XW3S11_-GZEItaxzeXxhKmoAiX8x6
// @grant        none
// @namespace Clyoth
// ==/UserScript==

(function() {
    'use strict';
    // To make sure that all divs are loaded and no error occurs
    window.addEventListener('load', () => {
        const targetDiv = document.querySelector('.areas___ElnyB .toggle-block___oKpdF .toggle-content___BJ9Q9');
        //Equip HEG button
        const eqHegImage = document.createElement('img');
        const eqHegDiv = document.createElement('div');
        eqHegImage.src = "https://i.imgur.com/evUXBUT.png";
        eqHegImage.width = 15
        const eqHEG = document.createElement('button');
        eqHEG.innerText = 'Equip HEG';
        eqHegDiv.onclick = () => window.location.replace("https://www.torn.com/item.php")
        eqHegDiv.classList.add("pill");
        eqHegDiv.style.paddingTop = '0';
        eqHegDiv.style.paddingBottom = '0';
        eqHEG.style.color = "#dddddd";
        eqHEG.style.fontSize = "12px";
        eqHEG.style.paddingLeft = "10px";
        eqHEG.classList.add("linkName___FoKha");
        eqHegDiv.appendChild(eqHegImage);
        eqHegDiv.appendChild(eqHEG);
        targetDiv.appendChild(eqHegDiv);
        //HEG KWACK button

        const hegKwackImage = document.createElement('img');
        const hegKwackDiv = document.createElement('div');
        hegKwackImage.src = "https://i.imgur.com/LxEYf5t.png";
        hegKwackImage.width = 15
        const hegKwack = document.createElement('button');
        hegKwack.innerText = 'HEG Kwack';
        hegKwackDiv.onclick = () => window.location.replace("https://www.torn.com/loader.php?sid=attack&user2ID=2190604")
        hegKwackDiv.classList.add("pill");
        hegKwackDiv.style.paddingTop = '0';
        hegKwackDiv.style.paddingBottom = '0';
        hegKwack.style.color = "#dddddd";
        hegKwack.style.fontSize = "12px";
        hegKwack.style.paddingLeft = "10px";
        hegKwack.classList.add("linkName___FoKha");
        hegKwackDiv.appendChild(hegKwackImage);
        hegKwackDiv.appendChild(hegKwack);
        targetDiv.appendChild(hegKwackDiv);
    });
})();