mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-12 11:01:52 +00:00
Add 2 new hooks for detecting page changes in the webUI
This commit is contained in:
parent
5bdb4cc8b0
commit
9b528e1ab9
2 changed files with 4 additions and 0 deletions
|
@ -63,6 +63,8 @@ These are separated into the following categories depending on the type of funct
|
||||||
`registerPluginTab`: callable when a device is selected in the MeshCentral web interface to register a new tab for plugin data, if required. Accepts an object, or function that returns an object, with the following properties: { tabId: "yourShortNameHere", tabTitle: "Your Display Name"}. A tab and div with the associated ID and title will be created for your use
|
`registerPluginTab`: callable when a device is selected in the MeshCentral web interface to register a new tab for plugin data, if required. Accepts an object, or function that returns an object, with the following properties: { tabId: "yourShortNameHere", tabTitle: "Your Display Name"}. A tab and div with the associated ID and title will be created for your use
|
||||||
`onDesktopDisconnect`: called when a remote desktop session is disconnected
|
`onDesktopDisconnect`: called when a remote desktop session is disconnected
|
||||||
`onWebUIStartupEnd`: called when the page has loaded for the first time after a login / refresh
|
`onWebUIStartupEnd`: called when the page has loaded for the first time after a login / refresh
|
||||||
|
`goPageStart`: called before page changes take effect. Passes 2 arguments (<page number> : int, <event> : Event)
|
||||||
|
`goPageEnd`: called after page changes take effect. Passes 2 arguments (<page number> : int, <event> : Event)
|
||||||
|
|
||||||
#### Exports
|
#### Exports
|
||||||
Any function can be exported to the Web UI layer by adding the name of the function to an `exports` array in the plugin object.
|
Any function can be exported to the Web UI layer by adding the name of the function to an `exports` array in the plugin object.
|
||||||
|
|
|
@ -9834,6 +9834,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function go(x, event) {
|
function go(x, event) {
|
||||||
|
if (pluginHandler != null) pluginHandler.callHook('goPageStart', x, event);
|
||||||
setSessionActivity();
|
setSessionActivity();
|
||||||
if (xxdialogMode) return;
|
if (xxdialogMode) return;
|
||||||
QV('uiMenu', false);
|
QV('uiMenu', false);
|
||||||
|
@ -9959,6 +9960,7 @@
|
||||||
} else {
|
} else {
|
||||||
document.title = decodeURIComponent('{{{extitle}}}');
|
document.title = decodeURIComponent('{{{extitle}}}');
|
||||||
}
|
}
|
||||||
|
if (pluginHandler != null) pluginHandler.callHook('goPageEnd', x, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue