Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: browser util flagging smart TV as Safari #8566

Merged
merged 2 commits into from
Jan 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion src/js/utils/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,22 @@ export let IS_IPAD = false;
// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/
export let IS_IPHONE = false;

/**
* Whether or not this is a Tizen device.
*
* @static
* @type {Boolean}
*/
export let IS_TIZEN = false;

/**
* Whether or not this is a WebOS device.
*
* @static
* @type {Boolean}
*/
export let IS_WEBOS = false;

/**
* Whether or not this device is touch-enabled.
*
Expand Down Expand Up @@ -235,7 +251,11 @@ if (!IS_CHROMIUM) {
return version;
}());

IS_SAFARI = (/Safari/i).test(USER_AGENT) && !IS_CHROME && !IS_ANDROID && !IS_EDGE;
IS_TIZEN = (/Tizen/i).test(USER_AGENT);

IS_WEBOS = (/Web0S/i).test(USER_AGENT);

IS_SAFARI = (/Safari/i).test(USER_AGENT) && !IS_CHROME && !IS_ANDROID && !IS_EDGE && !IS_TIZEN && !IS_WEBOS;

IS_WINDOWS = (/Windows/i).test(USER_AGENT);

Expand Down
Loading