Youtube 2020 improvements

All Youtube improvements in one pack

目前為 2020-07-30 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Youtube 2020 improvements
// @version      0.1
// @description  All Youtube improvements in one pack
// @author       Burlaka.net
// @match        *://*.youtube.com/*
// @match        *://youtube.com/*
// @require      https://code.jquery.com/jquery-latest.js
// @grant        none
// @namespace    http://tampermonkey.net/
// ==/UserScript==

(function() {
    'use strict';

  //$('#container.ytd-masthead').css('height','40px');
  $('#page-manager.ytd-app').css('margin-top', '40px');
  //$('.html5-video-player').css('width', '854px').css('margin', '0 auto');
  //$('.html5-video-player').css('width', '500px').css('margin', '0 auto');

  // comment autoexpand onmouseover
  $(document).on('mouseover', '.ytd-item-section-renderer .ytd-comment-renderer ytd-expander', function(e) {
    var $this = $(this);
    $this.removeAttr('collapsed');
    $this.parent().find('#more').addAttr('hidden');
  });

  // video info autoexpand onmouseover
  $(document).on('mouseover', 'ytd-expander.ytd-video-secondary-info-renderer', function(e) {
    var $this = $(this);
    $this.removeAttr('collapsed');
    $this.find('#collapsible').removeAttr('hidden');
    $this.find('#less').removeAttr('hidden');
    $this.find('#more').addAttr('hidden');
  });
})();