fix channel page button selector

This commit is contained in:
Simon 2024-06-30 22:48:08 +02:00
parent 1d27545409
commit d3f01b372a
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -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 => {
@ -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;