Fixes for windows

This commit is contained in:
Oleg Korshul
2023-03-23 23:50:45 +03:00
parent f16308a0b0
commit ccc9502c6c

View File

@ -104,6 +104,19 @@
// ie11 not support message from another domain
window.Asc.plugin._initInternal = true;
var _windowSearch = window.location.search;
var _pos1 = _windowSearch.indexOf("windowID=");
if (_pos1 >= 0)
{
_pos1 += 9;
var _pos2 = _windowSearch.indexOf("&", _pos1);
if (_pos2 < 0)
_pos2 = _windowSearch.length;
window.Asc.plugin.windowID = _windowSearch.substring(_pos1, _pos2);
obj.windowID = window.Asc.plugin.windowID;
}
window.parent.postMessage(JSON.stringify(obj), "*");
}
};