overwolf.extensions

Use the overwolf.extensios API to control and retrieve details of an Overwolf app (extension) or listen and respond to events in the app’s lifecycle.

 

You can use the following helpful URL’s to retrieve an extension file content or icons:

URL What it does
overwolf://extension-resources/<extension uid>/icon
  • A URL that will serve as a source for IMG tag or or a DIV background. This will present the icon of the stated extension.
overwolf://extension-resources/<extension uid>/icon_gray
  • A URL that will serve as a source for IMG tag or or a DIV background. This will present the gray icon of the stated extension.
overwolf-extension://<extension uid>/<path to extension file>
  • Returns the content of a file in an extension

 

Methods

launch(uid , parameter)

Version added: 0.78

Launch an extension by its unique id.

  • Parameter: uid <string>

    The extension unique id.

  • Parameter: parameter <object> — Optional

    A parameter to pass to the extension. The extension may or may not use this parameter.

getService(id, callback)

Version added: 0.78

Retrieve a service object (which will usually provide external APIs) by an id.

  • Parameter: id <string>

    The service id.

  • Parameter: callback <function>

    A function called with the service, if found, and a status indicating success or failure.

setInfo(info)

Version added: 0.91.0

Sets a string for other extensions to read.

  • Parameter: info <Object>

    A string to post.

getInfo(id, callback)

Version added: 0.91.0

Gets an extension’s info string.

  • Parameter: id <string>

    The id of the extension to get info for.

  • Parameter: callback <function>

    Called with the info.

registerInfo(id, eventsCallback, callback)

Version added: 0.91.0

Requests info updates for extension. Will also be called when the extension launches/closes.

  • Parameter: id <string>

    The id of the extension to get updates for.
  • Parameter: eventsCallback <function>

    A callback to receive info updates.
  • Parameter: callback <function>

    The status of the request.

unregisterInfo(id, callback)

Version added: 0.91.0

Stop requesting info for extension.

  • Parameter: id <string>

    The id of the extension to stop getting updates for.

  • Parameter: callback <function>

    The status of the request.

getRunningState(id, callback)

Version added: 0.91.0

Gets the running state of an extension.

  • Parameter: id <string>

    The id of the extension to get updates for.

  • Parameter: callback <function>

    The result of the request.
Callback argument:
{
    "status": "success",
    "isRunning": true
}

getManifest(id, callback)

Version added: 0.91.0

Returns the requested extension’s manifest object.

  • Parameter: id <string>

    The id of the extension to get the manifest for.

  • Parameter: callback <function>

    A function called with the manifest data.

Callback argument:
{
    "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"
    }
}

Events How to use events

onAppLaunchTriggered

Version added: 0.92.300

Fires when the current app is launched while already running. This is useful in the case where the app
has custom logic for clicking its dock button while it is already running. The event contain an ‘origin’ string
which what triggered the app launch (dock, storeapi, odk, etc…)