mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
make backdrops optional
This commit is contained in:
parent
0a7b7a14e3
commit
2c7636b291
7 changed files with 173 additions and 25 deletions
|
@ -87,18 +87,32 @@
|
|||
$('.backdropContainer').css('backgroundImage', '');
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshow', ".backdropPage", function () {
|
||||
|
||||
var page = this;
|
||||
function enabled() {
|
||||
|
||||
// Gets real messy and jumps around the page when scrolling
|
||||
// Can be reviewed later.
|
||||
if ($.browser.msie) {
|
||||
$(page).removeClass('backdropPage');
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
var userId = Dashboard.getCurrentUserId();
|
||||
|
||||
var val = LocalSettings.val('enableBackdrops', userId);
|
||||
|
||||
return val != '0';
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshow', ".backdropPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
if (enabled()) {
|
||||
var type = page.getAttribute('data-backdroptype');
|
||||
|
||||
showBackdrop(type);
|
||||
} else {
|
||||
$(page).removeClass('backdropPage');
|
||||
clearBackdrop();
|
||||
}
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue