BLOG main image
분류 전체보기 (39)
Firefox (15)
WebMailNotifier (24)
101773 Visitors up to today!
Today 75 hit, Yesterday 331 hit
website stats
daisy rss
tistory 티스토리 가입하기!
2007/08/12 14:15
To make your own script, you should be able to handle javascript and regular expressions.

When the login form of your webmail provider is like this,
<form action="https://logins.foo.com/login" method="post">
<input name="user">
<input name="passwd" type="password">
<input name="key" value="abc=12" type="hidden">
<input value="Login" type="submit">
</form>
the corresponding script is as below.
Save below codes as 'mymail.js'(or other name that ends with '.js')
And install it in WebMail Notifier preferences.
function initHandler(handler){
handler.name="MyMail";
handler.dataURL="http://welcome.foo.com";
handler.loginData=["https://logins.foo.com/login",
"user","passwd","key="+encodeURIComponent("abc=12")];
handler.mailURL="http://mail.foo.com";

handler.getData=function(aData){ //aData is a html source in dataURL
var fnd=aData.match(......); //find mail count
if(fnd){
var num;
//get mail count here
return num;
}else{
return -1;//display 'not checked' message
}
};
}
  • name : the provider name that wiil be shown in WebMail Notifier
  • dataURL : the url where you can get mail count
  • loginData : [formSubmitURL,usernameField,passwordField,additionalData]
    • formSubmitURL : action url of the login form
    • usernameField : input field name of username
    • passwordField : input field name of password
    • additionalData : other input fields data
  • mailURL : the url that will be opened when you click the icon or menuitem
이올린에 북마크하기(0) 이올린에 추천하기(0)
Trackback Address :: http://tobwithu.tistory.com/trackback/14
Carlo | 2007/08/15 03:06 | PERMALINK | EDIT/DEL | REPLY
Hi, I can't add new scripts using your Webmail Notifier; I tried with your cymail.js (above). I noticed that in Linux There is no OK Button (there is only the Close one...). Can you help me? Thanks in advance. Carlo, Italy
(Byungwook Kang) 밝은영혼 | 2007/08/15 09:19 | PERMALINK | EDIT/DEL
Add script and close preference window.
If you open preference window again, you will see the new host.
This is little bit confusing.
I'm thinking about separating user script tab to a new window
Colovic Vladan | 2007/08/15 05:51 | PERMALINK | EDIT/DEL | REPLY
It looks that you have to enter script twice, for it to be recognized and appened to the list.
Matt | 2007/08/16 15:26 | PERMALINK | EDIT/DEL | REPLY
No, still doesn't work for me... hit user script button on prefs screen, dialog opens, hit Add, point to fastmail.js, file shows in dialog, hit X to close, nothing extra seen in Prefs window, close prefs (OK, cancel or X), then open prefs -- nothing is different...

I expect to see "fastmail.fm" in the drop down list with Daum/Hotmail/Gmail etc., but it's not there, so can't configure username/pwd etc... Am I looking in the right place?

Love (and need) the idea -- just doesn't work for me...

Cheers,
matt.
(Byungwook Kang) 밝은영혼 | 2007/08/16 15:41 | PERMALINK | EDIT/DEL
1. delete all installed user scripts.
2. type 'about:config' in the location bar. find 'wm-notifier.hosts'
If the value is below 7, set it to 7.
3. Download fastmail script again here. http://tobwithu.tistory.com/13
(There was an error in previous version)
4. close all the firefox window.
5. restart firefox and Install the script.
Matt | 2007/08/16 17:05 | PERMALINK | EDIT/DEL | REPLY
Thankyou... That basically worked -- created a second "Daum" in the drop-down, which I configured with my fastmail login. It correctly checks, and opens fastmail, but is still called "Daum". Can't add a real Daum account now, as the "Daum" selection now configures a fastmail login (can have two account though, which is good)...
(Byungwook Kang) 밝은영혼 | 2007/08/17 14:47 | PERMALINK | EDIT/DEL
I found a serious bug in installation of user script thanks to you.
And I fixed it in ver 1.0
Matt | 2007/08/20 12:16 | PERMALINK | EDIT/DEL | REPLY
No problem - ver 1.0 is looking good. Thanks for all your effort on this, it's a great tool!
hexen | 2007/08/31 20:08 | PERMALINK | EDIT/DEL | REPLY
how can i create an script for www.poczta.fm? its imposible? please, create it for me :(
(Byungwook Kang) 밝은영혼 | 2007/08/31 21:08 | PERMALINK | EDIT/DEL
Refer to http://tobwithu.tistory.com/14
Make it for yourself if it's possible.
If you can't, to make a script, I need an account.
Please let me access your account or make a test account for me.
hexen | 2007/09/01 23:18 | PERMALINK | EDIT/DEL | REPLY
url: http://www.poczta.fm
login: testingnotifier@poczta.fm
pass: qwerty

thank you
rui | 2007/09/03 19:25 | PERMALINK | EDIT/DEL | REPLY
Can you do one script for:
URL: http://mail.sapo.pt
EMAIL: webmailnotifier@sapo.pt
PASSWORD: qwerty
Thx
(Byungwook Kang) 밝은영혼 | 2007/09/03 19:43 | PERMALINK | EDIT/DEL
I will do it.
But I don't have much time now because the second semester started.
I can't tell you how long it will take.
rui | 2007/09/03 22:02 | PERMALINK | EDIT/DEL | REPLY
Thx, I'll wait.
Alfredo | 2007/09/04 19:03 | PERMALINK | EDIT/DEL | REPLY
Hello, I hope you can help me.
I'm trying to do a script but I don't know how to get the number of messages from the string in the html.
The string is as follows:
<span class="menuiteminfo"><font size="1">(3)&nbsp;</font></span><br clear="all">
It can't just be:
var fnd=aData.match(<span class="menuiteminfo"><font size="1">(3)&nbsp;</font></span><br clear="all">);
How do I get that 3 from the string?
(Byungwook Kang) 밝은영혼 | 2007/09/04 19:13 | PERMALINK | EDIT/DEL
var fnd=aData.match(/<span class="menuiteminfo"><font size="1">\((\d+)\)&nbsp;<\/font><\/span><br clear="all">/);

then fnd[1] is 3
rui | 2007/09/16 03:47 | PERMALINK | EDIT/DEL | REPLY
It's just me or hotmail scripts aren't working in this last few days?
(Byungwook Kang) 밝은영혼 | 2007/09/16 10:31 | PERMALINK | EDIT/DEL
Hotmail service was unstable because they upgraded MSN hotmail to live hotmail.
Beka | 2007/09/19 10:18 | PERMALINK | EDIT/DEL | REPLY
Hi,
I have a university webmail which uses Google Apps (means practically this is Gmail with little modifications).
do you have any pre-maid script for such cases?
So far, I haven't been able to handle it on my own.
(Byungwook Kang) 밝은영혼 | 2007/09/19 15:32 | PERMALINK | EDIT/DEL
You can find 'webmail4.js' in your firefox extension folder.
This is the user script for Gmail.
Use this file for making your script.
Mike | 2007/09/19 13:18 | PERMALINK | EDIT/DEL | REPLY
Can you make a Script for Inbox.com please?
ketu | 2007/10/02 05:48 | PERMALINK | EDIT/DEL | REPLY
Is there a way to make it work here?
http://www.stud.usv.ro/webmail/src/login.php
klvov | 2007/10/09 03:41 | PERMALINK | EDIT/DEL | REPLY
Byungwook, thanks for this nice extension. I've written script for mail.ru , may be you want to add it to the project? Here is the script:

function initHandler(handler){

handler.name="mailru";
handler.dataURL="http://win.mail.ru/cgi-bin/auth";
handler.loginData=["http://win.mail.ru/cgi-bin/auth",
"Login","Password","Domain="+encodeURIComponent("mail.ru")];
handler.mailURL="http://www.mail.ru";

handler.getData=function(aData){ //aData is a html source in dataURL
var fnd=aData.match(/\u043c:&nbsp;<b>(\d+?)<\/b>/); //find mail count
if(fnd){
var num = fnd[1]; //get mail count here
return num;
}else{
return -1;//display 'not checked' message
}
};
}


Best regards,
Konstantin.
aSToViRuS | 2007/10/10 21:05 | PERMALINK | EDIT/DEL | REPLY
I tried developing a script for www.euskaltel.es, and even I have tried to do EVERYTHING read here(and even new things), it still doesn't show in the dropdown list.
Using FF 2.0.0.7 on Vista (yes, I even tried several UAC settings...)
Kaisei | 2008/01/12 09:11 | PERMALINK | EDIT/DEL | REPLY
Are you able to make a script for college related email sites? Such as the UC Davis email at geckomail.ucdavis.edu?
Pi3cH | 2008/02/02 22:08 | PERMALINK | EDIT/DEL | REPLY
Many universities website (webmails) are using SquirrelMail here is it's script that I made, Byungwook may be you want it.

/***********************************************************
SquirrelMail version 1.4.9a script for Webmail Notifier Firefox Extension
by Pedram Hayati - Pi3cH
***********************************************************/
function initHandler(handler){
handler.name="Squirrel";
handler.dataURL="http://mail.iasbs.ac.ir/src/left_main.php";
handler.loginData=["http://mail.iasbs.ac.ir/src/redirect.php","login_username", "secretkey", "just_logged_in=1"];
handler.mailURL="http://mail.iasbs.ac.ir/src/webmail.php";
handler.getData=function(aData){
var fnd=aData.match(/<font color="#CCCCCC">INBOX<\/font><\/a><\/b>&nbsp;<small>\((\d+)\)<\/small>/);
if(fnd){
return fnd[1];
}else{
return -1;
}
};
}

User should enable :
Enable Unread Message Notification ON Inbox
Unread Message Notification Type to Only Unseen
in their SquirrelMail Options - Folder Preferences
Pi3cH | 2008/02/02 22:09 | PERMALINK | EDIT/DEL | REPLY
Many universities website (webmails) are using SquirrelMail here is it's script that I made, Byungwook may be you want it.

/***********************************************************
SquirrelMail version 1.4.9a script for Webmail Notifier Firefox Extension
by Pedram Hayati - Pi3cH
***********************************************************/
function initHandler(handler){
handler.name="Squirrel";
handler.dataURL="http://mail.iasbs.ac.ir/src/left_main.php";
handler.loginData=["http://mail.iasbs.ac.ir/src/redirect.php","login_username", "secretkey", "just_logged_in=1"];
handler.mailURL="http://mail.iasbs.ac.ir/src/webmail.php";
handler.getData=function(aData){
var fnd=aData.match(/<font color="#CCCCCC">INBOX<\/font><\/a><\/b>&nbsp;<small>\((\d+)\)<\/small>/);
if(fnd){
return fnd[1];
}else{
return -1;
}
};
}

User should enable :
Enable Unread Message Notification ON Inbox
Unread Message Notification Type to Only Unseen
in their SquirrelMail Options - Folder Preferences
martin | 2008/02/18 22:44 | PERMALINK | EDIT/DEL | REPLY
hello,
i would be very grateful if u will find time to make this script 4 www.centrum.sk too.

name: testnick
pass: testnick

thx
needHelp | 2008/02/23 19:00 | PERMALINK | EDIT/DEL | REPLY
i have a problem while i am writing a new notifier for mail.163.com.
i not sure what should i do with the 4th element of the array Handler.LoginData.
i had a look at your other scripts,and found no pattern there.
it seems that sometimes you include many subitems of the form and in other cases you include only 1 hidden input.
can you tell me the pattern of the 4th element?
now ,the form structure is below:
----------------------------------------------------------
<form id="login163" method="post" name="login163" action="" onsubmit="return fLoginFormSubmit();" target="_top" style="position:relative">
<input name="verifycookie" type="hidden" value="1" />
<input name="username" type="text" class="inp" onFocus="fEvent('focus',this)" onBlur="fEvent('blur',this)" onMouseOver="fEvent('mouseover',this)" onMouseOut="fEvent('mouseout',this)" maxlength="50"/>
<input type="password" name="password" class="inp" onMouseOver="fEvent('mouseover',this)" onFocus="fEvent('focus',this)" onBlur="fEvent('blur',this)" onMouseOut="fEvent('mouseout',this)"/>
<select name="selType" class="sel" id="selType">
<option value="-1" selected="selected">default</option>
<option value="js">fast 3.0</option>
<option value="jy">reduced</option>
</select>
<input name="remUser" type="checkbox" value="" id="remUsername" checked />
<input name="secure" type="checkbox" id="secure" checked />
<input name="loginmailbox" type="submit" id="btn1" value="loginmailbox" title="loginmailbox" onclick="setCookie('ntes_mail_firstpage','normal')"/ style="border:#70B1CF 1px solid;background-position: -15px -196px; line-height:20px">
<input name="loginnetdisk" type="submit" id="btn2" value="loginnetdisk" title="loginnetdisk" onclick="setCookie('ntes_mail_firstpage','netfolder')"/>
<input type="hidden" name="style" id="txtStyle" value="34">
<input type="hidden" id="product" name="product" value="mail163">
</form>
(Byungwook Kang) 밝은영혼 | 2008/02/23 19:31 | PERMALINK | EDIT/DEL
It's dependent on the site.
If you can login with username and password, that's enough. Otherwise, provide other parameters that is needed to login.
JonGray | 2008/02/25 09:28 | PERMALINK | EDIT/DEL | REPLY
https://my.mcintoshcollege.edu/mycampus/index.aspx

could you write a code for me for this site?
Sarah | 2008/04/26 14:16 | PERMALINK | EDIT/DEL | REPLY
Every time I restart firefox (2.00.14) I lose the script I created from the preferences menu and everything is reset. Is this a bug or can I fix it?
(Byungwook Kang) 밝은영혼 | 2008/04/27 00:02 | PERMALINK | EDIT/DEL
It seems that your script has a bug.
Please review your script.
pedro | 2008/04/29 17:48 | PERMALINK | EDIT/DEL | REPLY
Can you do one script for:
URL: http://webmail.iol.pt
EMAIL: webmailnotifier@iol.pt
PASSWORD: qwerty
PLEASE!!
Thx
Sam | 2008/05/05 18:27 | PERMALINK | EDIT/DEL | REPLY
hi
Samhain | 2008/05/05 18:30 | PERMALINK | EDIT/DEL | REPLY
Hi Friend! I love your addon. Please can you make this script? I've tried but with no luck:

URL: http://liberomail.libero.it/
EMAIL: testwebmailnotifier@libero.it
PASSWORD: testing

I think this could be useful to all Libero's italian users!!!!

Thanks
| 2008/06/23 19:33 | PERMALINK | EDIT/DEL
비밀댓글 입니다
fireOut | 2008/05/30 23:11 | PERMALINK | EDIT/DEL | REPLY
Hi, Thanks for helping everyone!

I've tried to come up with my own script (Here what it is)
function initHandler(handler){
handler.name="quasiVirtuel";
handler.dataURL="http://email.secureserver.net/webmail.php?login=1";
handler.loginData=["https://email.secureserver.net/login.php",
"username","password","domain="+encodeURIComponent("quasivirtuel.com")];
handler.mailURL="http://email.secureserver.net/webmail.php?login=1";

handler.getData=function(aData){ //aData is a html source in dataURL
var fnd=aData.match(/<td class="count" title="(\d+) unread \/ \d+ total">/); //find mail count
if(fnd){
var num;
num = fnd[1];
return num;
}else{
return -1;//display 'not checked' message
}
};
}

But it didn't work (This is basically GoDaddy WebMail)

I created an account
user: test@quasivirtuel.com
pass: testtest

(you can access the email through webmail.quasivirtuel.com ... it redirect to secureserver)

Thanks again for your help
eric | 2008/06/05 00:18 | PERMALINK | EDIT/DEL | REPLY
Hello, Thank you so much for doing this.
I am trying to make a script for excite.com email.
No luck. I do not know if it is possible to do with excite.com mail.
They may have made it too difficult for anybody to do this with.
Thank you for your help.

I created an account
user: webmailnotifier@excite.com
pass: thankyousomuch
Me2 | 2008/06/18 22:37 | PERMALINK | EDIT/DEL | REPLY
Hi,
i am trying to use the gmx script. But it didn't work.

The code on the site is:

<fieldset id="fieldsetLoginUser">
<label for="username"><span>E-Mail:</span></label>
<input name="id" id="username" class="field" value="" type="text">
<label for="password"><span>Passwort:</span></label>
<input name="p" id="password" class="field" value="" type="password">
<input id="inpLoginSubmit" class="submit more" value="login" type="submit">
</fieldset>

I tried to change the gmx.js script as follows:

function initHandler(handler){
handler.name="GMX";
handler.dataURL="https://www.gmx.net/de/?status=login";
handler.loginData=["http ://service.gmx.net/de/cgi/login","id","p","inpLoginSubmit="+encodeURIComponent("login"),"AREA="+encodeURIComponent("1")];
handler.mailURL="https://www.gmx.net/de/?status=login";

Could you help`?

Thanks!
| 2008/06/21 16:40 | PERMALINK | EDIT/DEL | REPLY
비밀댓글 입니다
maxeuro | 2008/06/21 16:40 | PERMALINK | EDIT/DEL | REPLY
PLS can you make a user-skript for an german provider.
arcor.de
Posteingangsserver: POP3: pop3.arcor.de, IMAP: imap.arcor.de
Postausgangsserver: mail.arcor.de
Robert K | 2008/06/23 21:48 | PERMALINK | EDIT/DEL | REPLY
Hi, I was able to succesfully create a script for our service (zenbe.com), but it took awhile to figure out how the dataURL and loginData properties related to eachother. The documentation could use some clarification in this regard.

Specifically, you might clarify how and, more importantly, *when* the two URLs are requested. As I understand it, the loginData URL is used to generate the authentication request for the webmail service. This URL is only requested once for each browser session, and the response for that URL should set the appropriate session and authorization cookies. Webmail Notifier maintains a cookie cache for you, so for "typical" authentication systems, user scripts won't to do anything special to maintain the authentication credentials (cookies).

If the user script needs to perform any special handling of the loginData request - e.g. if it needs to handle redirects or whatever - then the script must provide a handler.process() method. Examples of how this is used can be found in the GMail and Yahoo scripts inside the Webmail Notifier XPI package (you'll need to download and "unzip" that package to find the scripts, which are contained in the "Components" directory). You might consider providing documentation about how this method works.

Also, it looks like there is a handler.cookieManager - this seems like another interesting API worth documenting for sites that do special cookie handling.

Finally, the dataURL is the URL that is requested to get the actual mail count. The contents of this URL are passed to the getData method, which the user script is expected to implement. Most of the default scripts that come with the Notifier fetch an HTML page and use regular expressions to parse the content of that page to find the count (which should be returned from this method). However this URL can be plain text, XML (e.g. RSS), or - as in the case of our zenbe.com user script - a JSON feed. For an example of how to parse a JSON feed, readers can look at http://blog.zenbe.com/wp-content/uploads/2008/06/zenbe_webmailnotifier.js

Anyhow, just thought I'd add my comments and insights after the little bit of struggle required to get a succesful user script up and running. Thanks for writing such a useful addon, by the way!
(Byungwook Kang) 밝은영혼 | 2008/06/23 22:57 | PERMALINK | EDIT/DEL
Great job!
Thank you very much.
Stefano | 2008/06/30 17:58 | PERMALINK | EDIT/DEL | REPLY
Hi.
I updated to Firefox 3 and now I have some problems with web mail notifier. The extention check my new mail (google and yahoo) but didn't make automatic login to access although the window automatic login is flagged. with Firefox2 all was right....what can be occurred? please help me. Thanks
g0dFather | 2008/07/03 03:55 | PERMALINK | EDIT/DEL | REPLY
I too am looking for scripts for GoDaddy and 1and1. I tried playing with the tutorial but got nowhere.
Can't this be designed like the MailMan toolbar where you simply enter the same server data as you would in Outlook or Thunderbird?
MailMan URL --> http://mailman.ourtoolbar.com/
Name
Password
Homepage
Secret