mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Cleaned up element dir detection funciton
This commit is contained in:
parent
d719ee6a07
commit
76b0e8c01c
1 changed files with 2 additions and 5 deletions
|
@ -68,13 +68,10 @@ import { currentSettings as userSettings } from './settings/userSettings';
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getElementIsRTL(element) {
|
export function getElementIsRTL(element) {
|
||||||
let elementIsRTL = false;
|
|
||||||
if (window.getComputedStyle) { // all browsers
|
if (window.getComputedStyle) { // all browsers
|
||||||
elementIsRTL = window.getComputedStyle(element, null).getPropertyValue('direction') == 'rtl';
|
return window.getComputedStyle(element, null).getPropertyValue('direction') == 'rtl';
|
||||||
} else {
|
|
||||||
elementIsRTL = element.currentStyle.direction == 'rtl'; // IE5-8
|
|
||||||
}
|
}
|
||||||
return elementIsRTL;
|
return element.currentStyle.direction == 'rtl';
|
||||||
}
|
}
|
||||||
|
|
||||||
export function updateCurrentCulture() {
|
export function updateCurrentCulture() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue