Hack Forums
[Userscripts] Reputation Notifier (BETA) - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Computing (https://hackforums.net/forumdisplay.php?fid=88)
+---- Forum: Computing Lounge (https://hackforums.net/forumdisplay.php?fid=8)
+---- Thread: [Userscripts] Reputation Notifier (BETA) (/showthread.php?tid=4418443)

Pages: Pages 1 2 3


[Userscripts] Reputation Notifier (BETA) - Pillows - Aug 27, 2014

For Firefox get GreaseMonkey.
For Chrome get TamperMonkey.
For other browsers: Get Chrome.

Probably a bad way to start off my userscript portfolio but this was the first idea that came to mind. Basically what this does, is whenever you get a reputation change, positive or negative, you will get an alert within a 30 minute time frame. I was thinking of what sort of time frame would work best, but I'm pretty sure 30 minutes will cut it for this. If you think it should be lower, explain why in a post.

Notes:
When installing this userscript make sure you change the UID in the "uid" variable. If you don't do this, then it will bug up the userscript.

Download:
https://raw.githubusercontent.com/pillows/HF-Userscripts/master/RepNotifier.min.js

I am pretty sure there are bugs in this, so if there are leave a comment or a Github issue.

Credits:
'Snorlax - The one that first got me interested in making userscripts :) And I copied a bit of his thread because I got lazy :P

And yeah I am taking requests for HF userscripts. If it's a good idea and not too complicated then I will make the userscript for it.

Have fun!

======
Changelog:
8/28/2014 - I've changed the repeat period in the script.


* - Programming - Aug 27, 2014

I might as well use this. Nice release! :) 🤝

w8 there's no download link.


* - Pillows - Aug 27, 2014

(Aug 27, 2014 09:43 PM)Programming Wrote:  I might as well use this. Nice release! :) 🤝

w8 there's no download link.

You're too fast. I put the download link there after I made the thread because I knew there was something I forgot :P


* - ⭐ PROFIT ⭐ - Aug 27, 2014

pretty nice!

i'm gonna use it, sounds cool.


* - VRUMM - Aug 27, 2014

how about making a video of the userscript in motion?
What if someone changes an +3 to a +2? or to a neutral?


* - Ninetales. - Aug 27, 2014

I would like to see how it notifies you as well.


* - Dr. Manhattan - Aug 27, 2014

Great job man, I'm always happy to see members take action :-) keep up the good work buddy!


* - TRH4CK - Aug 27, 2014

(Aug 27, 2014 09:48 PM)Sh1eld Wrote:  how about making a video of the userscript in motion?
What if someone changes an +3 to a +2? or to a neutral?

I think that it will notify, as it saves the rep on client side after checking.


* - Pillows - Aug 27, 2014

(Aug 27, 2014 09:48 PM)Sh1eld Wrote:  how about making a video of the userscript in motion?
What if someone changes an +3 to a +2? or to a neutral?

The user script will say how much the rep has changed. With the exception of a neutral. I guess in the morning I'll make a test pop-up and take a screenshot of that. I can't do it note since I'm on mobile.

(Aug 27, 2014 09:48 PM)Ninetales. Wrote:  I would like to see how it notifies you as well.

It notifies you through a JavaScript alert.


* - Programming - Aug 27, 2014

I made a quick edit to display something on the page and not a JavaScript alert. PM me if you want this!


* - eiqhtz - Aug 27, 2014

Just did it, and it's compatible with Enhancement Suite! :)

Just wondering, can someone give me some +rep to see how exactly it works? I'm joking, don't. Please, don't.


* - Pillows - Aug 27, 2014

(Aug 27, 2014 09:53 PM)Programming Wrote:  I made a quick edit to display something on the page and not a JavaScript alert. PM me if you want this!

Make a pull request and I'll look through it in the morning.

HTTPS://github.com/pillows/HF-Userscripts


* - Xerotic - Aug 27, 2014

Name userscript files with this format: *.user.js so that it installs automatically.

Also, have it grab the UID automatically. This should work (didn't test, but it should work).

Code
var uid = $('#panel').find('a[href*="uid="]').first().attr('href').split('uid=')[1];

Also your script checks the reputation page every time you load a new page... and THEN if you sit on one page without refreshing for 30 minutes it checks again.

What you should do is set the time that was last checked in a stored variable like you did with the rep number.

Code
GM_setValue("last_checked", Date.now());
(Note that timestamp is in milliseconds)

Then just verify the time against last_checked and run your "run" function if it has been more than 1800000 milliseconds.

If you need any more advice or have questions feel free to ask.




EDIT: Updated the first code block.


* - Pillows - Aug 27, 2014

^ Xerotic I'll do the code edts for that tomorrow.

The main thing I want to know now is does it function properly?


* - edwardj7337 - Aug 27, 2014

Haha, you kids actually care so much about reputation that you want to know when you get a change in your rep? How sad.

Let me guess, you just think its cool.. 🙃 Is that your defense?

I bet you guys worry about your reputation in your "real life" when you aren't on HF.. 🤫