您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds click event and distinct hover style to collapsed code indicator
当前为
// ==UserScript== // @name Expand collapsed GitHub code blocks // @namespace http://tampermonkey.net/ // @description Adds click event and distinct hover style to collapsed code indicator // @match https://github.com/* // @version 1.2 // @grant GM_addStyle // ==/UserScript== // Use with violentmonkey // https://addons.mozilla.org/en-US/firefox/addon/violentmonkey/ // https://chrome.google.com/webstore/detail/violentmonkey/jinjaccalgkegednnccohejagnlnfdag?hl=en (function() { 'use strict'; const expandables = document.querySelectorAll('.js-expandable-line') expandables.forEach(line => { line.style.cursor='pointer' line.addEventListener('click', () => { line.querySelector('.blob-num-expandable').children[0].click() }) }) GM_addStyle ( ` .is-hovered.blob-code.blob-code-inner.blob-code-hunk { background-color: #ffedde !important; }` ); })();