GM_getResourceText
From GreaseSpot
Contents |
[edit] Description
Given a defined @resource, this method returns it as a string.
Compatibility: Greasemonkey 0.8.0+
[edit] Syntax
function GM_getResourceText( resourceName )
[edit] Arguments
- resourceName
-
StringThe name provided when the @resource was defined, follow that link for valid naming restrictions.
[edit] Returns
String
[edit] Raises
Throws an Error when the named resource does not exist.
[edit] Examples
// ==UserScript==
// @resource prototype http://www.example.com/prototype.js
// ==/UserScript==
var prototypeSource = GM_getResourceText("prototype");

