Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Userscript 

Award Whore - Add awards to your own profile with ease

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]

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:

  1. When you post a new reply, the awards won't get added. Deal with it. Refresh the page and they're there.
  2. Another "bug" - You can add multiple awards by clicking on them more than once. For people who want to be a bigger whore!
This is pretty nice, thanks for the share.

Spoiler (Click to View)
You're welcome, Wonders! If you find any bugs, please report them to me.
I will have this moved out of Empire's SF once everything is done ;)
Haha, that's actually pretty cool. Thanks for sharing and making this! :)

I think this may be a bug: I cannot edit my post. But I can when I right click and open it on a new tab.
Clique Wrote:  I'm CSing badly because of this skin.
Very well done, Snorlax! I especially enjoy the award fading. :D

(Jun 22, 2013 05:21 AM)Pray Wrote:  I think this may be a bug: I cannot edit my post. But I can when I right click and open it on a new tab.

I'm not having that issue
[Image: 2wAf2IN.gif]
That's pretty cool. :)
[Image: eywodzd.png]

🤣
I'm glad you liked it guys. This is why I do this.. To get better, and get lots of love! =D
Thanks for the share! Mind try it out later :P
Pretty cool user script :P I'm going to try it out now!
I lift and stuff.
(Jun 22, 2013 05:27 AM)'Snorlax Wrote:  I'm glad you liked it guys. This is why I do this.. To get better, and get lots of love! =D

Now make it working with a server so everybody who use this userscript will see the changes from other people who use that too!

Just kidding, but I love the idea of making a script which allows you to edit the awards 😝
Blah my awards are not showing up for some reason :/
I lift and stuff.
(Jun 22, 2013 07:15 AM)1n9i9c7om Wrote:  Now make it working with a server so everybody who use this userscript will see the changes from other people who use that too!

Just kidding, but I love the idea of making a script which allows you to edit the awards 😝

Nah, that would require too much work, and I'm not really into making a server and load external site stuff.
But yeah, what do you mean with edit? Like it is now, or add custom ones? 😝
(Jun 22, 2013 07:23 AM)'Snorlax Wrote:  Nah, that would require too much work, and I'm not really into making a server and load external site stuff.
But yeah, what do you mean with edit? Like it is now, or add custom ones? 😝

I meant it like it's now, but your idea is even better 🤣
(Jun 22, 2013 07:23 AM)Alpha Bruh Wrote:  Blah my awards are not showing up for some reason :/

That's odd.
Which browser do you use?
Now I can finally put the RAT Expert award on my profile. Thanks for this.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by EffexionDec 12, 2016 10:35 PM 1 158 Dec 12, 2016 10:35 PM
Last Post: Terry A. Davis
[Userscript] by H350Jun 15, 2016 12:16 PM 34 1,464 Jun 15, 2016 12:16 PM
Last Post: Omniscient
by H350May 10, 2016 07:40 AM 6 269 May 10, 2016 07:40 AM
Last Post: H350