Documentation/Source/eric6.WebBrowser.GreaseMonkey.GreaseMonkeyScript.html

changeset 4918
71caf42a13d8
child 5715
cbcca230679f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Documentation/Source/eric6.WebBrowser.GreaseMonkey.GreaseMonkeyScript.html	Sun Apr 03 17:10:43 2016 +0200
@@ -0,0 +1,366 @@
+<!DOCTYPE html>
+<html><head>
+<title>eric6.WebBrowser.GreaseMonkey.GreaseMonkeyScript</title>
+<meta charset="UTF-8">
+<style>
+body {
+    background: #EDECE6;
+    margin: 0em 1em 10em 1em;
+    color: black;
+}
+
+h1 { color: white; background: #85774A; }
+h2 { color: white; background: #85774A; }
+h3 { color: white; background: #9D936E; }
+h4 { color: white; background: #9D936E; }
+    
+a { color: #BA6D36; }
+
+</style>
+</head>
+<body><a NAME="top" ID="top"></a>
+<h1>eric6.WebBrowser.GreaseMonkey.GreaseMonkeyScript</h1>
+<p>
+Module implementing the GreaseMonkey script.
+</p>
+<h3>Global Attributes</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Classes</h3>
+<table>
+<tr>
+<td><a href="#GreaseMonkeyScript">GreaseMonkeyScript</a></td>
+<td>Class implementing the GreaseMonkey script.</td>
+</tr>
+</table>
+<h3>Functions</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<hr /><hr />
+<a NAME="GreaseMonkeyScript" ID="GreaseMonkeyScript"></a>
+<h2>GreaseMonkeyScript</h2>
+<p>
+    Class implementing the GreaseMonkey script.
+</p>
+<h3>Derived from</h3>
+QObject
+<h3>Class Attributes</h3>
+<table>
+<tr><td>DocumentEnd</td></tr><tr><td>DocumentIdle</td></tr><tr><td>DocumentStart</td></tr>
+</table>
+<h3>Class Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Methods</h3>
+<table>
+<tr>
+<td><a href="#GreaseMonkeyScript.__init__">GreaseMonkeyScript</a></td>
+<td>Constructor</td>
+</tr><tr>
+<td><a href="#GreaseMonkeyScript.__parseScript">__parseScript</a></td>
+<td>Private method to parse the given script and populate the data structure.</td>
+</tr><tr>
+<td><a href="#GreaseMonkeyScript.__toJavaScriptList">__toJavaScriptList</a></td>
+<td>Private method to convert a list of str to a string containing a valid JavaScript list definition.</td>
+</tr><tr>
+<td><a href="#GreaseMonkeyScript.__watchedFileChanged">__watchedFileChanged</a></td>
+<td>Private slot handling changes of the script file.</td>
+</tr><tr>
+<td><a href="#GreaseMonkeyScript.description">description</a></td>
+<td>Public method to get the description of the script.</td>
+</tr><tr>
+<td><a href="#GreaseMonkeyScript.downloadUrl">downloadUrl</a></td>
+<td>Public method to get the download URL of the script.</td>
+</tr><tr>
+<td><a href="#GreaseMonkeyScript.exclude">exclude</a></td>
+<td>Public method to get the list of excluded URLs.</td>
+</tr><tr>
+<td><a href="#GreaseMonkeyScript.fileName">fileName</a></td>
+<td>Public method to get the path of the Javascript file.</td>
+</tr><tr>
+<td><a href="#GreaseMonkeyScript.fullName">fullName</a></td>
+<td>Public method to get the full name of the script.</td>
+</tr><tr>
+<td><a href="#GreaseMonkeyScript.include">include</a></td>
+<td>Public method to get the list of included URLs.</td>
+</tr><tr>
+<td><a href="#GreaseMonkeyScript.isEnabled">isEnabled</a></td>
+<td>Public method to check, if the script is enabled.</td>
+</tr><tr>
+<td><a href="#GreaseMonkeyScript.isValid">isValid</a></td>
+<td>Public method to check the validity of the script.</td>
+</tr><tr>
+<td><a href="#GreaseMonkeyScript.name">name</a></td>
+<td>Public method to get the name of the script.</td>
+</tr><tr>
+<td><a href="#GreaseMonkeyScript.nameSpace">nameSpace</a></td>
+<td>Public method to get the name space of the script.</td>
+</tr><tr>
+<td><a href="#GreaseMonkeyScript.noFrames">noFrames</a></td>
+<td>Public method to get the noFrames flag.</td>
+</tr><tr>
+<td><a href="#GreaseMonkeyScript.script">script</a></td>
+<td>Public method to get the Javascript source.</td>
+</tr><tr>
+<td><a href="#GreaseMonkeyScript.setEnabled">setEnabled</a></td>
+<td>Public method to enable a script.</td>
+</tr><tr>
+<td><a href="#GreaseMonkeyScript.startAt">startAt</a></td>
+<td>Public method to get the start point of the script.</td>
+</tr><tr>
+<td><a href="#GreaseMonkeyScript.updateUrl">updateUrl</a></td>
+<td>Public method to get the update URL of the script.</td>
+</tr><tr>
+<td><a href="#GreaseMonkeyScript.version">version</a></td>
+<td>Public method to get the version of the script.</td>
+</tr><tr>
+<td><a href="#GreaseMonkeyScript.webScript">webScript</a></td>
+<td>Public method to create a script object.</td>
+</tr>
+</table>
+<h3>Static Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<a NAME="GreaseMonkeyScript.__init__" ID="GreaseMonkeyScript.__init__"></a>
+<h4>GreaseMonkeyScript (Constructor)</h4>
+<b>GreaseMonkeyScript</b>(<i>manager, path</i>)
+<p>
+        Constructor
+</p><dl>
+<dt><i>manager</i></dt>
+<dd>
+reference to the manager object (GreaseMonkeyManager)
+</dd><dt><i>path</i></dt>
+<dd>
+path of the Javascript file (string)
+</dd>
+</dl><a NAME="GreaseMonkeyScript.__parseScript" ID="GreaseMonkeyScript.__parseScript"></a>
+<h4>GreaseMonkeyScript.__parseScript</h4>
+<b>__parseScript</b>(<i></i>)
+<p>
+        Private method to parse the given script and populate the data
+        structure.
+</p><a NAME="GreaseMonkeyScript.__toJavaScriptList" ID="GreaseMonkeyScript.__toJavaScriptList"></a>
+<h4>GreaseMonkeyScript.__toJavaScriptList</h4>
+<b>__toJavaScriptList</b>(<i>patterns</i>)
+<p>
+        Private method to convert a list of str to a string containing a valid
+        JavaScript list definition.
+</p><dl>
+<dt><i>patterns</i> (list of str)</dt>
+<dd>
+list of match patterns
+</dd>
+</dl><dl>
+<dt>Returns:</dt>
+<dd>
+JavaScript script containing the list
+</dd>
+</dl><dl>
+<dt>Return Type:</dt>
+<dd>
+str
+</dd>
+</dl><a NAME="GreaseMonkeyScript.__watchedFileChanged" ID="GreaseMonkeyScript.__watchedFileChanged"></a>
+<h4>GreaseMonkeyScript.__watchedFileChanged</h4>
+<b>__watchedFileChanged</b>(<i>fileName</i>)
+<p>
+        Private slot handling changes of the script file.
+</p><dl>
+<dt><i>fileName</i> (str)</dt>
+<dd>
+path of the script file
+</dd>
+</dl><a NAME="GreaseMonkeyScript.description" ID="GreaseMonkeyScript.description"></a>
+<h4>GreaseMonkeyScript.description</h4>
+<b>description</b>(<i></i>)
+<p>
+        Public method to get the description of the script.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+description of the script (string)
+</dd>
+</dl><a NAME="GreaseMonkeyScript.downloadUrl" ID="GreaseMonkeyScript.downloadUrl"></a>
+<h4>GreaseMonkeyScript.downloadUrl</h4>
+<b>downloadUrl</b>(<i></i>)
+<p>
+        Public method to get the download URL of the script.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+download URL of the script (QUrl)
+</dd>
+</dl><a NAME="GreaseMonkeyScript.exclude" ID="GreaseMonkeyScript.exclude"></a>
+<h4>GreaseMonkeyScript.exclude</h4>
+<b>exclude</b>(<i></i>)
+<p>
+        Public method to get the list of excluded URLs.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+list of excluded URLs (list of strings)
+</dd>
+</dl><a NAME="GreaseMonkeyScript.fileName" ID="GreaseMonkeyScript.fileName"></a>
+<h4>GreaseMonkeyScript.fileName</h4>
+<b>fileName</b>(<i></i>)
+<p>
+        Public method to get the path of the Javascript file.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+path path of the Javascript file (string)
+</dd>
+</dl><a NAME="GreaseMonkeyScript.fullName" ID="GreaseMonkeyScript.fullName"></a>
+<h4>GreaseMonkeyScript.fullName</h4>
+<b>fullName</b>(<i></i>)
+<p>
+        Public method to get the full name of the script.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+full name of the script (string)
+</dd>
+</dl><a NAME="GreaseMonkeyScript.include" ID="GreaseMonkeyScript.include"></a>
+<h4>GreaseMonkeyScript.include</h4>
+<b>include</b>(<i></i>)
+<p>
+        Public method to get the list of included URLs.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+list of included URLs (list of strings)
+</dd>
+</dl><a NAME="GreaseMonkeyScript.isEnabled" ID="GreaseMonkeyScript.isEnabled"></a>
+<h4>GreaseMonkeyScript.isEnabled</h4>
+<b>isEnabled</b>(<i></i>)
+<p>
+        Public method to check, if the script is enabled.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+flag indicating an enabled state (boolean)
+</dd>
+</dl><a NAME="GreaseMonkeyScript.isValid" ID="GreaseMonkeyScript.isValid"></a>
+<h4>GreaseMonkeyScript.isValid</h4>
+<b>isValid</b>(<i></i>)
+<p>
+        Public method to check the validity of the script.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+flag indicating a valid script (boolean)
+</dd>
+</dl><a NAME="GreaseMonkeyScript.name" ID="GreaseMonkeyScript.name"></a>
+<h4>GreaseMonkeyScript.name</h4>
+<b>name</b>(<i></i>)
+<p>
+        Public method to get the name of the script.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+name of the script (string)
+</dd>
+</dl><a NAME="GreaseMonkeyScript.nameSpace" ID="GreaseMonkeyScript.nameSpace"></a>
+<h4>GreaseMonkeyScript.nameSpace</h4>
+<b>nameSpace</b>(<i></i>)
+<p>
+        Public method to get the name space of the script.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+name space of the script (string)
+</dd>
+</dl><a NAME="GreaseMonkeyScript.noFrames" ID="GreaseMonkeyScript.noFrames"></a>
+<h4>GreaseMonkeyScript.noFrames</h4>
+<b>noFrames</b>(<i></i>)
+<p>
+        Public method to get the noFrames flag.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+flag indicating to not run on sub frames
+</dd>
+</dl><dl>
+<dt>Return Type:</dt>
+<dd>
+bool
+</dd>
+</dl><a NAME="GreaseMonkeyScript.script" ID="GreaseMonkeyScript.script"></a>
+<h4>GreaseMonkeyScript.script</h4>
+<b>script</b>(<i></i>)
+<p>
+        Public method to get the Javascript source.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+Javascript source (string)
+</dd>
+</dl><a NAME="GreaseMonkeyScript.setEnabled" ID="GreaseMonkeyScript.setEnabled"></a>
+<h4>GreaseMonkeyScript.setEnabled</h4>
+<b>setEnabled</b>(<i>enable</i>)
+<p>
+        Public method to enable a script.
+</p><dl>
+<dt><i>enable</i></dt>
+<dd>
+flag indicating the new enabled state (boolean)
+</dd>
+</dl><a NAME="GreaseMonkeyScript.startAt" ID="GreaseMonkeyScript.startAt"></a>
+<h4>GreaseMonkeyScript.startAt</h4>
+<b>startAt</b>(<i></i>)
+<p>
+        Public method to get the start point of the script.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+start point of the script (DocumentStart or DocumentEnd)
+</dd>
+</dl><a NAME="GreaseMonkeyScript.updateUrl" ID="GreaseMonkeyScript.updateUrl"></a>
+<h4>GreaseMonkeyScript.updateUrl</h4>
+<b>updateUrl</b>(<i></i>)
+<p>
+        Public method to get the update URL of the script.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+update URL of the script (QUrl)
+</dd>
+</dl><a NAME="GreaseMonkeyScript.version" ID="GreaseMonkeyScript.version"></a>
+<h4>GreaseMonkeyScript.version</h4>
+<b>version</b>(<i></i>)
+<p>
+        Public method to get the version of the script.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+version of the script (string)
+</dd>
+</dl><a NAME="GreaseMonkeyScript.webScript" ID="GreaseMonkeyScript.webScript"></a>
+<h4>GreaseMonkeyScript.webScript</h4>
+<b>webScript</b>(<i></i>)
+<p>
+        Public method to create a script object.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+prepared script object
+</dd>
+</dl><dl>
+<dt>Return Type:</dt>
+<dd>
+QWebEngineScript
+</dd>
+</dl><dl>
+<dt>Raises <b>ValueError</b>:</dt>
+<dd>
+raised to indicate an unsupported start point
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+</body></html>
\ No newline at end of file

eric ide

mercurial