Some fixes for Youtube polymer engine
Od
// ==UserScript==
// @name Youtube polymer engine fixes
// @description Some fixes for Youtube polymer engine
// @namespace bo.gd.an[at]rambler.ru
// @version 0.1
// @match https://www.youtube.com/*
// @compatible firefox 56
// @author Bogudan
// @grant none
// @run-at document-end
// ==/UserScript==
(function() {
'use strict';
// hide "guide" menu
var guide_button=document.getElementById('guide-button');
if(guide_button){
var tmp=guide_button.getElementsByTagName('button');
if(tmp.length) {
tmp=tmp[0].attributes;
if(tmp&&tmp['aria-pressed'].value=='true')
guide_button.click();
}
}
//var contents_div=document.getElementById('contents');if(contents_div)contents_div.style.setProperty('--ytd-rich-grid-items-per-row','6'); -- fixed through ytd-rich-item-renderer style
// styles
var style_element=document.createElement('style');
style_element.type='text/css';
style_element.innerHTML=
// decrease text sizes
'#video-title.ytd-rich-grid-video-renderer,#text.ytd-channel-name,#metadata-line.ytd-video-meta-block{font-size:14px!important;line-height:1.2em!important}'+
// fix: home page thumbnails size (1/3 of original image sizes)
'ytd-rich-item-renderer{width:240px!important}'+
// fix: "not interested" placeholder bigger than original element by about 40%
'paper-button.style-blue-text{padding:0!important}';
document.body.appendChild(style_element);
})();