I will have a closer look at the script. Most time it keeps hanging while checking (I got the correct behavior and count one time). Perhaps something is missing in the login procedure... Strange, because clicking the account confirms that login session is established.
I wasn't able to solve the login. Perhaps tobwithu(s) can do the job... I suspect it needs an extra information exchange with the server (probably by using an AJAX call).
The present script works one time after the script has logged in successfully. You can verify this by going to the X-notifier options and uncheck the checkmark in front of your reddit account (then Save). Then logout manually from your reddit account and after waiting a while check the checbox again (and Save). You will probably see this works, but on second Check Now it will hang forever and/or turn red.
For a half-way solution I added the checkLogin function, which makes it possible to login manually (correctly) and skip the incomplete login of the script: it will only extract the unread count from the html. My script version should do this for both old and new design (html). Of course you then need to login again when a login essential cookie expires.
tobwithu
Tue, 08/14/2018 - 14:23
Permalink
I uploaded new Reddit script.
I uploaded new Reddit script.
duradara
Sun, 03/10/2019 - 14:49
Permalink
For Chrome?
Can you make it work on chrome?
jeroen
Sun, 03/10/2019 - 22:38
Permalink
inboxCount gone
@tobwithu: The old solution is still there... (and working):
function getCount(aData) {
var fnd=aData.match(/id="mail"/);
if(fnd){
fnd=aData.match(/<a .+? class="message-count" >(\d+)<\/a>/);
return fnd?fnd[1]:0;
}else return -1;
}
jeroen
Tue, 03/12/2019 - 21:01
Permalink
new design
I didn't get there is a new design. So now I can see the getCount is correct for the new design. (But not for the old design)
jeroen
Mon, 03/11/2019 - 07:22
Permalink
Mmm...
I will have a closer look at the script. Most time it keeps hanging while checking (I got the correct behavior and count one time). Perhaps something is missing in the login procedure... Strange, because clicking the account confirms that login session is established.
duradara
Tue, 03/12/2019 - 13:48
Permalink
Thx
Thx, I hope you find a way to make it work.
jeroen
Wed, 03/13/2019 - 01:32
Permalink
Login
I wasn't able to solve the login. Perhaps tobwithu(s) can do the job...
I suspect it needs an extra information exchange with the server (probably by using an AJAX call).
The present script works one time after the script has logged in successfully. You can verify this by going to the X-notifier options and uncheck the checkmark in front of your reddit account (then Save). Then logout manually from your reddit account and after waiting a while check the checbox again (and Save). You will probably see this works, but on second Check Now it will hang forever and/or turn red.
For a half-way solution I added the checkLogin function, which makes it possible to login manually (correctly) and skip the incomplete login of the script: it will only extract the unread count from the html. My script version should do this for both old and new design (html). Of course you then need to login again when a login essential cookie expires.
jeroen
Wed, 03/13/2019 - 01:59
Permalink
Download link
You can download it here: reddit Script
(Left click and download using the button that will appear at top-right next to the Share button)