您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically checks the wrap lines checkbox in view-source page
// ==UserScript== // @name Source Page Lines Wrapper // @namespace U291cmNlIFBhZ2UgTGluZSBXcmFwcGVy // @version 1.1 // @description Automatically checks the wrap lines checkbox in view-source page // @author smed79 // @license GPLv3 // @icon https://i25.servimg.com/u/f25/11/94/21/24/wrap10.png // @homepage https://greasyfork.org/en/scripts/544177-source-page-lines-wrapper // @match view-source:* // @grant none // ==/UserScript== (function() { 'use strict'; // Wait for the DOM to be ready const checkWrapBox = () => { const checkbox = document.querySelector('input[type="checkbox"]'); if (checkbox && !checkbox.checked) { checkbox.checked = true; checkbox.dispatchEvent(new Event('change', { bubbles: true })); } }; // Try immediately in case DOM is already available checkWrapBox(); // Fallback if it takes time to render document.addEventListener("DOMContentLoaded", checkWrapBox); window.addEventListener("load", checkWrapBox); })();