eric6.Helpviewer.GreaseMonkey.GreaseMonkeyScript

Module implementing the GreaseMonkey script.

Global Attributes

None

Classes

GreaseMonkeyScript Class implementing the GreaseMonkey script.

Functions

None


GreaseMonkeyScript

Class implementing the GreaseMonkey script.

Derived from

object

Class Attributes

DocumentEnd
DocumentStart

Class Methods

None

Methods

GreaseMonkeyScript Constructor
__parseScript Private method to parse the given script and populate the data structure.
description Public method to get the description of the script.
downloadUrl Public method to get the download URL of the script.
exclude Public method to get the list of excluded URLs.
fileName Public method to get the path of the Javascript file.
fullName Public method to get the full name of the script.
include Public method to get the list of included URLs.
isEnabled Public method to check, if the script is enabled.
isValid Public method to check the validity of the script.
match Public method to check, if the script matches the given URL.
name Public method to get the name of the script.
nameSpace Public method to get the name space of the script.
script Public method to get the Javascript source.
setEnabled Public method to enable a script.
startAt Public method to get the start point of the script.
version Public method to get the version of the script.

Static Methods

None

GreaseMonkeyScript (Constructor)

GreaseMonkeyScript(manager, path)

Constructor

manager
reference to the manager object (GreaseMonkeyManager)
path
path of the Javascript file (string)

GreaseMonkeyScript.__parseScript

__parseScript(path)

Private method to parse the given script and populate the data structure.

path
path of the Javascript file (string)

GreaseMonkeyScript.description

description()

Public method to get the description of the script.

Returns:
description of the script (string)

GreaseMonkeyScript.downloadUrl

downloadUrl()

Public method to get the download URL of the script.

Returns:
download URL of the script (QUrl)

GreaseMonkeyScript.exclude

exclude()

Public method to get the list of excluded URLs.

Returns:
list of excluded URLs (list of strings)

GreaseMonkeyScript.fileName

fileName()

Public method to get the path of the Javascript file.

Returns:
path path of the Javascript file (string)

GreaseMonkeyScript.fullName

fullName()

Public method to get the full name of the script.

Returns:
full name of the script (string)

GreaseMonkeyScript.include

include()

Public method to get the list of included URLs.

Returns:
list of included URLs (list of strings)

GreaseMonkeyScript.isEnabled

isEnabled()

Public method to check, if the script is enabled.

Returns:
flag indicating an enabled state (boolean)

GreaseMonkeyScript.isValid

isValid()

Public method to check the validity of the script.

Returns:
flag indicating a valid script (boolean)

GreaseMonkeyScript.match

match(urlString)

Public method to check, if the script matches the given URL.

urlString
URL (string)
Returns:
flag indicating a match (boolean)

GreaseMonkeyScript.name

name()

Public method to get the name of the script.

Returns:
name of the script (string)

GreaseMonkeyScript.nameSpace

nameSpace()

Public method to get the name space of the script.

Returns:
name space of the script (string)

GreaseMonkeyScript.script

script()

Public method to get the Javascript source.

Returns:
Javascript source (string)

GreaseMonkeyScript.setEnabled

setEnabled(enable)

Public method to enable a script.

enable
flag indicating the new enabled state (boolean)

GreaseMonkeyScript.startAt

startAt()

Public method to get the start point of the script.

Returns:
start point of the script (DocumentStart or DocumentEnd)

GreaseMonkeyScript.version

version()

Public method to get the version of the script.

Returns:
version of the script (string)
Up