PHP Code
<?php
// ==UserScript==
// @name Hack Forums Award Whore v2
// @namespace Snorlax
// @description Adds awards to your profile
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_deleteValue
// @include *hackforums.net/*
// @version 1.0.2
// ==/UserScript==
uid = $("#panel").find('a').attr('href').replace(/[^0-9]/g, '');
array = [];
if(GM_getValue("awards") != undefined) {
array = JSON.parse(GM_getValue("awards"));
}
if(array == undefined){
array = [];
}
if(GM_getValue("awards") != null){
for (var i=0;i<array.length;i++){
$('a[href="https://hackforums.net/member.php?action=profile&uid='+uid+'"]:not(:first)').parentsUntil('tbody').find('.post_author_info').find("span:last").append('<img src=' + array[i] + ' />');
};
}
if(location.href == 'https://hackforums.net/myawards.php'){
$(".thead").append('<button style="float: right;" onclick="javascript:return false;" class="button reset">Reset awards</button>');
$(".thead").append("Displaying current awards: ");
for (var i=0;i<array.length;i++){
$(".thead").append('<img src=' + array[i] + ' />');
};
$("td[class*='trow'] img").click(function(){
$(this).fadeTo('fast','0.2');
array.push($(this).attr("src"));
GM_setValue("awards", JSON.stringify(array));
console.log(array);
console.log(GM_getValue("awards"));
});
$(".reset").on("click", function() {
GM_deleteValue("awards");
array = [];
$(this).text("Awards has been reset");
$this = $(this);
interval = setInterval(function() {
$this.text("Reset awards");
clearInterval(interval);
}, 5000);
});
}
For Firefox get GreaseMonkey.
For Chrome get TamperMonkey.
For other browsers: Get Chrome.
What it does:
It adds any award you like to your profile! Client side of course, so it only works on your screen, and not others.
When you go to https://hackforums.net/myawards.php you simply press on the image of each award you want, then it will add it to your profile. You can also find that link at the bottom of the page. The text says "Awards".
![[Image: 3lzfO.png]](https://puu.sh/3lzfO.png)
This only works on people who has NOT set their browsing experience to "Display posts in classic mode." - You can change that here, but if you didn't change it, then it should work. Classic mode is ticked, you need to untick it.
Thanks to my good friend The Don Killuminati for giving me this idea!
=========
Known bugs:
- When you post a new reply, the awards won't get added. Deal with it. Refresh the page and they're there.
- Another "bug" - You can add multiple awards by clicking on them more than once. For people who want to be a bigger whore!

![[Image: guOsexq.png]](https://i.imgur.com/guOsexq.png)

![[Image: 2wAf2IN.gif]](https://i.imgur.com/2wAf2IN.gif)

![[Image: eywodzd.png]](https://i.imgur.com/eywodzd.png)