summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/view
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-base/luasrc/view')
-rw-r--r--modules/luci-base/luasrc/view/header.htm11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/luci-base/luasrc/view/header.htm b/modules/luci-base/luasrc/view/header.htm
index f6e20c9a40..2813c4d943 100644
--- a/modules/luci-base/luasrc/view/header.htm
+++ b/modules/luci-base/luasrc/view/header.htm
@@ -10,3 +10,14 @@
luci.dispatcher.context.template_header_sent = true
end
%>
+
+<script type="text/javascript" src="<%=resource%>/luci.js"></script>
+<script type="text/javascript">
+ L = new LuCI(<%= luci.http.write_json({
+ token = token,
+ resource = resource,
+ scriptname = luci.http.getenv("SCRIPT_NAME"),
+ pathinfo = luci.http.getenv("PATH_INFO"),
+ requestpath = luci.dispatcher.context.requestpath
+ }) %>);
+</script>