Hack Forums
[Userscript] New Posts Notifier - Enable it and the page will check for new posts every 30 seconds - 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: [Userscript] New Posts Notifier - Enable it and the page will check for new posts every 30 seconds (/showthread.php?tid=3674711)



New Posts Notifier - Enable it and the page will check for new posts every 30 seconds - 'Snorlax - Aug 6, 2013



What does it do?
Press the "Start notifying" button before the "Thread Options"-option. The page will then reload every 30 seconds, and notify you with an alert if there is a new post.
Only 1 thread is possible at the time.

New updates!
You can now start and stop the checker! This now also checks if a new page has been made (because the 10th post will make a new page)!


* - Skorp - Aug 6, 2013

Nothing against it, but why not just click "Your Posts" then?


* - 'Snorlax - Aug 6, 2013

(Aug 6, 2013 07:01 PM)Skorp Wrote:  Nothing against it, but why not just click "Your Posts" then?

Because if you're checking for new posts, this will make it automatic. You will no longer need to go to the page, press refresh, wait for the page to load and then read the reply.
With this, you simply set it to refresh, and it will refresh and notify you if a new post has been posted.

It's kinda like going to Facebook. Who would want to open their notification page and refresh it to check for new notifications? ;)


* - Endanger™ - Aug 7, 2013

This looks like a great script Snorlax, I'm gonna download it and test it out right now.


* - Shame - Aug 7, 2013

Looks good, man. I can't wait to use it.


* - wοrlockt - Aug 7, 2013

And another 'useful' script from you :P


* - Fhoto. - Aug 8, 2013

Thanks for this Snorlax, looks pretty nice.


* - Asset - Aug 8, 2013

> Sees a 'Snorlax script.
> Downloads without reading.
> Knows it's useful.

Thanks for this script.
So we can enable the feature and still browse HF in another tab?


* - 'Snorlax - Aug 8, 2013

(Aug 8, 2013 02:43 PM)Edris Wrote:  > Sees a 'Snorlax script.
> Downloads without reading.
> Knows it's useful.

Thanks for this script.
So we can enable the feature and still browse HF in another tab?

Yeah should be possible. Thanks for comment :D

Enjoy!


* - Shigbeard - Mar 8, 2014

I'd like to propose a suggested update... something I did on my own, but just saying....

1: Do you think you could introduce a visible timer on the page, detailing time remaining until refresh? I fiddled with this for another forum i built this for... this is the code I use.

Code
function runScript(){
    var count = 29;
    $("#threadstatus").html("<strong><font color=\"#00FF00\">(Enabled)</font></strong>");
    $("#notifyThread").html("<strong>Disable Automatic Refreshing</strong>");
    $("#timetorefresh").html(30);
    $("#threadstatus2").html("<strong><font color=\"#00FF00\">(Enabled)</font></strong>");
    $("#notifyThread2").html("<strong>Disable Automatic Refreshing</strong>");
    $("#timetorefresh2").html(30);
    interval = setInterval(function(){
    if (count >= 6) {
    $("#timetorefresh").html(count);
    $("#timetorefresh2").html(count);
    }
    if (count <= 5 && count >= 1) {
    $("#timetorefresh").html("<font color=\"#FF0000\">" + count + "</font>");
    $("#timetorefresh2").html("<font color=\"#FF0000\">" + count + "</font>");
    }  
    if (count == 0) {
    $("#timetorefresh").html("Refreshing...");
    $("#timetorefresh2").html("Refreshing...");
    location.reload();
    }
    count--;
    }, 1000);
    }

If you could implement this as an update, that would be lovely.


* - 'Snorlax - Mar 8, 2014

(Mar 8, 2014 06:00 PM)!!!! Scorn™ !!!! Wrote:  I'd like to propose a suggested update... something I did on my own, but just saying....

1: Do you think you could introduce a visible timer on the page, detailing time remaining until refresh? I fiddled with this for another forum i built this for... this is the code I use.

Code
function runScript(){
    var count = 29;
    $("#threadstatus").html("<strong><font color=\"#00FF00\">(Enabled)</font></strong>");
    $("#notifyThread").html("<strong>Disable Automatic Refreshing</strong>");
    $("#timetorefresh").html(30);
    $("#threadstatus2").html("<strong><font color=\"#00FF00\">(Enabled)</font></strong>");
    $("#notifyThread2").html("<strong>Disable Automatic Refreshing</strong>");
    $("#timetorefresh2").html(30);
    interval = setInterval(function(){
    if (count >= 6) {
    $("#timetorefresh").html(count);
    $("#timetorefresh2").html(count);
    }
    if (count <= 5 && count >= 1) {
    $("#timetorefresh").html("<font color=\"#FF0000\">" + count + "</font>");
    $("#timetorefresh2").html("<font color=\"#FF0000\">" + count + "</font>");
    }  
    if (count == 0) {
    $("#timetorefresh").html("Refreshing...");
    $("#timetorefresh2").html("Refreshing...");
    location.reload();
    }
    count--;
    }, 1000);
    }

If you could implement this as an update, that would be lovely.

Nah mate it's okay. I never use it and I've never heard of anyone using it, so I see no need for it.
Feel free to do it yourself if you want. If you release my script, then just credit me.


* - Etho - Mar 9, 2014

Thanks for this script, it is really useful!


* - Cubе - Mar 9, 2014

Does it only work with old school theme? It doesn't seem to work for me.


* - 'Snorlax - Mar 9, 2014

(Mar 9, 2014 07:36 PM)Esther Wrote:  Does it only work with old school theme? It doesn't seem to work for me.

Works on new as well. What problem are you getting?