mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
strip unused css from initial download
This commit is contained in:
parent
6a9accf68f
commit
2d014a82b4
10 changed files with 82 additions and 108 deletions
|
@ -1924,9 +1924,26 @@ var AppInfo = {};
|
|||
tapDelay: 0
|
||||
});
|
||||
|
||||
function parentWithClass(elem, className) {
|
||||
|
||||
while (!elem.classList || !elem.classList.contains(className)) {
|
||||
elem = elem.parentNode;
|
||||
|
||||
if (!elem) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return elem;
|
||||
}
|
||||
|
||||
// Have to work around this issue of fast click breaking the panel dismiss
|
||||
$(document.body).on('touchstart', '.ui-panel-dismiss', function () {
|
||||
$(this).trigger('click');
|
||||
document.body.addEventListener('touchstart', function (e) {
|
||||
|
||||
var tgt = parentWithClass(e.target, 'ui-panel-dismiss');
|
||||
if (tgt) {
|
||||
$(tgt).click();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue