isOpera (XSPUserAgent - JavaScript)

Checks if the browser is Opera.

Syntax

isOpera() : boolean

isOpera(min:double, max:double) : boolean

Parameters Description
min The minimum acceptable version inclusive.
max The maximum acceptable version inclusive.
Return value Description
boolean true if the browser is Opera and (if specified) within the acceptable range; false otherwise.

Examples

This computed field displays a message if the browser is not Opera, or the version is not acceptable:
if(!context.getUserAgent().isOpera()) {
	return "You must use Opera - The Mgt"
} else {
	if(!context.getUserAgent().isOpera(9.0, 9.5)) {
		return "You must upgrade Opera - The Mgt"
	}
}