您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
优化Quicker原版调试文件体验
当前为
// ==UserScript== // @name 调试文件优化 // @namespace http://tampermonkey.net/ // @version 0.2 // @description 优化Quicker原版调试文件体验 // @author Cesaryuan // @match file:///*/quicker_*_log.htm // @require http://code.jquery.com/jquery-2.2.4.min.js // @require http://code.jquery.com/color/jquery.color-2.1.2.min.js // @grant none // @license MIT // ==/UserScript== (function () { "use strict"; // queryByXpath function queryByXpath(xpath, root) { var xpathResult = document.evaluate( xpath, root || document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null ); var result = []; for (var i = 0, len = xpathResult.snapshotLength; i < len; ++i) { result.push(xpathResult.snapshotItem(i)); } return result; } for (const stepHeader of queryByXpath( "//div[@class='step-header' and ../div[@class='step-content']/div[@title and contains(@class, 'message') and contains(text(), '已禁用')]]" )) { // add class quicker-forbid and quicker-light stepHeader.classList.add("quicker-forbid"); stepHeader.classList.add("quicker-light"); } for (const stepHeader of queryByXpath( "//div[@class='step-header' and ../div[@class='step-content']/div[@title and contains(@class, 'message') and contains(text(), '不符合条件,跳过。')]]" )) { // add class quicker-forbid stepHeader.classList.add("quicker-skiped-if"); stepHeader.classList.add("quicker-light"); } $("div.message-warning:contains(出错)") .parents(".step-content") .prev(".step-header") .addClass("quicker-warn-step"); $("div.sys_stop:contains(标记为出错:1)") .parents(".step-content") .prev(".step-header") .addClass("quicker-warn-step"); //inject css text var css = ` .quicker-warn-step { background-color: #ffd6d6 !important; } .quicker-light { background-color: #f8f8f8 !important; } .quicker-forbid::before { content: '已禁用'; color: #a0a0a0 } .quicker-skiped-if::before { content: '不符合条件'; color: #a0a0a0 } .quicker-skiped-if *, .quicker-forbid * { /* text-decoration: line-through 0.01em; */ } `; var style = document.createElement("style"); style.type = "text/css"; style.appendChild(document.createTextNode(css)); document.head.appendChild(style); })();