Skip to content

Commit

Permalink
fix: update selector for thumbnail and avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-deramond committed Nov 10, 2022
1 parent 3d1369a commit f014025
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function findCard() {
cardPositionIndex = Math.floor(Math.random() * (max - min + 1)) + min
}
let target = cards[cardPositionIndex]
const thumbnail = target.querySelector('.yt-img-shadow')
const thumbnail = target.querySelector('.ytd-thumbnail > img')
thumbnail.src = result.thumbnailProperties.thumbnail

const title = target.querySelector('#video-title')
Expand All @@ -103,7 +103,7 @@ function findCard() {
}

// Finally, set the channel's thumbnail in the preview
let avatar = target.querySelector('#avatar-link img')
let avatar = target.querySelector('#avatar-link .yt-img-shadow')
if (avatar) {
avatar.src = channelThumbnailValue
}
Expand Down

0 comments on commit f014025

Please sign in to comment.