fix channel page selector

This commit is contained in:
Simon 2024-05-01 22:23:41 +02:00
parent 190f545ef2
commit ca15cc9c0b
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -106,7 +106,7 @@ function getBrowser() {
} }
function getChannelContainers() { function getChannelContainers() {
const elements = document.querySelectorAll('#inner-header-container, #owner'); const elements = document.querySelectorAll('.yt-flexible-actions-view-model-wiz, #owner');
const channelContainerNodes = []; const channelContainerNodes = [];
elements.forEach(element => { elements.forEach(element => {
@ -196,7 +196,9 @@ function getChannelHandle(channelContainer) {
const videoOwnerRenderer = channelContainer.querySelector('.ytd-video-owner-renderer'); const videoOwnerRenderer = channelContainer.querySelector('.ytd-video-owner-renderer');
if (!videoOwnerRenderer) { 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; channelHandle = channelHandleContainer ? channelHandleContainer.innerText : null;
} else { } else {
const href = videoOwnerRenderer.href; const href = videoOwnerRenderer.href;