Created
January 8, 2011 16:52
-
-
Save ongaeshi/770984 to your computer and use it in GitHub Desktop.
firefox4 debug display. (Log and Growl)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // @file | |
| // @brief firefox4 debug display. (Log and Growl) | |
| // @author ongaeshi | |
| // @date 2011/01/09 | |
| // | |
| // --------------------------------- | |
| // @sample | |
| // | |
| // var notify = require("notify"); | |
| // | |
| // function display_url(url) { | |
| // notify.n("URL : " + url); | |
| // notify.n("Debug", "URL : " + url); | |
| // notify.nl("URL : " + url); | |
| // notify.nl("Debug With Log", "URL : " + url); | |
| // } | |
| // --------------------------------- | |
| var notifications = require("notifications"); | |
| exports.n = function (title, text) { | |
| notifications.notify({ | |
| title: title, | |
| text: text, | |
| }); | |
| } | |
| exports.nl = function (title, text) { | |
| exports.n(title, text); | |
| if (text == null) | |
| console.log(title); | |
| else | |
| console.log("[" + title + "] " + text); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment