From bea1b3232a6e3ea4153eebaa359274d525a22c7a Mon Sep 17 00:00:00 2001 From: drry Date: Mon, 12 Jan 2009 22:40:32 +0000 Subject: * fixed typos. * et cetera. git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@28368 d0d07461-0603-4401-acd4-de1884942a52 --- notifier/observer_nsIAlertService.js | 40 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'notifier') 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 = ; //}}} -(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( - '
'+message.message+'
'), + '
' + message.message + "
"), 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++; - }, + } }); })(); -- cgit v1.2.3