您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove width styles from el-table header and body
// ==UserScript== // 此插件仅用于解决一些网页显示不合理的地方。 // @name 显示督学端答题用时 // @namespace http://tampermonkey.net/ // @version 1.0 // @description Remove width styles from el-table header and body // @match *://supervise-v3.classba.cn/* // @grant none // ==/UserScript== (function() { 'use strict'; window.addEventListener('load', function() { const tableHeader = document.querySelector('.el-table__header'); const tableBody = document.querySelector('.el-table__body'); if (tableHeader && tableHeader.style.width || '') { tableHeader.style.width = ''; } if (tableBody && tableBody.style.width || '') { tableBody.style.width = ''; } }); const observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.type === 'childList' || mutation.type === 'attributes') { const tableHeader = document.querySelector('.el-table__header'); const tableBody = document.querySelector('.el-table__body'); if (tableHeader && tableHeader.style.width || '') { tableHeader.style.width = ''; } if (tableBody && tableBody.style.width || '') { tableBody.style.width = ''; } } }); }); observer.observe(document.body, { childList: true, attributes: true, subtree: true }); })();