mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Suggestions: inline function
This commit is contained in:
parent
c2b1d02a33
commit
b2d342f0e4
2 changed files with 5 additions and 13 deletions
|
@ -15,10 +15,6 @@ function zoomIn(elem, iterations) {
|
|||
return elem.animate(keyframes, timing);
|
||||
}
|
||||
|
||||
function hideScroll() {
|
||||
document.body.classList.add('hide-scroll');
|
||||
}
|
||||
|
||||
function createMediaElement(instance, options) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
const dlg = document.querySelector('.youtubePlayerContainer');
|
||||
|
@ -42,7 +38,7 @@ function createMediaElement(instance, options) {
|
|||
instance.videoDialog = dlg;
|
||||
|
||||
if (options.fullscreen) {
|
||||
hideScroll();
|
||||
document.body.classList.add('hide-scroll');
|
||||
}
|
||||
|
||||
if (options.fullscreen && dlg.animate && !browser.slow) {
|
||||
|
@ -56,7 +52,7 @@ function createMediaElement(instance, options) {
|
|||
} else {
|
||||
// we need to hide scrollbar when starting playback from page with animated background
|
||||
if (options.fullscreen) {
|
||||
hideScroll();
|
||||
document.body.classList.add('hide-scroll');
|
||||
}
|
||||
|
||||
resolve(dlg.querySelector('#player'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue