mirror of
https://github.com/unraid/webgui.git
synced 2026-01-06 09:39:58 -06:00
Feat: GUI-Search - Execute a hook script (if present) before navigating away from page
This commit is contained in:
@@ -103,6 +103,11 @@ function guiSearch() {
|
||||
|
||||
closeSearchBox(event);
|
||||
if (newPage == 'Dashboard/Settings/Tools') newPage = 'Settings';
|
||||
|
||||
// If a hook script is present in the current page execute it before navigating away
|
||||
if ( typeof guiSearchOnUnload === "function" ) {
|
||||
guiSearchOnUnload();
|
||||
}
|
||||
location.replace('/'+newPage+'/'+searchInfo[0]+scrollText);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user