CSC WinLoss Usernames

Show the usernames of people who have compared with you on cocksizecontest

  1. // ==UserScript==
  2. // @name CSC WinLoss Usernames
  3. // @namespace cocksizecontest.com
  4. // @description Show the usernames of people who have compared with you on cocksizecontest
  5. // @include https://www.cocksizecontest.com/wins-losses/
  6. // @version 1
  7. // @grant none
  8. // ==/UserScript==
  9.  
  10. function csc_thumbs() {
  11. var thumbs = document.querySelectorAll(".cscResultsThumbs > a");
  12. thumbs.forEach(function(node) {
  13. var href = node.getAttribute('href');
  14. var splits = href.split('/');
  15. if (splits[splits.length-1].length < 1) {
  16. splits.length--;
  17. }
  18. var username = splits[splits.length-1];
  19.  
  20. node.appendChild(document.createTextNode(username));
  21. node.style.float = 'left';
  22. node.style.minWidth = '10em';
  23. });
  24. }
  25. document.addEventListener("DOMContentLoaded", csc_thumbs);