Sort Number for Greasy Fork Scripts

Show order number for Greasy Fork script list page, for every page

Verze ze dne 15. 04. 2021. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name            Sort Number  for Greasy Fork Scripts
// @name:zh-CN       脚本列表排序
// @name:zh          腳本清單排序
// @name:en        Sort Number  for Greasy Fork Scripts
// @description   Show order number  for Greasy Fork script list page, for every page
// @description:zh   腳本清單頁顯示排名序號,翻頁自動追加序號
// @description:zh-CN   脚本列表页显示排名序号, 翻页自动追加序号
// @description:en   Show order number  for Greasy Fork script list page, for every page
// @namespace    https://github.com/Germxu
// @homepage     https://github.com/Germxu/Scripts-for-TamperMonkey
// @supportURL   https://github.com/Germxu/Scripts-for-TamperMonkey/issues/new
// @version      0.3
// @author       Finn
// @run-at       document-start
// @match        https://greasyfork.org/*/scripts*
//@exclude       https://greasyfork.org/*/scripts/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    const page = +new URLSearchParams(document.location.search).get('page')||1;
    const q= `<style>#browse-script-list{counter-reset: section ${(page-1)*50 -1};}.ad-entry{height: 0;overflow: hidden;}#browse-script-list li{position:relative}
                #browse-script-list li:after{counter-increment: section;content:counter(section);font:bold 20px/30px Arial;color: #29b6f6;position:absolute;bottom:8px;right:15px}</style>`;
    document.documentElement.insertAdjacentHTML('afterbegin', q);

   //document.querySelector("#browse-script-list").style.counterReset =`section ${(page-1)*50 -1}`
})();