diff options
| author | meow <woem> | 2022-04-27 15:01:34 +0300 |
|---|---|---|
| committer | meow <woem> | 2022-04-27 15:01:34 +0300 |
| commit | dbb1e3f5d8aae3d732bbf3ccf82baec0739d9445 (patch) | |
| tree | 4135d96a9f99aab6385a1b352c17bad8c41a0da5 /assets | |
| parent | fafd4d93968f36f4b0f713eaef154ac0dc30de87 (diff) | |
| download | invidious-dbb1e3f5d8aae3d732bbf3ccf82baec0739d9445.tar.gz invidious-dbb1e3f5d8aae3d732bbf3ccf82baec0739d9445.tar.bz2 invidious-dbb1e3f5d8aae3d732bbf3ccf82baec0739d9445.zip | |
replace tabs to spaces
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/js/player.js | 16 | ||||
| -rw-r--r-- | assets/js/themes.js | 8 |
2 files changed, 12 insertions, 12 deletions
diff --git a/assets/js/player.js b/assets/js/player.js index f07031ac..6ddb1158 100644 --- a/assets/js/player.js +++ b/assets/js/player.js @@ -171,14 +171,14 @@ if (isMobile()) { // The share and http source selector element can't be fetched till the players ready. player.one('playing', function () { - var share_element = document.getElementsByClassName('vjs-share-control')[0]; - operations_bar_element.append(share_element); - - if (video_data.params.quality === 'dash') { - var http_source_selector = document.getElementsByClassName('vjs-http-source-selector vjs-menu-button')[0]; - operations_bar_element.append(http_source_selector); - } - }); + var share_element = document.getElementsByClassName('vjs-share-control')[0]; + operations_bar_element.append(share_element); + + if (video_data.params.quality === 'dash') { + var http_source_selector = document.getElementsByClassName('vjs-http-source-selector vjs-menu-button')[0]; + operations_bar_element.append(http_source_selector); + } + }); } // Enable VR video support diff --git a/assets/js/themes.js b/assets/js/themes.js index 36556a0b..3f503b38 100644 --- a/assets/js/themes.js +++ b/assets/js/themes.js @@ -78,10 +78,10 @@ function update_mode (mode) { // If preference for dark mode indicated set_mode(true); } - else if (mode === 'false' /* for backwards compatibility */ || mode === 'light') { - // If preference for light mode indicated - set_mode(false); - } + else if (mode === 'false' /* for backwards compatibility */ || mode === 'light') { + // If preference for light mode indicated + set_mode(false); + } else if (document.getElementById('dark_mode_pref').textContent === '' && window.matchMedia('(prefers-color-scheme: dark)').matches) { // If no preference indicated here and no preference indicated on the preferences page (backend), but the browser tells us that the operating system has a dark theme set_mode(true); |
