mirror of
https://github.com/tubearchivist/browser-extension.git
synced 2025-04-20 18:20:12 +00:00
parent
82a64ff4ba
commit
a1fae6aff7
@ -20,7 +20,8 @@
|
|||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
"matches": ["https://www.youtube.com/*"],
|
"matches": ["https://www.youtube.com/*"],
|
||||||
"js": ["script.js"]
|
"js": ["script.js"],
|
||||||
|
"css": ["script.css"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"background": {
|
"background": {
|
||||||
|
@ -18,7 +18,8 @@
|
|||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
"matches": ["https://www.youtube.com/*"],
|
"matches": ["https://www.youtube.com/*"],
|
||||||
"js": ["script.js"]
|
"js": ["script.js"],
|
||||||
|
"css": ["script.css"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"background": {
|
"background": {
|
||||||
|
18
extension/script.css
Normal file
18
extension/script.css
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
.ta-button {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: #00202f;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 1.4rem;
|
||||||
|
text-decoration: none;
|
||||||
|
border-radius: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
height: fit-content;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ta-title-container {
|
||||||
|
display: flex;
|
||||||
|
gap: 15px;
|
||||||
|
}
|
@ -348,20 +348,6 @@ function buildVideoButton(titleContainer) {
|
|||||||
dlButton.classList.add('ta-button');
|
dlButton.classList.add('ta-button');
|
||||||
dlButton.href = '#';
|
dlButton.href = '#';
|
||||||
|
|
||||||
Object.assign(dlButton.style, {
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
backgroundColor: '#00202f',
|
|
||||||
color: '#fff',
|
|
||||||
fontSize: '1.4rem',
|
|
||||||
textDecoration: 'none',
|
|
||||||
borderRadius: '8px',
|
|
||||||
cursor: 'pointer',
|
|
||||||
height: 'fit-content',
|
|
||||||
opacity: 0,
|
|
||||||
});
|
|
||||||
|
|
||||||
let dlIcon = document.createElement('span');
|
let dlIcon = document.createElement('span');
|
||||||
dlIcon.innerHTML = defaultIcon;
|
dlIcon.innerHTML = defaultIcon;
|
||||||
Object.assign(dlIcon.style, {
|
Object.assign(dlIcon.style, {
|
||||||
@ -394,10 +380,12 @@ function getNearestLink(element) {
|
|||||||
|
|
||||||
function processTitle(titleContainer) {
|
function processTitle(titleContainer) {
|
||||||
if (titleContainer.hasListener) return;
|
if (titleContainer.hasListener) return;
|
||||||
Object.assign(titleContainer.style, {
|
titleContainer.classList.add("ta-title-container");
|
||||||
display: 'flex',
|
|
||||||
gap: '15px',
|
if (titleContainer.style.display === "-webkit-box") {
|
||||||
});
|
// Compatibility with DeArrow
|
||||||
|
titleContainer.style.setProperty("display", "flex", "important");
|
||||||
|
}
|
||||||
|
|
||||||
titleContainer.classList.add('title-container');
|
titleContainer.classList.add('title-container');
|
||||||
titleContainer.addEventListener('mouseenter', () => {
|
titleContainer.addEventListener('mouseenter', () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user