Relay Browser Functions: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
mNo edit summary
imported>Bale
No edit summary
Line 3: Line 3:
{{flink|void|write|string|desc=Writes text to the relay browser.}}
{{flink|void|write|string|desc=Writes text to the relay browser.}}
{{flink|void|writeln|string|desc=Same as above, ending with a line break (in the page source).}}
{{flink|void|writeln|string|desc=Same as above, ending with a line break (in the page source).}}
{{flink|string|entity_encode|string|desc=Used for converting text that might contain special characters such as ampersands and angle brackets so that it can safely be displayed in HTML.}}
{{flink|string|entity_decode|string|desc=Used for retrieving text from form fields that contains special characters such as ampersands and angle brackets.}}


{{flink|string|form_field|string|desc=Returns the "value" attribute of a previously-submitted input tag.}}
{{flink|string|form_field|string|desc=Returns the "value" attribute of a previously-submitted input tag.}}
{{flink|string [string]|form_fields|desc=As above, but returned as a map of all values keyed by input names.}}
{{flink|string [string]|form_fields|desc=As above, but returned as a map of all values keyed by input names.}}

Revision as of 01:19, 17 May 2010

For general information on how to use these functions, please see Relay Override Scripting.

void write( string )

Writes text to the relay browser.

void writeln( string )

Same as above, ending with a line break (in the page source).


string entity_encode( string )

Used for converting text that might contain special characters such as ampersands and angle brackets so that it can safely be displayed in HTML.

string entity_decode( string )

Used for retrieving text from form fields that contains special characters such as ampersands and angle brackets.


string form_field( string )

Returns the "value" attribute of a previously-submitted input tag.

string [string] form_fields()

As above, but returned as a map of all values keyed by input names.