Advertisement
adv0catus

Game Jam #1 Forum Identifier Script

Jun 10th, 2016
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name            Game Jam #1 Participant Forum Identifier
  3. // @namespace       http://matthewammann.com
  4. // @description     Identifies Game Jam #1 participants in the forums.
  5. // @version         1.01
  6. // @date            06/10/16
  7. // @author          adv0catus & Ruudiluca
  8. // @include         *://www.kongregate.com/forums/*
  9. // ==/UserScript==
  10.  
  11. // Original script by arcaneCoder and updated by musicdemon. Repurposed by adv0catus and Ruudiluca.
  12.  
  13. /* Created by arcaneCoder - www.kongregate.com/accounts/arcaneCoder
  14. Leave these headers intact if you modify this script.*/
  15.  
  16. var pattn = new RegExp ( "-row$" );
  17. var elem = document.getElementsByTagName ( "tr" );
  18. var nameSave    = new Array ( elem.length );
  19. var table;
  20.  
  21. function update ()
  22. {
  23.     var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAALCAYAAACksgdhAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAACySURBVChTYzRNn/6fgUTABKVJAixQGgyi7XUY8iNtoDwGhldv3jNcvP+WYdHaEww3P3yBiqLZtPPgHYYb9z+AcW7rFoblu68yWGhJM1Sn+0BVQACKpjcMPxi+fP8OxicfP2FYevAKw/aTVxk0FAUY1AV4oKqI8NPzlz/AtACvAJgGAaID4sPnD1AWDk08nJxg53jqCjNEumqD/YgcECjxhB56n79+Zzhx7SlG6NErchkYAAnESBrRqfoJAAAAAElFTkSuQmCC";
  24.     MainLoop: for ( var i=0; i < elem.length; i++)
  25.     {
  26.         var obj = elem[i];
  27.        
  28.         if ( pattn.test ( obj.id ) )
  29.         {
  30.             if ( !table ) table = obj.parentNode;
  31.        
  32.             var postID = obj.id.split ("-")[1];
  33.             var username =  obj.getElementsByTagName("img")[0].title;
  34.             nameSave[i] = username;
  35.            
  36.             //List of the usernames that are Game Jam #1 participants in alphabetical order:
  37.            
  38.             var arr = ["0rava", "1ashl", "aaronsantiago", "AIexT", "agusmao", "Aldrinsalazar", "aptriangle", "ArsenG1", "ArtsFox", "BrainyBeard", "Cal010", "cathelper", "chesster415", "ClausGahrn", "CrazyDinoGames", "CreativeTurtle", "DaBarr", "DeanFarrington", "DonM83", "duolon", "Dynamo21", "egyszervolt", "Fleecemaster", "gblim", "GeanieGames", "HeynongMan", "Holy2334", "JamsRamen", "jeagle747", "jcourt", "JTtheLlama", "JurgisT", "Kasmilus", "Meerkatjie", "moraleszez", "MossyStump", "Ohbye", "Palups", "PlayerOfRPG", "PxlPaladin", "Pio6", "say892", "SCLT", "Shay9999", "silentviper", "simpleicarus", "takosman3", "TheIjzm", "ThePenguin11", "Toa_of_Pi", "totoyan", "uzzbuzz", "Vhalkar7", "yvolcano4"];
  39.             if(arr.indexOf(username) > -1) {
  40.                 //alert("Game Jam #1 participant found!");
  41.                 obj.cells[0].innerHTML += "<p style='font-size: 0.4em;' >&nbsp;</p><p style='font-size: 0.4em;' >&nbsp;</p><p style='font-size: 0.7em; color: #666;'><img src='" + img + "' />Game Jam #1</p>";
  42.             }
  43.         }
  44.     }
  45. }
  46. update();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement