您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Compare Fork Repo With Source Repo
// ==UserScript== // @name GitHub 增强(显示 Fork 仓库与 Source 仓库间差异的描述) // @namespace http://tampermonkey.net/ // @version 0.2 // @description Compare Fork Repo With Source Repo // @author ko0r0sh, Liby // @match https://*.github.com/* // @run-at document-end // @connect * // @require https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js // ==/UserScript== (function() { 'use strict'; if (/github\.com.+network\/members.*/.test(location.href)) { (function () { console.log("GitHub detected!"); jQuery("div.repo > a:last-child").each(function(e){ let repo = jQuery(this); let url = "https://github.com" + jQuery(this).attr("href"); jQuery.get(url, function(data){ let info = /(This branch is[^\.]+\.)/.exec(data)[0]; let has_ahead = false; let match_result = /(.+?)(\d+)( commits? ahead.+)/.exec(info); if(match_result) { info = match_result[1] + '<span style="background: #ebc944; color: #ffffff;">' + match_result[2] + '</span>' + match_result[3]; has_ahead = true; } repo.parent().append('<span style="margin-left: 20px;' + (has_ahead ? 'color: #ffffff; background: #1287a8; font-weight:bold;">' : '">') + info + "</span>"); }) }) })(); } // Your code here... })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址