diff --git a/plugin.js b/plugin.js index 1e5fcb2..fa0d184 100644 --- a/plugin.js +++ b/plugin.js @@ -439,19 +439,23 @@ } var bgel = document.querySelector('.background'); if (bg && bgel) { - // Mimic Lampa's native canvas background: - // - smooth fade-in (background__fade alpha animation) - // - heavy blur with edges pushed off-screen (background__one/two) - // - soft vignette toward edges (background__fade gradient), not a hard frame - bgel.style.transition = 'opacity .5s ease, transform .5s ease'; + // Mimic Lampa's native background: subtle blur, soft vignette, + // and a smooth fade-in (set opacity 0 first, then animate to 1 + // on the next frame so the CSS transition actually runs). + bgel.style.transition = 'opacity .45s ease'; bgel.style.backgroundImage = 'url("' + bg + '")'; bgel.style.backgroundSize = 'cover'; bgel.style.backgroundPosition = 'center'; bgel.style.backgroundRepeat = 'no-repeat'; - bgel.style.filter = 'blur(45px) brightness(0.92)'; - bgel.style.transform = 'scale(1.2)'; - bgel.style.opacity = '1'; - bgel.style.boxShadow = 'inset 0 0 320px 160px rgba(0,0,0,0.72)'; + bgel.style.filter = 'blur(22px)'; + bgel.style.transform = 'scale(1.08)'; + bgel.style.boxShadow = 'inset 0 0 260px 130px rgba(0,0,0,0.6)'; + bgel.style.opacity = '0'; + requestAnimationFrame(function () { + requestAnimationFrame(function () { + bgel.style.opacity = '1'; + }); + }); } } catch (e) { console.log('[mymovies] bg err', e); } if (!$('.mymovies-detail .full-start-new__buttons .full-start__button.selector').length) {