您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Shows the total amount for each ratings, total/daily installs, and scripts posted on any user profile and search pages.
当前为
// ==UserScript== // @name Greasy Fork镜像 - Analyze from posted scripts // @namespace ScriptAnalyzer // @version 2 // @description Shows the total amount for each ratings, total/daily installs, and scripts posted on any user profile and search pages. // @author hacker09 // @match https://gf.qytechs.cn/en/users/* // @match https://gf.qytechs.cn/*/scripts?q=* // @match https://gf.qytechs.cn/*/scripts/by-site/* // @grant none // ==/UserScript== (async function() { 'use strict'; var date, ok = 0, bad = 0, Dailytotal = 0, total = 0, good = 0; //Create new variables document.querySelectorAll(".ok-rating-count").forEach(el => ok += parseInt(el.innerText)); //Add the ratings document.querySelectorAll(".bar-rating-count").forEach(el => bad += parseInt(el.innerText)); //Add the ratings document.querySelectorAll(".good-rating-count").forEach(el => good += parseInt(el.innerText)); //Add the ratings document.querySelectorAll("dd.script-list-total-installs").forEach(el => total += parseInt(el.innerText.replaceAll(',',''))); //Add the installs document.querySelectorAll("dd.script-list-daily-installs").forEach(el => Dailytotal += parseInt(el.innerText.replaceAll(',',''))); //Add the installs if (location.href.match('sort=created') === null) { //If the current page is not already being sorted by the created date date = await (await fetch(location.href + '?sort=created')).text(); //Fetch the page sorted by the created date date = new DOMParser().parseFromString(date, "text/html").querySelector("span > relative-time").innerText; //Save the newest created date } //Finishes the if condition else //If the current page is already being sorted by the created date { //Starts the else condition date = document.querySelector("relative-time").title; //Save the newest created date } //Finishes the else condition location.href.match('users') ? document.querySelector("#user-script-sets-section").insertAdjacentHTML("afterbegin", ` <section> <header> <h3>Total</h3> </header> <section class="text-content"> <ul> <li><b>Script posts</b>: ${document.querySelectorAll("#user-script-list > li").length}</li> <li><b>Daily installs</b>: ${Dailytotal.toLocaleString()}</li> <li><b>Total installs</b>: ${total.toLocaleString()}</li> <li><b>Latest created</b>: ${date}</li> <li><b>Number of people who rated it Bad</b>: ${bad.toLocaleString()}</li> <li><b>Number of people who rated it OK</b>: ${ok.toLocaleString()}</li> <li><b>Number of people who rated it Good or added it to favorites</b>: ${good.toLocaleString()}</li> </ul> </section> </section>`) : document.querySelector(".width-constraint:nth-child(2)").insertAdjacentHTML("afterbegin", ` <section> <header> <h3>Total</h3> </header> <section class="text-content"> <ul> <li><b>Script posts</b>: ${document.querySelectorAll("#browse-script-list > li").length}</li> <li><b>Daily installs</b>: ${Dailytotal.toLocaleString()}</li> <li><b>Total installs</b>: ${total.toLocaleString()}</li> <li><b>Latest created</b>: ${date}</li> <li><b>Number of people who rated it Bad</b>: ${bad.toLocaleString()}</li> <li><b>Number of people who rated it OK</b>: ${ok.toLocaleString()}</li> <li><b>Number of people who rated it Good or added it to favorites</b>: ${good.toLocaleString()}</li> </ul> </section> </section>`); //Add the information on the page })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址