您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Mark every 10th pip in the Scamming crime. Quick and dirty GPT special.
当前为
// ==UserScript== // @name Mark Scamming Pips // @namespace https://torn.report/userscripts/ // @version 0.3 // @description Mark every 10th pip in the Scamming crime. Quick and dirty GPT special. // @author Skeletron [318855] // @match https://www.torn.com/loader.php?sid=crimes // @icon https://www.google.com/s2/favicons?sz=64&domain=torn.com // @license GNU GPLv3 // @grant none // ==/UserScript== (function() { 'use strict'; // Function to process each persuasion bar function processPersuasionBar(persuasionBar) { // Get all cells within the persuasion bar, including nested ones const cells = persuasionBar.getElementsByClassName('cell___AfwZm'); // Iterate through the cells and insert "X" in every 10th cell if it hasn't been added yet for (let i = 9; i < cells.length; i += 10) { if (!cells[i].textContent.includes('|')) { cells[i].textContent += '|'; cells[i].style.textAlign = 'center'; } } } // Function to handle mutations function handleMutations(mutationsList) { for (const mutation of mutationsList) { if (mutation.type === 'childList') { // Check if any new persuasion bars were added const newPersuasionBars = mutation.target.getElementsByClassName('persuasionBar___RnWKh'); Array.from(newPersuasionBars).forEach(processPersuasionBar); } } } // Set up the MutationObserver to watch the entire document const observer = new MutationObserver(handleMutations); observer.observe(document.body, { childList: true, subtree: true }); })();