projects
/
project
/
luci2
/
ui.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6594e53
)
luci2: polyfill window.location.origin
author
Jo-Philipp Wich
<jow@openwrt.org>
Mon, 5 Jan 2015 18:14:50 +0000
(19:14 +0100)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Mon, 5 Jan 2015 18:14:50 +0000
(19:14 +0100)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
luci2/htdocs/luci2/luci2.js
patch
|
blob
|
history
diff --git
a/luci2/htdocs/luci2/luci2.js
b/luci2/htdocs/luci2/luci2.js
index 040f1e5da2c8177b3270df06ca2f6c7fb23c4cd8..284f880b3a34a8eeca0481aa0d290a1cd35a25de 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;
}
+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;