Merge pull request #2216 from Squidly271/patch-82

Feat: GUI-Search - Execute a hook script (if present) before navigati…
This commit is contained in:
tom mortensen
2025-05-30 11:11:06 -07:00
committed by GitHub

View File

@@ -86,6 +86,15 @@ function guiSearch() {
closeSearchBox(event);
if (newPage == 'Dashboard/Settings/Tools') newPage = 'Settings';
/**
* Prevents Community Apps from crashing
* Hook script provided by CA - https://github.com/unraid/community.applications/blob/master/source/community.applications/usr/local/emhttp/plugins/community.applications/javascript/helpers.js
*/
if ( typeof guiSearchOnUnload === "function" ) {
guiSearchOnUnload();
}
location.assign('/'+newPage+'/'+searchInfo[0]+scrollText);
}
</script>