I think it's pretty clear the way I have expressed the problem. But just to be sure, I went ahead and marked all unread. Yahoo said xx being marked unread. X says xx+1. Then marked as read, Yahoo said xx being marked, X says 0 (not 1). If I get a new email now, 1, it will show 2 unread. Looking back to my original post, the question was, has anybody seen this behavior. (I know you are trying to help.)
Yes, if I define an IMAP script access in X-Notifier 3.5.23 on FF 54.0.1 for my Yahoo account... I get the dreaded mystery "2" in X-Notifier drop-down new email lists, when I have just 1 new email. My Yahoo account Inbox folder shows a count of (1). However, my regular Yahoo script still works, although I have the 'Try new Yahoo Mail' prompt... and it properly shows (1) new email in X-Notifier lists.
I can replicate makedse's issue with the imap script. It always notifies +1. On 0 unread it notifies 0. On 1 unread it notifies 2 (both in inbox and in folder). I'm still using the Classic Yahoo interface.
Did some debugging and found the cause. Easy to solve. I will notify tobwithu.
The script reads a string from the html containg the sequence numbers of unread mail: "18 23 24" means 3 unread mails, determined by splitting the string by " " (space).
In case of some Yahoo servers the string also contains a space char at the end of the string: "18 23 24 ", resulting the String.split() method in returning an array of length 4 instead of 3.
I just solved it by using the String.trim() method that removes spaces at start & end of a string: Line 70: case ST_DATA+5: Line 71: var fnd=aData.match(/\* SEARCH ?(.*)$/m); Line 72: var n=0; Line 73: if(fnd) n=fnd[1]?fnd[1].trim().split(" ").length:0;
There is a scripts button right beside the account selector dropdown box. Click on the button and add .js file. The added script will show in the dropdown. In my case I had to delete the IMAP account and re enter.
After adding IMAP script, redefine each problem (Yahoo) account using IMAP. (You might want to UN-checkmark accounts defined with the Yahoo script.) Unfortunately, since this is not a dedicated Yahoo script... the icons will not appear. (You will probably also have to go to your email website and go into your account settings and set the option for IMAP to allow access from less secure email clients.) If you right-click the X-Notifier envelope icon, a drop-down list will show the names of the accounts in gray (unchecked), or non-bolded black (no new email), or bold black with a new email count number. If you 'hover' your mouse pointer over the X-Notifier envelope icon, a pop-up 'tooltip' will list the accounts in either green with a number (new email) or red (unchecked).
There is a way to add icons for each IMAP defined account... see the user guide: http://xnotifier.tobwithu.com/dp/node/481 Note... after you type: about.config ...in Firefox's address bar, you will get a new page with a Search box. In the Search box, you can type: xnotifier ...(no dash), to filter the config page to just the lines involving xnotifier accounts.
CFBancroft
Thu, 07/06/2017 - 22:07
Permalink
It depend on setting...
X-Notifier Options => General => [ ? ] Reset counter when opening messages... check or uncheck?
makedse
Thu, 07/06/2017 - 22:35
Permalink
unchecked
It works perfect for what I want, but never shows unread message count of 1.
CFBancroft
Thu, 07/06/2017 - 22:57
Permalink
I don't know if apply to Yahoo
http://xnotifier.tobwithu.com/dp/comment/9529#comment-9529
Please use Yahoo website to find it out which is unread... and make it READ... after that IMAP will correct number.
makedse
Fri, 07/07/2017 - 00:07
Permalink
pretty clear
I think it's pretty clear the way I have expressed the problem. But just to be sure, I went ahead and marked all unread. Yahoo said xx being marked unread. X says xx+1. Then marked as read, Yahoo said xx being marked, X says 0 (not 1). If I get a new email now, 1, it will show 2 unread. Looking back to my original post, the question was, has anybody seen this behavior. (I know you are trying to help.)
RpD
Fri, 07/07/2017 - 12:05
Permalink
[Edited] Yes...
Yes, if I define an IMAP script access in X-Notifier 3.5.23 on FF 54.0.1 for my Yahoo account... I get the dreaded mystery "2" in X-Notifier drop-down new email lists, when I have just 1 new email. My Yahoo account Inbox folder shows a count of (1).
However, my regular Yahoo script still works, although I have the 'Try new Yahoo Mail' prompt... and it properly shows (1) new email in X-Notifier lists.
jeroen
Fri, 07/07/2017 - 18:23
Permalink
Issue confirmed
I can replicate makedse's issue with the imap script. It always notifies +1.
On 0 unread it notifies 0.
On 1 unread it notifies 2 (both in inbox and in folder).
I'm still using the Classic Yahoo interface.
jeroen
Sat, 07/08/2017 - 00:00
Permalink
Solved
Did some debugging and found the cause. Easy to solve. I will notify tobwithu.
The script reads a string from the html containg the sequence numbers of unread mail:
"18 23 24" means 3 unread mails, determined by splitting the string by " " (space).
In case of some Yahoo servers the string also contains a space char at the end of the string:
"18 23 24 ", resulting the String.split() method in returning an array of length 4 instead of 3.
I just solved it by using the String.trim() method that removes spaces at start & end of a string:
Line 70: case ST_DATA+5:
Line 71: var fnd=aData.match(/\* SEARCH ?(.*)$/m);
Line 72: var n=0;
Line 73: if(fnd) n=fnd[1]?fnd[1].trim().split(" ").length:0;
jeroen
Fri, 07/07/2017 - 23:12
Permalink
Download link
In the meantime you can download it frome here:
IMAP Script (Left click and download from Dropbox)
Just add it as external script. It will automatically replace the included script with the same name.
jeroen
Sun, 07/30/2017 - 23:03
Permalink
X-Notifier-Reloaded
The fixed IMAP Script will be included in the next release of X-Notifier-Reloaded (3.5.25).
CFBancroft
Sun, 07/30/2017 - 23:16
Permalink
Hope update Yahoo Script with 3.5.25?
Thanks.
makedse
Sat, 07/08/2017 - 00:46
Permalink
thank you!!!
It works!!! And now I know how to extract the .js files!
legaz
Sun, 07/09/2017 - 16:42
Permalink
Help
Can you give me little instruction how to add it as external script? Thx.
makedse
Sun, 07/09/2017 - 18:42
Permalink
There is a scripts button
There is a scripts button right beside the account selector dropdown box. Click on the button and add .js file. The added script will show in the dropdown. In my case I had to delete the IMAP account and re enter.
legaz
Mon, 07/10/2017 - 05:06
Permalink
I do that...
..but nothing happened. My 4 yahoo acount icon are stil not appear.
RpD
Mon, 07/10/2017 - 09:30
Permalink
IMAP
After adding IMAP script, redefine each problem (Yahoo) account using IMAP.
(You might want to UN-checkmark accounts defined with the Yahoo script.)
Unfortunately, since this is not a dedicated Yahoo script... the icons will not appear.
(You will probably also have to go to your email website and go into your account settings and set the option for IMAP to allow access from less secure email clients.)
If you right-click the X-Notifier envelope icon, a drop-down list will show the names of the accounts in gray (unchecked), or non-bolded black (no new email), or bold black with a new email count number. If you 'hover' your mouse pointer over the X-Notifier envelope icon, a pop-up 'tooltip' will list the accounts in either green with a number (new email) or red (unchecked).
There is a way to add icons for each IMAP defined account... see the user guide:
http://xnotifier.tobwithu.com/dp/node/481
Note... after you type: about.config ...in Firefox's address bar, you will get a new page with a Search box. In the Search box, you can type: xnotifier ...(no dash), to filter the config page to just the lines involving xnotifier accounts.
The URL for Yahoo's icon is https://www.yahoo.com/favicon.ico