// ==UserScript== // @name Sort Number for Greasy Fork Scripts // @name:zh-CN 脚本列表排序 // @name:ja 腳本清單排序 // @description Show order number for Greasy Fork script list page, for every page // @description:zh-CN 脚本列表页显示排名序号, 翻页自动追加序号 // @description:ja スクリプトリストページにはランキング番号が表示されます。ページをめくると自動的に番号が追加されます。作品をハイライトします。 // @namespace https://github.com/Germxu // @homepage https://github.com/Germxu/Scripts-for-TamperMonkey // @supportURL https://github.com/Germxu/Scripts-for-TamperMonkey/issues/new // @version 1.1 // @author Finn // @run-at document-end // @match https://greasyfork.org/*/scripts* //@exclude https://greasyfork.org/*/scripts/* // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; const page = +new URLSearchParams(document.location.search).get('page')||1; const q= ``; document.documentElement.insertAdjacentHTML('afterbegin', q); const a = document.querySelector(".user-profile-link a").href; document.querySelectorAll("#browse-script-list li").forEach(function(i){ const b = i.querySelector("dd.script-list-author a"); if( b&& b.href===a) { i.className='Finn' } }) })();