Commit 9857e919 authored by Jaak Ritso's avatar Jaak Ritso
Browse files

SKAH-1857 Fix UC browser and chromium problems

parent 21db61a0
Pipeline #1089 failed with stages
......@@ -47,21 +47,24 @@ export class SameSiteCompatibilityHelper {
}
static isChromiumBased(useragent: string) {
return Bowser.getParser(useragent).is('chromium');
return (
Bowser.getParser(useragent).isBrowser('chrome', true) ||
Bowser.getParser(useragent).isBrowser('chromium', true)
);
}
static isChromiumVersionAtLeast(major: number, useragent: string) {
const isChromium = Bowser.getParser(useragent).is('chromium');
const isChromium = this.isChromiumBased(useragent);
const version = parseInt(Bowser.parse(useragent).browser.version.split('.')[0], 10);
return isChromium && version >= major;
}
static isUcBrowser(useragent: string) {
return Bowser.getParser(useragent).is('uc');
return Bowser.getParser(useragent).isBrowser('uc', true);
}
static isUcBrowserVersionAtLeast(major: number, minor: number, build: number, useragent: string) {
const isUcBrowser = Bowser.getParser(useragent).is('uc');
const isUcBrowser = this.isUcBrowser(useragent);
if (!isUcBrowser) {
return false;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment