mirror of
https://github.com/ONLYOFFICE/sdkjs.git
synced 2026-02-10 18:15:19 +08:00
Add correction urls in window
This commit is contained in:
File diff suppressed because one or more lines are too long
@ -431,6 +431,15 @@
|
||||
CPluginWindow.prototype.show = function(settings)
|
||||
{
|
||||
var url = settings.url;
|
||||
|
||||
if ((0 === url.indexOf("http://")) || (0 === url.indexOf("https://")) || (0 === url.indexOf("file://")) || (0 === url.indexOf("www.")))
|
||||
{
|
||||
let location = window.location;
|
||||
let start = location.pathname.lastIndexOf('/') + 1;
|
||||
let file = location.pathname.substring(start);
|
||||
url = location.href.replace(file, url);
|
||||
}
|
||||
|
||||
if (-1 === url.indexOf(".html?"))
|
||||
url += "?windowID=";
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user