Add correction urls in window

This commit is contained in:
Oleg Korshul
2024-08-13 14:48:54 +03:00
parent 5482381286
commit 18a62b0d4f
2 changed files with 10 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -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