diff options
| author | drry | 2009-01-12 22:40:32 +0000 | 
|---|---|---|
| committer | drry | 2009-01-12 22:40:32 +0000 | 
| commit | bea1b3232a6e3ea4153eebaa359274d525a22c7a (patch) | |
| tree | 34551422273af0fcd925c030b1f38e06729c6bb8 /notifier | |
| parent | f1954c2164ab28742898286cdbf46d49e420fb49 (diff) | |
| download | vimperator-plugins-bea1b3232a6e3ea4153eebaa359274d525a22c7a.tar.bz2 | |
 * fixed typos.
 * et cetera.
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@28368 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'notifier')
| -rw-r--r-- | notifier/observer_nsIAlertService.js | 40 | 
1 files changed, 20 insertions, 20 deletions
diff --git a/notifier/observer_nsIAlertService.js b/notifier/observer_nsIAlertService.js index 0c13293..7d0f2f2 100644 --- a/notifier/observer_nsIAlertService.js +++ b/notifier/observer_nsIAlertService.js @@ -11,7 +11,7 @@ var PLUGIN_INFO =    <detail><![CDATA[  notifier.js 用の通知プラグイン  OSのプラットフォーム依存の通知なのでプラットフォームによってはうまく動作しない可能性があります。 -MacOSのGrowlが設定されている場合があやしいです。 +Mac OSのGrowlが設定されている場合があやしいです。  == 設定値 ==  about:config や :set! コマンドでアラートのポップアップ時間等を変更できます。 @@ -19,13 +19,13 @@ about:config や :set! コマンドでアラートのポップアップ時間等  alerts.slideIncrement:    ポップアップ時の上昇/下降量(px) (default: 1)  alerts.slideIncrementTime: -  ポップアップ時の上昇/下降インターバル(mili sec) (default: 10) +  ポップアップ時の上昇/下降インターバル(millisec.) (default: 10)  alerts.totalOpenTime: -  アラートの表示時間(mili sec) (default: 4000) -   +  アラートの表示時間(millisec.) (default: 4000) +  == 動作確認済プラットフォーム == -- Debian/GNU Linux (Gnome) -- WindowsXP +- Debian/GNU Linux (GNOME) +- Windows XP  == 既知の問題点 ==  - アラートが連続すると重なってしまう @@ -38,22 +38,22 @@ alerts.totalOpenTime:    ]]></detail>  </VimperatorPlugin>;  //}}} -(function() { +(function(){  var notifier = liberator.plugins.notifier; -if (!notifier) { +if (!notifier){      return;  }  var libly = notifier.libly;  var $U = libly.$U; -var logger = $U.getLogger('observer_alert'); +var logger = $U.getLogger("observer_alert");  const alertService = Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService);  const ICON_URL = "chrome://vimperator/skin/icon.png";  var observer = {      observe: function(aSubject, aTopic, aData){ -        if(aTopic == "alertclickcallback" && aData){ +        if (aTopic == "alertclickcallback" && aData){              liberator.open(aData, liberator.NEW_TAB);          }      } @@ -66,7 +66,7 @@ function getAlertWindows(){  function alertNotify(count, message){      alertService.showAlertNotification(          ICON_URL, -        count + ': ' + message.title, +        count + ": " + message.title,          "",          message.link ? true : false,          message.link, @@ -82,35 +82,35 @@ function alertNotify(count, message){                      .QueryInterface(Ci.nsIInterfaceRequestor)                      .getInterface(Ci.nsIDOMWindow);              if (win.arguments[1] == count + ": " + message.title){ -                var box = win.document.getElementById('alertTextBox'); -                var t = box.firstChild; -                if (box.lastChild.hasAttribute('clickable')){ +                let box = win.document.getElementById("alertTextBox"); +                let t = box.firstChild; +                if (box.lastChild.hasAttribute("clickable")){                      t.style.cursor = "pointer";                      t.style.color = "#1455D6";                      t.style.textDecoration = "underline";                  } -                t.setAttribute('onclick',"onAlertClick();"); +                t.setAttribute("onclick", "onAlertClick();");                  box.removeChild(box.lastChild);                  box.appendChild($U.xmlToDom(new XMLList( -                    '<div xmlns="http://www.w3.org/1999/xhtml" class="alertText plain">'+message.message+'</div>'), +                    '<div xmlns="http://www.w3.org/1999/xhtml" class="alertText plain">' + message.message + "</div>"),                      document                  ));                  win.onAlertLoad();                  fixed = true;              }          } -        if (!fixed) setTimeout(arguments.callee,10); +        if (!fixed) setTimeout(arguments.callee, 10);      })();  }  notifier.observer.register(notifier.Observer, { -    initialize: function () { +    initialize: function (){          this.count = 1;      }, -    update: function(message) { +    update: function(message){          alertNotify(this.count, message);          this.count++; -    }, +    }  });  })();  | 
