Type Definitions
-
config
-
Environment parameters for an instance of Manager class. Specifying only the "storage" parameter is enough to run in lightweight form, but for full functionality you also need to specify callbacks.
Properties:
Name Type Default Description channel
storage.channel Update channel for IITC and plugins.
storage
storage.storage Platform-dependent data storage class. For example, "browser.storage.local" in webextensions.
is_daemon
boolean true In daemon mode, the class does not terminate and runs a periodic check for updates.
network_host
manager.network_host URLs of repositories with IITC and plugins for different release branches. If the parameter is not specified, the default values are used.
message
manager.message Function for sending an information message to a user.
progressbar
manager.progressbar Function for controls the display of progress bar.
inject_user_script
manager.inject_user_script Function for injecting UserScript code into the Ingress Intel window.
inject_plugin
manager.inject_plugin Function for injecting UserScript plugin into the Ingress Intel window.
plugin_event
manager.plugin_event The function is called when the plugin status changes (enabled/disabled, updated).
-
inject_plugin(plugin)
-
Calls a function that injects UserScript plugin into the Ingress Intel window.
Parameters:
Name Type Description plugin
plugin UserScript plugin to run in the Ingress Intel window
-
inject_user_script(code)
-
Calls a function that injects UserScript code into the Ingress Intel window.
Parameters:
Name Type Description code
string UserScript code to run in the Ingress Intel window
- Deprecated:
- since version 1.5.0. Use manager.inject_plugin instead.
-
message(message, argsopt)
-
Sends an information message to user.
Parameters:
Name Type Attributes Description message
string The name of the message sent to user. You then need to map the message name to human-readable text in application.
args
string | Array.<string> <optional>
A single substitution string, or an array of substitution strings.
-
network_host
-
URLs of repositories with IITC and plugins for different release branches
Properties:
Name Type Default Description release
string https://iitc.app/build/release Release branch.
beta
string https://iitc.app/build/beta Beta branch.
custom
string http://localhost:8000 URL address of a custom repository.
-
plugin_event(plugin_event)
-
Called to handle changes in plugin status for multiple plugins at once, such as enabling, disabling, or updating. This function is invoked with detailed information about the plugin events, encapsulating the changes in a single call. The input object contains the type of event and a mapping of unique identifiers (UIDs) to plugin data, enabling batch processing of plugin state changes.
Parameters:
Name Type Description plugin_event
Object An object containing the event type and a mapping of plugin data.
Properties
Name Type Description event
'add' | 'update' | 'remove' The type of event that occurred, indicating the action being taken on the plugins.
plugins
Object.<string, (Object|{})> A mapping of plugin UIDs to their respective data objects. For 'add' and 'update' events, these objects contain the relevant plugin data. For 'remove' events, the corresponding data object will be an empty object ({}).
-
progressbar(is_show)
-
Controls progress bar display.
Parameters:
Name Type Description is_show
boolean Show progress bar.