标题
增加 1 行删除 1 行
1BZOJ字体更换器+测评记录仿洛谷(内测版)1BZOJ字体更换器+测评记录仿洛谷
正文
增加 102 行删除 86 行
12345678910111213141516171819202122232425262728293031323334353620 行未改动575859606162636465145 行未改动全部展开21121221321421521621721821922022122222322422522622711 行未改动2392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822833 行未改动2872882892902912922932942952962972985 行未改动3043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394407 行未改动44844945045145245345445545645745842 行未改动50150250350450550650750850920 行未改动53053153253353453553653753853954054154254354454554654754854955017 行未改动56856957057157257357457557610 行未改动587588589590591592# BZOJ字体更换器+测评记录仿洛谷(内测版)## 功能### 可以为[bzoj](https://bzoj.org/)的代码块和界面分别更换字体,且能在测评记录页面提供仿洛谷的小方块样式。## 效果## 方法### 1.先安装油猴(看你用什么浏览器)#### - Chrome:[链接](https://www.tampermonkey.net/crx/tampermonkey_stable.crx),点【下载未经验证的文件】,如图操作,把它下载下来的东西拖进去,安装好了点油猴的【详情】,把里面一大堆设置按钮都点开;#### - Microsoft Edge:[链接](https://microsoftedge.microsoft.com/addons/detail/%E7%AF%A1%E6%94%B9%E7%8C%B4/iikmkjmpaadaobahmlepeloendndfphd),点右上角按钮,安装好了如图操作,#### 点油猴的【详细信息】,同样点开里面一大堆按钮#### - Firefox:[链接](https://www.tampermonkey.net/index.php?browser=firefox)(我懒得放图,请用户自行尝试)### 2. 运行脚本#### 点右上角油猴图标,点【添加新脚本】,#### 并把后面的脚本粘贴进去,点左上角【文件】一栏的【保存】按钮,或从附件中下载脚本,在并拖拽至管理面板中并安装。### 3.调整字体#### -点击油猴图标,点击⚙前往字体偏好设置,或点击[这里](https://bzoj.org/home/settings/preference)前往字体偏好设置,往下滑,点击【Using custom font】按钮可更换界面字体,点击【Find custom font】可以更换代码字体。## 脚本```javascript// ==UserScript==// @name BZOJ 综合增强:测试点大方块 + 分区字体恢复// @namespace https://bzoj.org/// @version 1.0.0// @description 记录详情页显示测试点大方块(修复混合子任务显示)、自动轮询;偏好设置页恢复界面/代码字体独立设置// @author bzoj-enhancer// @match https://bzoj.org/*// @match https://*.bzoj.org/*// @grant GM_notification// @grant GM_addStyle// @grant GM_getValue// @grant GM_setValue20 行未改动if (window.location.pathname.includes('/home/settings/preference')) {this.wakeUpPreferencePage();}GM_registerMenuCommand('⚙️ 前往字体偏好设置', () => {window.open('https://bzoj.org/home/settings/preference', '_blank');});},applyFonts: function (uiFont, codeFont) {145 行未改动全部展开lastBannerKey: '',pollTimer: null,lastOverallStatus: '',observer: null,normalizeStatus: function(raw) {if (!raw) return '';let text = raw.trim().toLowerCase();if (text.length > 40) {for (const kw of Object.keys(this.ALIAS_MAP).concat(Object.keys(this.STATUS_MAP))) {if (text.includes(kw)) { text = kw; break; }}}if (this.ALIAS_MAP[text]) return this.ALIAS_MAP[text];if (this.STATUS_MAP[text]) return text;for (const key of Object.keys(this.STATUS_MAP)) {if (text.includes(key)) return key;11 行未改动getOverallStatusKey: function(doc = document) {const primary = doc.querySelector('.record-status--text');if (primary) {const raw = primary.textContent.trim();if (raw) return this.normalizeStatus(raw);}const dataEl = doc.querySelector('[data-status]');if (dataEl) {const ds = dataEl.getAttribute('data-status');if (ds) return this.normalizeStatus(ds);}const cells = doc.querySelectorAll('.detail-status, td[class*="status"]');for (const cell of cells) {const text = cell.textContent.trim();if (text.includes('#') && text.includes('ms')) continue;if (text.length < 40 && text.length > 0) return this.normalizeStatus(text);}const bodyText = doc.body.innerText.toLowerCase();const checkOrder = ['accepted', 'wrong answer', 'time limit exceeded', 'memory limit exceeded','runtime error', 'compile error', 'output limit exceeded', 'system error','judging', 'compiling', 'waiting', 'running', 'fetched'];for (const kw of checkOrder) {if (bodyText.includes(kw)) return kw;}return '';},getWorstStatus: function(testcases) {const severity = {'system error': 10,'runtime error': 9,'memory limit exceeded': 8,'time limit exceeded': 7,'output limit exceeded': 6,'wrong answer': 5,'compile error': 4,'accepted': 3,};let worst = 'accepted';let worstScore = 0;for (const tc of testcases) {const s = severity[tc.key] || 0;if (s > worstScore) { worstScore = s; worst = tc.key; }}3 行未改动notifyAndBanner: function(statusKey) {if (statusKey === this.lastBannerKey) return;this.lastBannerKey = statusKey;const info = this.getStatusInfo(statusKey);if (typeof GM_notification !== 'undefined') {GM_notification({ title: 'BZOJ 状态更新', text: info.display, timeout: 5000 });} else if ('Notification' in window && Notification.permission === 'granted') {new Notification('BZOJ 状态更新', { body: info.display });}const old = document.getElementById('bzoj-auto-banner');if (old) old.remove();const banner = document.createElement('div');5 行未改动`;banner.textContent = `📢 评测状态:${info.display}`;document.body.prepend(banner);setTimeout(() => {banner.style.opacity = '0';banner.style.transition = 'opacity 0.5s';setTimeout(() => banner.remove(), 500);}, 4000);},getColumnMap: function(table) {const ths = table.querySelectorAll('thead th, thead td');const map = { status: -1, score: -1, time: -1, memory: -1 };if (ths.length > 0) {for (let i = 0; i < ths.length; i++) {const text = ths[i].textContent.trim().toLowerCase();if (text.includes('状态') || text.includes('status')) map.status = i;if (text.includes('分数') || text.includes('score') || text.includes('point')) map.score = i;if (text.includes('耗时') || text.includes('时间') || text.includes('time')) map.time = i;if (text.includes('内存') || text.includes('memory') || text.includes('空间')) map.memory = i;}}const rows = table.querySelectorAll('tbody tr');for (const row of rows) {const cells = row.cells;for (let i = 0; i < cells.length; i++) {const t = cells[i].textContent.trim().toLowerCase();if (map.time < 0 && /(ms|sec|s|秒)/.test(t) && /\d/.test(t)) map.time = i;if (map.memory < 0 && /(mib|kib|mb|kb)/.test(t) && /\d/.test(t)) map.memory = i;}if (map.time >= 0 && map.memory >= 0) break;}if (map.status < 0) map.status = 1;if (map.score < 0) map.score = 2;if (map.time < 0) map.time = 3;if (map.memory < 0) map.memory = 4;return map;},// *** 改进的提取逻辑,同时支持子测试点和普通测试点 ***extractTestCases: function(doc) {const rows = doc.querySelectorAll('table tbody tr');let testRows = [];// 1. 收集所有子测试点 (#1-1 等)for (const row of rows) {const first = row.cells[0]?.textContent.trim();if (/^#\d+-\d+$/.test(first)) testRows.push(row);}// 2. 收集所有有效的普通测试点 (#数字),且该行包含时间或内存数据(排除汇总行)for (const row of rows) {const first = row.cells[0]?.textContent.trim();if (/^#\d+$/.test(first)) {const rowText = row.textContent.toLowerCase();if (/(ms|sec|s|mib|kib|mb|kb)/.test(rowText)) {testRows.push(row);}}}if (testRows.length === 0) return null;const table = testRows[0].closest('table');const colMap = this.getColumnMap(table);const cases = [];for (const row of testRows) {const cells = row.cells;const id = cells[0]?.textContent.trim() || '?';let rawStatus = cells[colMap.status]?.textContent.trim() || '';let score = cells[colMap.score]?.textContent.trim() || '0';const time = cells[colMap.time]?.textContent.trim() || '';const memory = cells[colMap.memory]?.textContent.trim() || '';// 从合并的状态/分数列中分离得分const statusMatch = rawStatus.match(/^(\D+)\s*(\d+)$/);if (statusMatch) {rawStatus = statusMatch[1].trim();score = statusMatch[2];}const key = this.normalizeStatus(rawStatus);const info = this.getStatusInfo(key);cases.push({ id, key, info, score, time, memory });}return cases;},updateBlocks: function(testcases) {const tables = document.querySelectorAll('table');for (const table of tables) {const rows = table.querySelectorAll('tbody tr');for (const row of rows) {const first = row.cells[0]?.textContent.trim();if (first && /^#\d+(-\d+)?$/.test(first)) { table.style.display = 'none'; break; }}}let container = document.getElementById('bzoj-testcase-blocks');if (!container) {container = document.createElement('div');container.id = 'bzoj-testcase-blocks';container.style.cssText = `display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0;padding: 14px; background: #323334; border-radius: 0;align-items: flex-start;`;const hiddenTable = Array.from(document.querySelectorAll('table')).find(t => t.style.display === 'none');if (hiddenTable && hiddenTable.parentElement) {hiddenTable.parentElement.insertBefore(container, hiddenTable);} else {(document.querySelector('.record-container') || document.body).prepend(container);}}container.innerHTML = '';let allFinished = true;for (const tc of testcases) {if (!this.isFinished(tc.key)) allFinished = false;const block = document.createElement('div');block.className = 'bzoj-testcase-block';block.title = `${tc.info.display}\n得分: ${tc.score}\n耗时: ${tc.time}\n内存: ${tc.memory}`;block.style.cssText = `display: flex; flex-direction: column; align-items: center; justify-content: center;width: 100px; height: 100px; font-weight: bold;background: ${tc.info.bg}; color: ${tc.info.color};border-radius: 0; cursor: default;font-family: system-ui, -apple-system, sans-serif;position: relative; overflow: hidden;`;const num = document.createElement('span');num.style.cssText = `position: absolute; top: 6px; left: 8px;7 行未改动statusSpan.style.cssText = 'font-size:24px; font-weight:normal; margin-bottom:8px;';if (tc.info.spin) {statusSpan.textContent = tc.info.text;statusSpan.style.animation = 'bzoj-spin 1.5s linear infinite';} else {statusSpan.textContent = tc.info.text;}block.appendChild(statusSpan);const detail = document.createElement('span');detail.style.cssText = 'font-size:12px; font-weight:normal; text-align:center; white-space:nowrap;';let dt = '';42 行未改动self.lastOverallStatus = overall;}}}} catch (e) { console.error('[BZOJ轮询] 网络错误', e); }},startPolling: function() {if (this.pollTimer) return;20 行未改动}}});this.observer.observe(document.body, { childList: true, subtree: true });},init: function() {if (!/\/record\/[a-f0-9]+/i.test(window.location.pathname)) return;const self = this;GM_addStyle(`@keyframes bzoj-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }.bzoj-testcase-block { transition: transform 0.2s; }.bzoj-testcase-block:hover { transform: scale(1.1); }table thead { display: none !important; }`);const initialCases = self.extractTestCases(document);if (initialCases) {const allDone = self.updateBlocks(initialCases);if (!allDone) {17 行未改动}}, 1000);}}self.installObserver();}};10 行未改动}})();```## 附件### [BZOJ 综合增强:测试点大方块 + 分区字体恢复-1.0.0.user.js](https://www.luogu.com.cn/fe/api/problem/downloadAttachment/lqzngfhy)# ©版权声明:本脚本由AI生成,内测阶段请不要公开!1234567891011121314151617181920212223242526272829303132333435363738394020 行未改动61626364656667686970145 行未改动全部展开21621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624711 行未改动2592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942953 行未改动2993003013023033043053063073083093103115 行未改动3173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554567 行未改动46446546646746846947047147242 行未改动51551651751851952052152252320 行未改动54454554654754854955055155255355455555655755855956056156256356456556656717 行未改动58558658758858959059159210 行未改动603604605606607608# BZOJ字体更换器+测评记录仿洛谷(AI写的油猴插件,增加支持Hydro,bug已修,发现有bug请联系@[xiaxiang2014](luogu://user/2058296))## 开发者:夏翔(luogu:[xiaxiang2014](https://www.luogu.com.cn/user/2058296))(BZOJ:[2025xf29](https://bzoj.org/user/2575))## 后续开发者:杨皓然(luogu:[woshiyhr](https://www.luogu.com.cn/user/1584704))(BZOJ:[123](https://bzoj.org/user/2306))## 可以用杨皓然后续开发的[BZOJ 增强工具 + 网页字体更换器](https://www.luogu.me/article/mdpqqgoq),他又往里面增加了其它的一些功能。## 功能### 可以为[bzoj](https://bzoj.org/)的代码块和界面分别更换字体,且能在测评记录页面提供仿洛谷的小方块样式。## 效果## 方法### 1.先安装油猴(看你用什么浏览器)#### - Chrome:[链接](https://www.tampermonkey.net/crx/tampermonkey_stable.crx),点【下载未经验证的文件】,#### 如图操作,把它下载下来的东西拖进去,安装好了点油猴的【详情】,把里面一大堆设置按钮都点开;#### - Microsoft Edge:[链接](https://microsoftedge.microsoft.com/addons/detail/%E7%AF%A1%E6%94%B9%E7%8C%B4/iikmkjmpaadaobahmlepeloendndfphd),点右上角按钮,安装好了如图操作,#### 点油猴的【详细信息】,同样点开里面一大堆按钮#### - Firefox:[链接](https://www.tampermonkey.net/index.php?browser=firefox)(我懒得放图,请用户自行尝试)### 2. 运行脚本#### 点右上角油猴图标,点【添加新脚本】,#### 并把后面的脚本粘贴进去,点左上角【文件】一栏的【保存】按钮,或从附件中下载脚本,在并拖拽至管理面板中并安装。### 3. 调整字体#### 点击油猴图标,点击【前往字体偏好设置】,或点击[这里](https://bzoj.org/home/settings/preference)前往字体偏好设置,往下滑,点击【Using custom font】按钮可更换界面字体,点击【Find custom font】可以更换代码字体。## 脚本```javascript// ==UserScript==// @name BZOJ 综合增强:测试点大方块 + 分区字体恢复// @namespace https://bzoj.org/// @version 1.0.0// @description 适用于任意 Hydro OJ 的测试点大方块、自动轮询、字体独立设置;无分数显示;悬停仅显示状态名+耗时+内存// @author bzoj-enhancer// @match https://*/*// @grant GM_notification// @grant GM_addStyle// @grant GM_getValue// @grant GM_setValue20 行未改动if (window.location.pathname.includes('/home/settings/preference')) {this.wakeUpPreferencePage();}GM_registerMenuCommand('⚙️ 前往字体偏好设置', () => {const domain = window.location.origin;window.open(domain + '/home/settings/preference', '_blank');});},applyFonts: function (uiFont, codeFont) {145 行未改动全部展开lastBannerKey: '',pollTimer: null,lastOverallStatus: '',observer: null,themeObserver: null,containerElem: null,// 提取纯净状态名(用于方块缩写和通知)extractStatus: function(raw) {if (!raw) return '';const firstLine = raw.trim().split('\n')[0];const statusNames = ['Accepted', 'Wrong Answer', 'Time Limit Exceeded', 'Memory Limit Exceeded','Runtime Error', 'Compile Error', 'Output Limit Exceeded', 'System Error','Judging', 'Compiling', 'Waiting', 'Running', 'Fetched'];for (const name of statusNames) {if (firstLine.toLowerCase().includes(name.toLowerCase())) return name;}for (const alias of Object.keys(this.ALIAS_MAP)) {if (firstLine.toLowerCase().includes(alias)) return alias;}return firstLine.substring(0, 40);},normalizeStatus: function(raw) {if (!raw) return '';let text = raw.trim().toLowerCase();if (this.ALIAS_MAP[text]) return this.ALIAS_MAP[text];if (this.STATUS_MAP[text]) return text;for (const key of Object.keys(this.STATUS_MAP)) {if (text.includes(key)) return key;11 行未改动getOverallStatusKey: function(doc = document) {const primary = doc.querySelector('.record-status--text');if (primary) {const status = this.extractStatus(primary.textContent.trim());return this.normalizeStatus(status);}const dataEl = doc.querySelector('[data-status]');if (dataEl) {const ds = dataEl.getAttribute('data-status');if (ds) return this.normalizeStatus(this.extractStatus(ds));}const cells = doc.querySelectorAll('.detail-status, td[class*="status"]');for (const cell of cells) {const text = cell.textContent.trim();if (text.includes('#') && text.includes('ms')) continue;if (text.length < 40 && text.length > 0) return this.normalizeStatus(this.extractStatus(text));}const bodyText = doc.body.innerText.toLowerCase();const checkOrder = ['accepted', 'wrong answer', 'time limit exceeded', 'memory limit exceeded','runtime error', 'compile error', 'output limit exceeded', 'system error','judging', 'compiling', 'waiting', 'running', 'fetched'];for (const kw of checkOrder) if (bodyText.includes(kw)) return kw;return '';},getWorstStatus: function(testcases) {const severity = {'system error': 10, 'runtime error': 9, 'memory limit exceeded': 8,'time limit exceeded': 7, 'output limit exceeded': 6, 'wrong answer': 5,'compile error': 4, 'accepted': 3,};let worst = 'accepted', worstScore = 0;for (const tc of testcases) {const s = severity[tc.key] || 0;if (s > worstScore) { worstScore = s; worst = tc.key; }}3 行未改动notifyAndBanner: function(statusKey) {if (statusKey === this.lastBannerKey) return;this.lastBannerKey = statusKey;const info = this.getStatusInfo(statusKey);const notifyTitle = '评测状态更新';if (typeof GM_notification !== 'undefined') {GM_notification({ title: notifyTitle, text: info.display, timeout: 5000 });} else if ('Notification' in window && Notification.permission === 'granted') {new Notification(notifyTitle, { body: info.display });}const old = document.getElementById('bzoj-auto-banner');if (old) old.remove();const banner = document.createElement('div');5 行未改动`;banner.textContent = `📢 评测状态:${info.display}`;document.body.prepend(banner);setTimeout(() => {banner.style.opacity = '0'; banner.style.transition = 'opacity 0.5s';setTimeout(() => banner.remove(), 500);}, 4000);},getColumnMap: function(table) {const ths = table.querySelectorAll('thead th, thead td');const map = { status: -1, time: -1, memory: -1 };if (ths.length > 0) {for (let i = 0; i < ths.length; i++) {const text = ths[i].textContent.trim().toLowerCase();if (text.includes('状态') || text.includes('status')) map.status = i;if (text.includes('耗时') || text.includes('时间') || text.includes('time')) map.time = i;if (text.includes('内存') || text.includes('memory') || text.includes('空间')) map.memory = i;}}const rows = table.querySelectorAll('tbody tr');for (const row of rows) {const cells = row.cells;for (let i = 0; i < cells.length; i++) {const t = cells[i].textContent.trim().toLowerCase();if (/(error|line|read|expect|on line)/i.test(t)) continue;if (map.time < 0 && /(\d+(\.\d+)?\s*(ms|sec|s|秒))/.test(t)) map.time = i;if (map.memory < 0 && /(\d+(\.\d+)?\s*(mib|kib|mb|kb|gib|gb))/i.test(t)) map.memory = i;}if (map.time >= 0 && map.memory >= 0) break;}if (map.status < 0) map.status = 1;if (map.time < 0) map.time = 3;if (map.memory < 0) map.memory = 4;return map;},extractTestCases: function(doc) {const rows = doc.querySelectorAll('table tbody tr');const testRows = [];for (const row of rows) {const firstCell = row.cells[0];if (!firstCell) continue;const id = firstCell.textContent.trim();if (/^#\d+-\d+$/.test(id)) {testRows.push(row); continue;}if (/^#\d+$/.test(id)) {const rowText = row.textContent.toLowerCase();if (/(ms|sec|s|mib|kib|mb|kb)/.test(rowText)) testRows.push(row);}}if (testRows.length === 0) return null;const table = testRows[0].closest('table');const colMap = this.getColumnMap(table);const cases = [];for (const row of testRows) {const cells = row.cells;const id = cells[0]?.textContent.trim() || '?';const rawFull = cells[colMap.status]?.textContent.trim() || '';const status = this.extractStatus(rawFull); // 只取状态名const time = cells[colMap.time]?.textContent.trim() || '';const memory = cells[colMap.memory]?.textContent.trim() || '';const key = this.normalizeStatus(status);const info = this.getStatusInfo(key);// 不再保留 fullStatus,直接使用 info.display 作为悬停的状态名cases.push({ id, key, info, time, memory });}return cases;},updateContainerTheme: function() {if (!this.containerElem) return;const body = document.body;let isLight = false;if (body.classList.contains('dark') || body.classList.contains('theme-dark') ||(body.getAttribute('data-theme') === 'dark')) {isLight = false;} else if (body.classList.contains('light') || body.classList.contains('theme-light') ||(body.getAttribute('data-theme') === 'light')) {isLight = true;} else {const bgColor = window.getComputedStyle(body).backgroundColor;const rgb = bgColor.match(/\d+/g);if (rgb) {const brightness = (parseInt(rgb[0]) * 299 + parseInt(rgb[1]) * 587 + parseInt(rgb[2]) * 114) / 1000;isLight = brightness > 128;} else isLight = true;}this.containerElem.style.backgroundColor = isLight ? '#f5f7fa' : '#323334';this.containerElem.style.border = isLight ? '1px solid #e2e4e8' : 'none';},updateBlocks: function(testcases) {const tables = document.querySelectorAll('table');for (const table of tables) {const rows = table.querySelectorAll('tbody tr');for (const row of rows) {const first = row.cells[0]?.textContent.trim();if (first && /^#\d+(-\d+)?$/.test(first)) { table.style.display = 'none'; break; }}}let container = document.getElementById('bzoj-testcase-blocks');if (!container) {container = document.createElement('div');container.id = 'bzoj-testcase-blocks';container.style.cssText = `display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0;padding: 14px; border-radius: 0; align-items: flex-start;transition: background-color 0.2s;`;const hiddenTable = Array.from(document.querySelectorAll('table')).find(t => t.style.display === 'none');if (hiddenTable && hiddenTable.parentElement) {hiddenTable.parentElement.insertBefore(container, hiddenTable);} else {(document.querySelector('.record-container') || document.body).prepend(container);}}this.containerElem = container;this.updateContainerTheme();container.innerHTML = '';let allFinished = true;for (const tc of testcases) {if (!this.isFinished(tc.key)) allFinished = false;const block = document.createElement('div');block.className = 'bzoj-testcase-block';// 悬停仅显示状态全名、耗时、内存block.title = `${tc.info.display}\n耗时: ${tc.time}\n内存: ${tc.memory}`;block.style.cssText = `display: flex; flex-direction: column; align-items: center; justify-content: center;width: 100px; height: 100px; font-weight: bold;background: ${tc.info.bg}; color: ${tc.info.color};border-radius: 0; cursor: default;font-family: system-ui, -apple-system, sans-serif;position: relative; overflow: hidden;box-shadow: 0 1px 3px rgba(0,0,0,0.1);`;const num = document.createElement('span');num.style.cssText = `position: absolute; top: 6px; left: 8px;7 行未改动statusSpan.style.cssText = 'font-size:24px; font-weight:normal; margin-bottom:8px;';if (tc.info.spin) {statusSpan.textContent = tc.info.text;statusSpan.style.animation = 'bzoj-spin 1.5s linear infinite';} else statusSpan.textContent = tc.info.text;block.appendChild(statusSpan);const detail = document.createElement('span');detail.style.cssText = 'font-size:12px; font-weight:normal; text-align:center; white-space:nowrap;';let dt = '';42 行未改动self.lastOverallStatus = overall;}}}} catch (e) { console.error('[轮询] 网络错误', e); }},startPolling: function() {if (this.pollTimer) return;20 行未改动}}});this.observer.observe(document.body, { childList: true, subtree: true });if (this.themeObserver) this.themeObserver.disconnect();this.themeObserver = new MutationObserver(() => {if (this.containerElem) this.updateContainerTheme();});this.themeObserver.observe(document.body, { attributes: true, attributeFilter: ['class', 'data-theme'] });},init: function() {if (!/\/record\/[a-f0-9]+/i.test(window.location.pathname)) return;const self = this;GM_addStyle(`@keyframes bzoj-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }.bzoj-testcase-block { transition: transform 0.2s; }.bzoj-testcase-block:hover { transform: scale(1.1); }table thead { display: none !important; }`);const initialCases = self.extractTestCases(document);if (initialCases) {const allDone = self.updateBlocks(initialCases);if (!allDone) {17 行未改动}}, 1000);}}self.installObserver();}};10 行未改动}})();```## 附件### [BZOJ 综合增强:测试点大方块 + 分区字体恢复-1.0.0.user.js](https://www.luogu.com.cn/fe/api/problem/downloadAttachment/e7iys27x)# ©版权声明:本脚本由AI生成!