Web: Client: Scripts: Added SamsungBrowser and AscDesktopEditor detecting at browserDetector

This commit is contained in:
Ilya Oleshko 2023-02-21 13:43:24 +03:00
parent c7465e420a
commit 4e18e0dcbc

View File

@ -9,6 +9,8 @@
Edge: 107,
Opera: 93,
Safari: 13,
AscDesktopEditor: 6,
SamsungBrowser: 3,
};
this.detectBrowser();
@ -29,7 +31,9 @@
}
if (match[1] === "Chrome") {
temp = agent.match(/\b(OPR|Edge)\/(\d+)/);
temp = agent.match(
/\b(OPR|Edge|AscDesktopEditor|SamsungBrowser)\/(\d+)/
);
if (temp != null) {
return { name: temp[1].replace("OPR", "Opera"), version: temp[2] };
}
@ -48,7 +52,6 @@
}
isSupported() {
console.log(this.browser);
if (this.unsupportedBrowsers.hasOwnProperty(this.browser.name)) {
if (
+this.browser.version > this.unsupportedBrowsers[this.browser.name]
@ -57,10 +60,6 @@
}
}
if (window.hasOwnProperty("AscDesktopEditor")) {
return true; //TODO: remove if desktop editors update cef
}
return false;
}
}