overwolf.extensions.current API
A set of functions providing more information and utilities for the current extension.
Methods Reference
- overwolf.extensions.current.getExtraObject()
- overwolf.extensions.current.getManifest()
- overwolf.extensions.current.getPhasedPercent()
- overwolf.extensions.current.generateUserEmailHashes():
- overwolf.extensions.current.setUserEmailHashes():
Types Reference
- overwolf.extensions.current.GetExtraObjectResult Object
- overwolf.extensions.current.GetManifestResult Object
- overwolf.extensions.current.GetPhasedPercentResult Object
getExtraObject(name, callback)
Version added: 0.80
Retrieves an extra object (providing external APIs) registered in the extension’s manifest.
Parameter | Type | Description |
---|---|---|
name | string | Name of the object as it appears in the manifest |
callback | (Result: GetExtraObjectResult) => void | Result of the request |
getManifest(callback)
Version added: 0.80
Returns the current extension’s manifest object.
Parameter | Type | Description |
---|---|---|
callback | (Result: GetManifestResult) => void | Result of the request |
Usage Example
Get app version from the manifest and print it to the console.
overwolf.extensions.current.getManifest(function(app){console.log(app.meta.version)})
getPhasedPercent(callback, version)
Version added: 0.236
Returns the current extension’s phasing percentage.
Parameter | Type | Description |
---|---|---|
callback | (Result: GetPhasedPercentResult) => void | Result of the request |
version | string? | The version to calculate the phasing percentage for (defaults to the current 'base' version) |
generateUserEmailHashes(email, callback)
Version added: 0.240
Generates and configures a user's email hashes persistently directly from the raw email.
Parameter | Type | Description |
---|---|---|
string | The user's email address | |
callback | (Result: Result) => void | Result of the operation |
setUserEmailHashes(hashes, callback)
Version added: 0.240
Configures a user's email hashes persistently from pre-configured email hashes.
Deleting email hashes
To delete the configured Email hashes, simply pass in an empty hashes
object.
Parameter | Type | Description |
---|---|---|
hashes | UserEmailHashes | The different hashes of the user's email address |
callback | (Result: Result) => void | Result of the operation |
GetExtraObjectResult Object
Parameter | Type | Description |
---|---|---|
success | boolean | inherited from the "Result" Object |
error | string | inherited from the "Result" Object |
object | object | the extra object if found |
Example data: Success
GetManifestResult Object
Parameter | Type | Description |
---|---|---|
success | boolean | inherited from the "Result" Object |
error | string | inherited from the "Result" Object |
object | object | the manifest info |
Example data: Success
A callback function which will be called with the status of the request
{
"manifest_version": 1,
"type": "WebApp",
"meta": {
"name": "App Name",
"version": "1.0.0.0",
"minimum-overwolf-version": "0.92.21.0",
"author": "Author",
"icon": "icon.png",
"icon_gray": "icon_gray.png",
"description": ""
},
"permissions": [
"Extensions",
"Hotkeys",
"GameInfo",
"GameControl",
"FileSystem"
],
"channel-id": 0,
"dependencies": null,
"data": {
"externally_connectable": {
"matches": [
"http://*.overwolf.com",
"http://overwolf.com"
]
},
"protocol_override_domains": null,
"force_browser": "NotSet",
"plugins": [
"npSimpleIOPlugin.dll"
],
"game_events": null,
"extra-objects": null,
"hotkeys": null,
"content_scripts": null,
"launch_events": [
{
"event": 1,
"event_data": {
"game_ids": null,
"wait_for_stable_framerate": null
},
"start_minimized": true
}
],
"user_agent": null,
"windows": {
"index": {
"file": "index.html",
"show_in_taskbar": true,
"transparent": true,
"resizable": false,
"show_minimize": true,
"clickthrough": false,
"disable_rightclick": false,
"forcecapture": false,
"show_only_on_stream": false,
"ignore_keyboard_events": false,
"in_game_only": false,
"desktop_only": false,
"disable_restore_animation": false,
"grab_keyboard_focus": false,
"size": {
"width": 910,
"height": 560
},
"start_position": {
"top": 10,
"left": 10
},
"topmost": false
}
},
"start_window": "index"
}
}
GetPhasedPercentResult Object
Parameter | Type | Description |
---|---|---|
success | boolean | inherited from the "Result" Object |
error | string | inherited from the "Result" Object |
phasedPercent | number | The phased percentage |
UserEmailHashes Object
Version added: 0.240
An object containing different hash patterns of a relevant user's hashed email.
Parameter | Type | Description |
---|---|---|
SHA1 | string | An SHA1 hash of the email address |
SHA256 | string | An SHA256 hash of the email address |
MD5 | string | An MD5 hash of the email address |