Skip to content

Instantly share code, notes, and snippets.

@hamitozdemir
Created November 18, 2019 16:38
Show Gist options
  • Save hamitozdemir/c0287f8f3376383412f9ab239093e6f4 to your computer and use it in GitHub Desktop.
Save hamitozdemir/c0287f8f3376383412f9ab239093e6f4 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Youtube Small Thumbnails
// @namespace http://userstyles.org
// @description Youtube Small Thumbnails
// @author one_zero
// @homepage https://userstyles.org/styles/177035
// @include http://youtube.com/*
// @include https://youtube.com/*
// @include http://*.youtube.com/*
// @include https://*.youtube.com/*
// @run-at document-start
// @version 0.20191108233910
// ==/UserScript==
(function() {var css = [
"ytd-rich-item-renderer:not([is-post]) {",
" flex-basis: 210px !important;",
" margin-bottom: 24px !important;",
"}",
"",
"ytd-rich-grid-video-renderer {",
" width: 210px;",
"}",
"",
"#avatar-link {",
" display: none;",
"}",
"",
"#meta h3 {",
" margin: 8px 0 8px !important;",
"}",
"",
"#meta h3 a {",
" display: -webkit-box !important; ",
" max-height: 3.2rem !important; ",
" -webkit-box-orient: vertical !important; ",
" overflow: hidden !important; ",
" text-overflow: ellipsis !important; ",
" white-space: normal !important; ",
" -webkit-line-clamp: 2 !important; ",
" font-size: 1.4rem !important; ",
" font-weight: 500 !important; ",
" line-height: 1.6rem !important; ",
"}",
"",
"#metadata #text.ytd-channel-name,",
"#metadata-line.ytd-video-meta-block {",
" font-size: 1.3rem !important",
"}"
].join("\n");
if (typeof GM_addStyle != "undefined") {
GM_addStyle(css);
} else if (typeof PRO_addStyle != "undefined") {
PRO_addStyle(css);
} else if (typeof addStyle != "undefined") {
addStyle(css);
} else {
var node = document.createElement("style");
node.type = "text/css";
node.appendChild(document.createTextNode(css));
var heads = document.getElementsByTagName("head");
if (heads.length > 0) {
heads[0].appendChild(node);
} else {
// no head yet, stick it whereever
document.documentElement.appendChild(node);
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment