mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-25 06:35:54 -05:00
Add 2 new hooks for detecting page changes in the webUI
This commit is contained in:
parent
5bdb4cc8b0
commit
9b528e1ab9
@ -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
|
||||
`onDesktopDisconnect`: called when a remote desktop session is disconnected
|
||||
`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
|
||||
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) {
|
||||
if (pluginHandler != null) pluginHandler.callHook('goPageStart', x, event);
|
||||
setSessionActivity();
|
||||
if (xxdialogMode) return;
|
||||
QV('uiMenu', false);
|
||||
@ -9959,6 +9960,7 @@
|
||||
} else {
|
||||
document.title = decodeURIComponent('{{{extitle}}}');
|
||||
}
|
||||
if (pluginHandler != null) pluginHandler.callHook('goPageEnd', x, event);
|
||||
}
|
||||
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user