kopia lustrzana https://github.com/cheeaun/phanpy
Don't fix theme-color if media modal is showing
rodzic
451fc1bf52
commit
4e56faa7c8
|
@ -210,6 +210,12 @@ const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent);
|
||||||
if (isIOS) {
|
if (isIOS) {
|
||||||
document.addEventListener('visibilitychange', () => {
|
document.addEventListener('visibilitychange', () => {
|
||||||
if (document.visibilityState === 'visible') {
|
if (document.visibilityState === 'visible') {
|
||||||
|
// Don't reset theme color if media modal is showing
|
||||||
|
// Media modal will set its own theme color based on the media's color
|
||||||
|
const showingMediaModal =
|
||||||
|
document.getElementsByClassName('media-modal-container').length > 0;
|
||||||
|
if (showingMediaModal) return;
|
||||||
|
|
||||||
const theme = store.local.get('theme');
|
const theme = store.local.get('theme');
|
||||||
let $meta;
|
let $meta;
|
||||||
if (theme) {
|
if (theme) {
|
||||||
|
|
Ładowanie…
Reference in New Issue