显示 greasyfork 当前页面脚本的总安装量

在用户页面生效(网页的标题)

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         显示 greasyfork 当前页面脚本的总安装量
// @namespace    https://1silencer.github.io/
// @version      0.4.3
// @description  在用户页面生效(网页的标题)
// @author       Silencer
// @match        *://greasyfork.org/*/users/*
// @icon         https://greasyfork.org/assets/blacklogo96-e0c2c76180916332b7516ad47e1e206b42d131d36ff4afe98da3b1ba61fd5d6c.png
// @grant        none
// ==/UserScript==

document.title = `${document.querySelector('.user-profile-link')?document.querySelector('.user-profile-link').innerText:''}共${document.querySelectorAll('.script-list-total-installs').length / 2}个脚本安装量:${new Array(...document.querySelectorAll('.script-list-total-installs')).filter(i=>!isNaN(parseFloat(i.innerText))).reduce((sum, i) =>sum + Number(i.innerText.replace(/\D/, '')), 0)}`