GM_getResourceText

erikvold edited this page Dec 24, 2011 · 3 revisions

Description

GM_getResourceText retrieves the text value of the resource specified in a Metadata Block's @resource key.

Arguments

String name

The name of the @resource to retrieve.

Returns

String

Example

// ==UserScript==
// @name         GM_getResourceText test
// @namespace    myCoolNamespace
// @include      *
// @resource     myDoc http://www.mywebsite.com/myDoc.txt
// ==/UserScript==

GM_log("text contents of myDoc: " + GM_getResourceText("myDoc"));

Related Pages

Manual: API