Feat: GUI-Search - Execute a hook script (if present) before navigating away from page

This commit is contained in:
Squidly271
2025-05-29 20:53:16 -04:00
committed by GitHub
parent 8d59f43517
commit edd10e2a81

View File

@@ -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);
}