GM.getResourceText: Difference between revisions

From GreaseSpot Wiki
Jump to navigationJump to search
simplify
Update for 4.0
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:GM_getResourceText}}
As of Greasemonkey 4.0, this method does not exist.


<!-- Original text, in case 4.x restores this method?
== Description ==
== Description ==


Line 11: Line 12:
{{Function|GM_getResourceText|resourceName}}
{{Function|GM_getResourceText|resourceName}}


== Arguments ==
=== Arguments ===


; resourceName
; resourceName
: <code>String</code> The name provided when the [[Metadata Block#.40resource|@resource]] was defined, follow that link for valid naming restrictions.
: <code>String</code> The name provided when the [[Metadata Block#.40resource|@resource]] was defined, follow that link for valid naming restrictions.


== Returns ==
=== Returns ===


<code>String</code>
<code>String</code>


== Raises ==
=== Raises ===


Throws an <code>Error</code> when the named resource does not exist.
Throws an <code>Error</code> when the named resource does not exist.
Line 33: Line 34:
var prototypeSource = GM_getResourceText("prototype");
var prototypeSource = GM_getResourceText("prototype");
</pre>
</pre>
== See Also ==
* [[GM_getResourceURL]]


[[Category:API_Reference|G]]
[[Category:API_Reference|G]]
-->

Latest revision as of 14:33, 3 November 2017

As of Greasemonkey 4.0, this method does not exist.