GM log: Difference between revisions

From GreaseSpot Wiki
Jump to navigationJump to search
Marti (talk | contribs)
mNo edit summary
Marti (talk | contribs)
m →‎Syntax: Monkey colored tables
Line 18: Line 18:
:Compatibility: [[Version_history#0.3_beta|Greasemonkey 0.3b+]]
:Compatibility: [[Version_history#0.3_beta|Greasemonkey 0.3b+]]


:{| border="1" cellpadding="5"
:{| cellpadding="5" style="border-style:solid; background:#FFFFE0;"
|+ Parameters
|+ Parameters
!|'''Properties'''
!style="background:#CC9900;"|'''Properties'''
|-
|-
| <code>[[#message |message]]</code>
| <code><span style="background:#FFFFE0;">[[#message |message]]</span></code>
|}
|}
:* All properties are optional except [[#message|message]].
:* All properties are optional except [[#message|message]].

Revision as of 22:23, 11 December 2007

Template:Underscore


Description

This API method allows script authors simple access to logging informational messages in the Error Console.

If you aren't seeing your messages, make sure you navigate to about:config, and change the values of javascript.options.showInConsole and javascript.options.strict to true. This can be helpful for debugging.

Examples | GM_log and Firebug | Notes

Syntax

GM_log( message )

Value: Function
Returns: Nothing
Compatibility: Greasemonkey 0.3b+
Parameters
Properties
message
  • All properties are optional except message.

top

Properties


message

Value: String
Usage: message = "ARGHHH!";
  • Message to send to the JavaScript error console.

top | back

Examples

 GM_log("Hello, World!");
GM_log("Warning, " + someInputField.value + "!");

top

GM_log and Firebug

Since Firebug 1.0, extensions.firebug.showChromeMessages must be set to true for GM_log messages to show up in the Firebug console.

top

Notes

top