mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
@@ -99,7 +99,14 @@ export function utilDetect(force) {
|
||||
}
|
||||
setTextDirection(detected.textDirection);
|
||||
|
||||
detected.host = window.location && (window.location.origin + window.location.pathname);
|
||||
// detect host
|
||||
var loc = window.top.location;
|
||||
var origin = loc.origin;
|
||||
if (!origin) { // for unpatched IE11
|
||||
origin = loc.protocol + '//' + loc.hostname + (loc.port ? ':' + loc.port: '');
|
||||
}
|
||||
|
||||
detected.host = origin + loc.pathname;
|
||||
|
||||
detected.filedrop = (window.FileReader && 'ondrop' in window);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user