luci-base: luci.js: add ability to add "preload" classes
authorJo-Philipp Wich <jo@mein.io>
Sun, 12 Apr 2020 20:54:02 +0000 (22:54 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 7 May 2020 17:40:49 +0000 (19:40 +0200)
commit87468c5731d973b6f2315936d2d5760d9cf65961
treeefb637c14c3bbdf3d819838b64e5aa33613601aa
parent3c6dd6deec672cbc051f5b14845d13e92afdffcd
luci-base: luci.js: add ability to add "preload" classes

Extend the LuCI bootstrap procedure to scan for class files in
/www/luci-static/preload/. Any JavaScript file found there will be
required automatically before setting up the view, allowing to stage
code that should run on every page load.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0d0ad80fd1b96ff2c33392387320ad518640782b)
modules/luci-base/htdocs/luci-static/resources/luci.js