您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
当页面打开 https://tongyi.aliyun.com/ 时,修改 class="sc-dChVcU ktbQOR" 元素的 width 样式为 1800。
当前为
// ==UserScript== // @name 修改 Tongyi 页面宽度 // @namespace http://tampermonkey.net/ // @version 1.2 // @description 当页面打开 https://tongyi.aliyun.com/ 时,修改 class="sc-dChVcU ktbQOR" 元素的 width 样式为 1800。 // @author YourName // @match https://tongyi.aliyun.com/* // @grant none // ==/UserScript== (function() { 'use strict'; // 定义一个函数来修改样式 function modifyWidth() { const targetElement = document.querySelector('.sc-dChVcU.ktbQOR'); if (targetElement) { console.log('找到目标元素:', targetElement); // 直接修改内联样式 targetElement.style.width = '1800px'; console.log('已将 width 修改为 1800px'); } else { console.log('未找到目标元素'); } } // 使用 MutationObserver 监听 DOM 变化 const observer = new MutationObserver(() => { modifyWidth(); }); // 开始监听整个文档的变化 observer.observe(document.body, { childList: true, subtree: true, }); // 页面加载完成后执行一次 window.addEventListener('load', () => { modifyWidth(); }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址