您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
删除GitHub链接多余的参数。GitHub Remove /refs/heads from URL.
// ==UserScript== // @name GitHub链接精简 // @version 1.02 // @description 删除GitHub链接多余的参数。GitHub Remove /refs/heads from URL. // @match *://github.com/*/refs/heads/* // @match *://raw.githubusercontent.com/*/refs/heads/* // @author yzcjd // @author2 Lama AI 辅助 // @run-at document-start // @grant none // @namespace https://greasyfork.org/users/1171320 // @license MIT // ==/UserScript== (function() { 'use strict'; // 检查并更改 URL function removeRefsHeads() { const currentUrl = window.location.href; const newUrl = currentUrl.replace('/refs/heads', ''); if (currentUrl !== newUrl) { window.location.replace(newUrl); // 重定向到新 URL } } // 立即执行以确保在页面加载时应用更改 removeRefsHeads(); })();