mirror of
https://github.com/tubearchivist/browser-extension.git
synced 2025-07-12 03:58:18 +00:00
Merge a85b0845ed91d4f49cae8d007c310e604cf0adbb into 540600731595bcd9f4a8d3878d17f7e33b2cca1d
This commit is contained in:
commit
6489e95239
@ -146,25 +146,7 @@ function ensureTALinks() {
|
|||||||
|
|
||||||
// fix positioning of #owner div to fit new button
|
// fix positioning of #owner div to fit new button
|
||||||
function adjustOwner(channelContainer) {
|
function adjustOwner(channelContainer) {
|
||||||
let sponsorButton = channelContainer.querySelector('#sponsor-button');
|
return channelContainer.querySelector("#buttons") || channelContainer;
|
||||||
if (sponsorButton === null) {
|
|
||||||
return channelContainer;
|
|
||||||
}
|
|
||||||
|
|
||||||
let variableMinWidth;
|
|
||||||
if (sponsorButton.hasChildNodes()) {
|
|
||||||
variableMinWidth = '140px';
|
|
||||||
} else {
|
|
||||||
variableMinWidth = '45px';
|
|
||||||
}
|
|
||||||
|
|
||||||
Object.assign(channelContainer.firstElementChild.style, {
|
|
||||||
minWidth: variableMinWidth,
|
|
||||||
});
|
|
||||||
Object.assign(channelContainer.style, {
|
|
||||||
minWidth: 'calc(40% + 50px)',
|
|
||||||
});
|
|
||||||
return channelContainer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildChannelButton(channelContainer) {
|
function buildChannelButton(channelContainer) {
|
||||||
@ -197,16 +179,15 @@ function getChannelHandle(channelContainer) {
|
|||||||
function buildChannelButtonDiv() {
|
function buildChannelButtonDiv() {
|
||||||
let buttonDiv = document.createElement('div');
|
let buttonDiv = document.createElement('div');
|
||||||
buttonDiv.classList.add('ta-channel-button');
|
buttonDiv.classList.add('ta-channel-button');
|
||||||
|
|
||||||
Object.assign(buttonDiv.style, {
|
Object.assign(buttonDiv.style, {
|
||||||
display: 'flex',
|
'display': 'flex',
|
||||||
alignItems: 'center',
|
'alignItems': 'center',
|
||||||
backgroundColor: '#00202f',
|
'backgroundColor': '#00202f',
|
||||||
color: '#fff',
|
'color': '#fff',
|
||||||
fontSize: '14px',
|
'fontSize': '14px',
|
||||||
padding: '5px',
|
'padding': '5px',
|
||||||
margin: '5px',
|
'margin-left': '8px',
|
||||||
borderRadius: '8px',
|
'borderRadius': '18px',
|
||||||
});
|
});
|
||||||
return buttonDiv;
|
return buttonDiv;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user