您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
调整 GitHub Trending 页, 数据排序逻辑
当前为
// ==UserScript== // @name GitHub Trending star 排序回归 // @namespace http://tampermonkey.net/ // @version 0.1.0 // @description 调整 GitHub Trending 页, 数据排序逻辑 // @author pozhu // @include hhttps://github.com/trending/* // @grant none // @license MIT // ==/UserScript== (function () { "use strict"; [...document.getElementsByClassName("Box-row")] .map((item) => { const reg = /Built by\s+(.+) stars/g; const stars = reg.exec(item.innerText)[1].replace(",", ""); return { stars, node: item }; }) .sort((a, b) => b.stars - a.stars) .forEach((item) => { item.node.parentNode.appendChild(item.node); }); })();