Scriptish offers a few API methods which provide extra functionality to user scripts.
This function provides access to a user script's metadata block.
console, ensuring the availability of the
trace methods regardless of the console implementation.
Always equal to
true. Check if this exists to see if your user script engine supports @updateURL.
Provides access to the raw
window, which is usually used to access functions defined on a page.
This function will safely parse a string of HTML and return a document object. It cleans the provided HTML by removing tags like
This function is a cross-origin version of XMLHttpRequest. The beauty of this function is that a user script can make requests that do not use the same-origin policy, creating opportunities for powerful mashups.
This function will remove a user script preference.
This function will retrieve a user script preference.
This function will return a list of a user script's preferences.
This function will set a user script preference.
Note: Resources are included with a Metadata Block's @resource key.
This function will return the plain text content of a @resource.
This function will return the contents of the @resource as a data: URL.
This function sends a Growl-style notification/message to the user.
This function opens a URL in a new tab, or optionally an existing tab.
This function will add a menu item to the Scriptish menu under "User Script Commands".
This function will remove a GM_registerMenuCommand-created menu item from the Scriptish menu.
This function will enable a GM_registerMenuCommand-created menu item in the Scriptish menu.
This function will disable a GM_registerMenuCommand-created menu item in the Scriptish menu.
This function will save data to the clipboard.
This function takes a string of CSS and adds it to the page.
This function will allow you to easily hash a string.