projects
/
project
/
luci2
/
ui.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
luci2: polyfill window.location.origin
[project/luci2/ui.git]
/
luci2
/
htdocs
/
luci2
/
luci2.js
diff --git
a/luci2/htdocs/luci2/luci2.js
b/luci2/htdocs/luci2/luci2.js
index
040f1e5
..
284f880
100644
(file)
--- a/
luci2/htdocs/luci2/luci2.js
+++ b/
luci2/htdocs/luci2/luci2.js
@@
-173,6
+173,13
@@
String.prototype.format = function()
return out + str;
}
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;
function LuCI2()
{
var L = this;