Skip to content

Commit

Permalink
fix channel page selector
Browse files Browse the repository at this point in the history
  • Loading branch information
bbilly1 committed May 1, 2024
1 parent 190f545 commit ca15cc9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions extension/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function getBrowser() {
}

function getChannelContainers() {
const elements = document.querySelectorAll('#inner-header-container, #owner');
const elements = document.querySelectorAll('.yt-flexible-actions-view-model-wiz, #owner');
const channelContainerNodes = [];

elements.forEach(element => {
Expand Down Expand Up @@ -196,7 +196,9 @@ function getChannelHandle(channelContainer) {
const videoOwnerRenderer = channelContainer.querySelector('.ytd-video-owner-renderer');

if (!videoOwnerRenderer) {
const channelHandleContainer = document.querySelector('#channel-handle');
const channelHandleContainer = document.querySelector(
'.yt-content-metadata-view-model-wiz__metadata-text'
);
channelHandle = channelHandleContainer ? channelHandleContainer.innerText : null;
} else {
const href = videoOwnerRenderer.href;
Expand Down

0 comments on commit ca15cc9

Please sign in to comment.