mirror of
https://github.com/openwrt/luci.git
synced 2025-12-21 17:04:35 +04:00
* HTML Cleanup: Meta tags. * Converted charset to shorthand. * Removed meta tags with `Content-Script-Type` attribute. (Invalid in HTML5 spec.) * HTML Cleanup: CSS tags. * Removed `type` attribute with CSS files from link tags. (HTML5 spec recommends omitting it.) * Removed `type` attribute from style tags. (Deprecated in HTML5 spec.) https://html.spec.whatwg.org/#attr-link-type https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style * HTML Cleanup: Convert from XHTML to HTML5 * Removed XML declaration. * Removed XML namespace. * Changed doctype to HTML5. * HTML Cleanup: CDATA tags. * CDATA sections should not be used within HTML they are considered as comments and not displayed. https://developer.mozilla.org/en-US/docs/Web/API/CDATASection * HTML Cleanup: Script tags. * Removed `language` attribute from script tags. (No longer valid in HTML5) * Removed `type` attribute with JavaScript MIME type from script tags. (HTML5 spec recommends omitting it.) https://html.spec.whatwg.org/multipage/scripting.html#attr-script-type https://mimesniff.spec.whatwg.org/#javascript-mime-type Signed-off-by: Mustafa Can Elmacı <mustafacan@elmaci.net>
33 lines
1.0 KiB
Plaintext
33 lines
1.0 KiB
Plaintext
{#
|
|
Copyright 2022 Jo-Philipp Wich <jo@mein.io>
|
|
Licensed to the public under the Apache License 2.0.
|
|
-#}
|
|
|
|
{%
|
|
include(`themes/${theme}/header`);
|
|
-%}
|
|
|
|
<script src="{{ resource }}/promis.min.js"></script>
|
|
<script src="{{ resource }}/luci.js"></script>
|
|
<script>
|
|
L = new LuCI({{ replace(`${ {
|
|
media : media,
|
|
resource : resource,
|
|
scriptname : http.getenv("SCRIPT_NAME"),
|
|
pathinfo : http.getenv("PATH_INFO"),
|
|
documentroot : http.getenv("DOCUMENT_ROOT"),
|
|
requestpath : ctx.request_path,
|
|
dispatchpath : ctx.path,
|
|
pollinterval : +config.main.pollinterval || 5,
|
|
ubuspath : config.main.ubuspath || '/ubus/',
|
|
sessionid : ctx.authsession,
|
|
token : ctx.authtoken,
|
|
nodespec : dispatched,
|
|
apply_rollback : max(+config.apply.rollback || 90, 90),
|
|
apply_holdoff : max(+config.apply.holdoff || 4, 1),
|
|
apply_timeout : max(+config.apply.timeout || 5, 1),
|
|
apply_display : max(+config.apply.display || 1.5, 1),
|
|
rollback_token : rollback_token
|
|
} }`, '/', '\\/') }});
|
|
</script>
|