您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Display only the <pre> block on Ultimate Guitar
// ==UserScript== // @name Ultimate-Guitar No BS // @namespace http://tampermonkey.net/ // @version 1.2 // @description Display only the <pre> block on Ultimate Guitar // @author You // @match *://tabs.ultimate-guitar.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // Wait for the DOM to fully load window.addEventListener('load', () => { // Select the <pre> block const preBlock = document.querySelector('pre'); if (preBlock) { // Clear the body content document.body.innerHTML = ''; // Create a container for the <pre> block const newPreContainer = document.createElement('div'); newPreContainer.style.margin = '0'; newPreContainer.style.padding = '10px'; newPreContainer.style.backgroundColor = '#f4f4f4'; newPreContainer.style.color = 'black'; newPreContainer.style.fontFamily = 'monospace'; newPreContainer.style.fontSize = '16px'; // Set all <span> elements inside <pre> to black preBlock.querySelectorAll('span').forEach(span => { span.style.color = 'black'; }); // Clone and append the modified <pre> block newPreContainer.appendChild(preBlock.cloneNode(true)); document.body.appendChild(newPreContainer); console.log('Page simplified to display only the <pre> block.'); } else { console.warn('No <pre> block found on this page.'); } }); })();