mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix prefer for-of errors
This commit is contained in:
parent
ef719c45f4
commit
1b03cd79eb
11 changed files with 26 additions and 47 deletions
|
@ -33,9 +33,9 @@ function onOpen() {
|
|||
const playerId = localStorage.getItem('autocastPlayerId');
|
||||
|
||||
playbackManager.getTargets().then(function (targets) {
|
||||
for (let i = 0; i < targets.length; i++) {
|
||||
if (targets[i].id == playerId) {
|
||||
playbackManager.trySetActivePlayer(targets[i].playerName, targets[i]);
|
||||
for (const target of targets) {
|
||||
if (target.id == playerId) {
|
||||
playbackManager.trySetActivePlayer(target.playerName, target);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -167,8 +167,8 @@ function supportsCssAnimation(allowPrefix) {
|
|||
}
|
||||
|
||||
if (animation === false && allowPrefix) {
|
||||
for (let i = 0; i < domPrefixes.length; i++) {
|
||||
if (elm.style[domPrefixes[i] + 'AnimationName'] !== undefined) {
|
||||
for (const domPrefix of domPrefixes) {
|
||||
if (elm.style[domPrefix + 'AnimationName'] !== undefined) {
|
||||
animation = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -591,13 +591,10 @@ function getToolsLinkHtml(item) {
|
|||
|
||||
function getToolsMenuHtml(apiClient) {
|
||||
return getToolsMenuLinks(apiClient).then(function (items) {
|
||||
let item;
|
||||
let menuHtml = '';
|
||||
menuHtml += '<div class="drawerContent">';
|
||||
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
item = items[i];
|
||||
|
||||
for (const item of items) {
|
||||
if (item.href) {
|
||||
menuHtml += getToolsLinkHtml(item);
|
||||
} else if (item.name) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue