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,
Save below codes as 'mymail.js'(or other name that ends with '.js')
And install it in WebMail Notifier preferences.
When the login form of your webmail provider is like this,
<form action="https://logins.foo.com/login" method="post">the corresponding script is as below.
<input name="user">
<input name="passwd" type="password">
<input name="key" value="abc=12" type="hidden">
<input value="Login" type="submit">
</form>
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
Trackback Address :: http://tobwithu.tistory.com/trackback/14



이올린에 북마크하기
이올린에 추천하기