- Since:
- 0.0.14
Example
var opts = {
callback: updateCallback,
onerror: updateErrorCallback,
getType: 'data',
XMLHTTPRequest: true,
args: {
scriptLoadTime: 1234
}
};
jMod.Update.getUpdateData(opts);
Methods
-
staticjMod.Update.getURL(data)
F:/Projects/jMod/main/bin/jMod.full.js, line 9068 -
Generate the update URL
Name Type Description dataUpdateData Information used to generate the URL -
staticjMod.Update.sendRequest(data)
F:/Projects/jMod/main/bin/jMod.full.js, line 9214 -
Send information to the server with the given data.
If a callback is provided, and data.getType != 'none', it will be called with the server's response. SeeUpdateCallbackName Type Description dataUpdateData Information and arguments used to send request to the server
Type Definitions
-
jMod.Update.UpdateCallback(response)
F:/Projects/jMod/main/bin/jMod.full.js, line 9022 -
Name Type Description responseobject | string The string or JSON object returned from the server -
jMod.Update.UpdateDataObject
-
Data used to send requests to the server.
Overrides settings stored in jMod.Config.- See:
Properties:
Name Type Argument Default Description script_namestring <optional>
Name of script on myUserJS (Not needed if meta block contains a valid updateURL or jModupdateURL) usernamestring <optional>
Script owner's username on myUserJS callbackUpdateCallback <optional>
Function to be called with the server's response onerrorUpdateCallback <optional>
Function to be called when an error occurs getTypestring <optional>
"data" Type of information you want returned from the server, and which partition to store the download/arguments under. argsobject <optional>
Arguments to be sent to myUserJS's statistical engine DOMTimingboolean <optional>
false Generate and send page/script timing information to the server noDownloadboolean <optional>
false Do not record download when processing response (only used when reporting errors) XMLHttpRequestboolean <optional>
false (Experimental) Use XMLHttpRequest when sending request (only available to userscripts that load jMod via require) jQueryboolean <optional>
false (broken) Example
var opts = { callback: myCBFunction, getType: 'data', args: { scriptLoadTime: 1234 } } console.log(jMod.Update.getURL(opts));