// ==UserScript== // @name Greasy Fork Total Downloads // @namespace - // @version 0.4 // @description Shows a user's total downloads. // @author NotYou // @include *greasyfork.org/*/users/* // @license GPL-3.0 // @run-at document-body // @grant none // @downloadURL none // ==/UserScript== /* ﹀ Change Log ﹀ 0.4 Version: - Fixed counting bugs - Converted jQuery to Pure JS - ES6 Syntax using */ window.addEventListener('load', function() { let ti = 0; let tdi = 0; document.querySelectorAll('#user-script-list > li dd.script-list-total-installs span').forEach(function(e) { ti += (parseInt(e.innerText.replace(/,/g, ''))); }); document.querySelectorAll('#user-script-list > li dd.script-list-daily-installs span').forEach(function(e) { tdi += (parseInt(e.innerText.replace(/,/g, ''))); }); let tif = ti.toLocaleString(); let tdif = tdi.toLocaleString(); document.querySelector('div.sidebarred-main-content h3:first-child').insertAdjacentHTML('beforeend', `
[${tif} Installs] [${tdif} Daily Installs]
`) });