Skip to content

Commit

Permalink
fix channel page button selector
Browse files Browse the repository at this point in the history
  • Loading branch information
bbilly1 committed Jun 30, 2024
1 parent 1d27545 commit d3f01b3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 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('.yt-flexible-actions-view-model-wiz, #owner');
const elements = document.querySelectorAll('#inner-header-container, #owner');
const channelContainerNodes = [];

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

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

0 comments on commit d3f01b3

Please sign in to comment.