X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=luci2%2Fhtdocs%2Fluci2%2Fluci2.js;fp=luci2%2Fhtdocs%2Fluci2%2Fluci2.js;h=284f880b3a34a8eeca0481aa0d290a1cd35a25de;hb=09c7591f609cd31c4a1edc5fe45b78338e19d2e9;hp=040f1e5da2c8177b3270df06ca2f6c7fb23c4cd8;hpb=6594e53c252c64243c039891c2c0d8afdd25f782;p=project%2Fluci2%2Fui.git diff --git a/luci2/htdocs/luci2/luci2.js b/luci2/htdocs/luci2/luci2.js index 040f1e5..284f880 100644 --- a/luci2/htdocs/luci2/luci2.js +++ b/luci2/htdocs/luci2/luci2.js @@ -173,6 +173,13 @@ String.prototype.format = function() return out + str; } +if (!window.location.origin) + window.location.origin = '%s//%s%s'.format( + window.location.protocol, + window.location.hostname, + (window.location.port ? ':' + window.location.port : '') + ); + function LuCI2() { var L = this;