您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add line numbers to reviewable.io
// ==UserScript== // @name Reviewable.io - add line numbers // @namespace https://bengr.dev/ // @version 0.1 // @description Add line numbers to reviewable.io // @author Ben Grynhaus ([email protected]) // @match https://reviewable.io/reviews/* // @icon https://www.google.com/s2/favicons?sz=64&domain=reviewable.io // @grant none // ==/UserScript== (function () { "use strict"; GM_addStyle(` div[data-line-number]:not([data-line-number="0"]):before { content: attr(data-line-number); position: absolute; color: #444; padding: 1px 3px 3px; font-size: x-small; display: block; width: 20px; text-align: right; }`); GM_addStyle(` div[data-line-number]:not([data-line-number="0"]) div.hljs { margin-left: 26px; } `); })(); function GM_addStyle(css) { const style = document.getElementById("GM_addStyleBy8626") || (function() { const style = document.createElement('style'); style.type = 'text/css'; style.id = "GM_addStyleBy8626"; document.head.appendChild(style); return style; })(); const sheet = style.sheet; sheet.insertRule(css, (sheet.rules || sheet.cssRules || []).length); }