mirror of
https://github.com/tubearchivist/browser-extension.git
synced 2024-11-22 11:40:13 +00:00
fix infinite buttons
This commit is contained in:
parent
ee6db2595f
commit
75848ad4eb
@ -126,8 +126,8 @@ function ensureTALinks() {
|
|||||||
let channelContainerNodes = getChannelContainers();
|
let channelContainerNodes = getChannelContainers();
|
||||||
|
|
||||||
for (let channelContainer of channelContainerNodes) {
|
for (let channelContainer of channelContainerNodes) {
|
||||||
if (channelContainer.hasTA) continue;
|
|
||||||
channelContainer = adjustOwner(channelContainer);
|
channelContainer = adjustOwner(channelContainer);
|
||||||
|
if (channelContainer.hasTA) continue;
|
||||||
let channelButton = buildChannelButton(channelContainer);
|
let channelButton = buildChannelButton(channelContainer);
|
||||||
channelContainer.appendChild(channelButton);
|
channelContainer.appendChild(channelButton);
|
||||||
channelContainer.hasTA = true;
|
channelContainer.hasTA = true;
|
||||||
@ -145,7 +145,6 @@ function ensureTALinks() {
|
|||||||
}
|
}
|
||||||
ensureTALinks = throttled(ensureTALinks, 700);
|
ensureTALinks = throttled(ensureTALinks, 700);
|
||||||
|
|
||||||
// fix positioning of #owner div to fit new button
|
|
||||||
function adjustOwner(channelContainer) {
|
function adjustOwner(channelContainer) {
|
||||||
return channelContainer.querySelector('#buttons') || channelContainer;
|
return channelContainer.querySelector('#buttons') || channelContainer;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user