GreasyFork Total Scripts

Shows a user's total scripts count on GreasyFork

  1. // ==UserScript==
  2. // @name GreasyFork Total Scripts
  3. // @namespace pxgamer
  4. // @version 0.2.1
  5. // @description Shows a user's total scripts count on GreasyFork
  6. // @author pxgamer
  7. // @include *greasyfork.org/en/users/*
  8. // @grant none
  9. // ==/UserScript==
  10. /*jshint multistr: true */
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. let l = $('li[data-script-id]').length;
  16. if (l == 1) {
  17. $('div.width-constraint h2:first').append('<span style="font-size: 15px;"> [' + l + ' Total Script]</span>');
  18. }
  19. else {
  20. $('div.width-constraint h2:first').append('<span style="font-size: 15px;"> [' + l + ' Total Scripts]</span>');
  21. }
  22. })();