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>
Sun, 12 Apr 2020 21:55:36 +0000 (23:55 +0200)
commit0d0ad80fd1b96ff2c33392387320ad518640782b
tree424b144c399da133da3d2e14351c40dd0e0f96b9
parentfde144c9be61d7886e81240233328a61d7088d08
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>
modules/luci-base/htdocs/luci-static/resources/luci.js