mirror of
https://github.com/unraid/webgui.git
synced 2026-02-22 18:29:47 -06:00
Merge pull request #2216 from Squidly271/patch-82
Feat: GUI-Search - Execute a hook script (if present) before navigati…
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user