Firefox Extension - Smaller YouTube Thumbnails: Unterschied zwischen den Versionen
Aus QBWiki
Zur Navigation springenZur Suche springen
Padi (Diskussion | Beiträge) |
Padi (Diskussion | Beiträge) |
||
| Zeile 23: | Zeile 23: | ||
} | } | ||
} | } | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | |||
| + | <syntaxhighlight lang="javascript"> | ||
| + | const style = document.createElement('style'); | ||
| + | style.textContent = ` | ||
| + | ytd-rich-grid-renderer #contents { | ||
| + | display: grid !important; | ||
| + | grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important; | ||
| + | grid-auto-rows: auto !important; | ||
| + | gap: 8px !important; | ||
| + | padding: 4px !important; | ||
| + | } | ||
| + | |||
| + | ytd-rich-item-renderer { | ||
| + | margin: 0 !important; | ||
| + | display: block !important; | ||
| + | width: auto !important; | ||
| + | } | ||
| + | |||
| + | ytd-rich-item-renderer ytd-thumbnail { | ||
| + | width: 100% !important; | ||
| + | } | ||
| + | |||
| + | ytd-rich-section-renderer { | ||
| + | display: none; | ||
| + | } | ||
| + | `; | ||
| + | document.head.appendChild(style); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Version vom 25. April 2025, 20:24 Uhr
{
"manifest_version": 2,
"name": "yt-thumb-revert",
"version": "1.0",
"description": "Reverts YouTubes f-ed up thumbnails to smaller ones.",
"permissions": ["<all_urls>"],
"content_scripts": [
{
"matches": ["*://*.youtube.com/*"],
"js": ["yt-rev-thumbs.js"],
"run_at": "document_end"
}
],
"icons": {
"48": "icons/yt-thumb-revert.png"
}
}
const style = document.createElement('style');
style.textContent = `
ytd-rich-grid-renderer #contents {
display: grid !important;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
grid-auto-rows: auto !important;
gap: 8px !important;
padding: 4px !important;
}
ytd-rich-item-renderer {
margin: 0 !important;
display: block !important;
width: auto !important;
}
ytd-rich-item-renderer ytd-thumbnail {
width: 100% !important;
}
ytd-rich-section-renderer {
display: none;
}
`;
document.head.appendChild(style);