How to write X-notifier scripts.


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="" method="post">
  <input name="user">
  <input name="passwd" type="password">
  <input name="key" value="abc=12" type="hidden">
  <input value="Login" type="submit">

the corresponding script is as below. Save below codes as 'mymail.js'(or other name that ends with '.js') And install it in X-notifier preferences.

var name="MyMail";
var ver="2010-06-08";
function init(){
function getCount(aData){ //aData is a html source in dataURL
  var fnd=aData.match(......); //find mail count
    var num;
    //get mail count here
    return num;
    return -1;//display 'not checked' message
  • name : the provider name that wiil be shown in X-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
  • viewURL : the url that will be opened when you click the icon or menuitem

This is the simplest form of script. If your script does not work, please refer to other scripts from here.