spegling av
https://git.openwrt.org/project/luci.git
synced 2025-01-18 23:45:02 +00:00
ae8bbb814f
* 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>
25 rader
632 B
HTML
25 rader
632 B
HTML
<%
|
|
local uci = require "luci.model.uci".cursor()
|
|
local http_port = uci:get("radicale2", "server", "host")
|
|
local usessl = uci:get_bool("radicale2", "server", "ssl")
|
|
if type(http_port) == "table" then
|
|
http_port = http_port[1]
|
|
end
|
|
|
|
if http_port then
|
|
http_port = http_port:match("(%d+)$")
|
|
end
|
|
if not http_port then
|
|
http_port = "5232"
|
|
end
|
|
%>
|
|
<script>
|
|
<%
|
|
if usessl then
|
|
%>
|
|
var protocol = 'https'
|
|
<% else %>
|
|
var protocol = 'http'
|
|
<% end %>
|
|
document.write('<a href="' + protocol + '://' + window.location.hostname + ':' + <%=http_port%> + '/"><%=luci.i18n.translate("Go to Radicale 2.x Web UI")%></a>');
|
|
</script>
|