mirror of
https://github.com/tubearchivist/browser-extension.git
synced 2024-11-24 12:40:13 +00:00
fix channel page button selector
This commit is contained in:
parent
1d27545409
commit
d3f01b372a
@ -106,7 +106,7 @@ function getBrowser() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getChannelContainers() {
|
function getChannelContainers() {
|
||||||
const elements = document.querySelectorAll('.yt-flexible-actions-view-model-wiz, #owner');
|
const elements = document.querySelectorAll('#inner-header-container, #owner');
|
||||||
const channelContainerNodes = [];
|
const channelContainerNodes = [];
|
||||||
|
|
||||||
elements.forEach(element => {
|
elements.forEach(element => {
|
||||||
@ -198,9 +198,7 @@ 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(
|
const channelHandleContainer = document.querySelector('#channel-handle');
|
||||||
'.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;
|
||||||
|
Loading…
Reference in New Issue
Block a user