// ==UserScript== // @id 5a3ebe9b-d73f-4397-a5c3-7a382723c39e // @name [BETA VERSION] Youtube - Right Side Description // @namespace Takato // @author Takato // @copyright 2010+, Takato (https://greasyfork.org/users/1158/) // @licence Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International - Additional conditions apply; https://greasyfork.org/scripts/976/ // @description Moves the video description to the right of the video (like it used to be 2009 and earlier) and makes a few 2009ish style tweaks to the video page. // @icon https://i.imgur.com/RAHw2kQ.png https://i.imgur.com/qlQhuaa.png // @icon64 https://i.imgur.com/qlQhuaa.png // @resource icon https://i.imgur.com/RAHw2kQ.png // @resource icon64 https://i.imgur.com/RAHw2kQ.png // @version 2017.12.18 // @require https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js // @website https://greasyfork.org/scripts/32695/ // @noframes // @grant GM_getValue // @grant GM_setValue // @grant GM_deleteValue // @grant GM_addStyle // @grant GM_getResourceURL // @run-at document-start // @include *//www.youtube.com/* // @downloadURL none // ==/UserScript== // This script is licenced under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-nc-sa/4.0/) with additional conditions. // See https://greasyfork.org/scripts/976/ for full details of the licence and conditions. var script = {}; script.version = "2017.12.18"; // SETTINGS ----------------------------- // Main settings: Available by clicking "More" below the video. // - Toggle 'retro style' // -------------------------------------- // Everything below this line shouldn't be edited unless you are a coder. All settings are listed above. // Defining static script properties script.name = "Right Side Description [BETA]"; // Previously known as Better Watch Page script.shortname = "RSD Beta"; script.website = "https://greasyfork.org/scripts/32695/"; script.discussion = "https://greasyfork.org/scripts/32695/feedback"; script.icon = GM_getResourceURL("icon"); script.icon64 = GM_getResourceURL("icon64"); script.mainCSS = " ytd-masthead:not(:hover) #bwp-retrostyle-toggle {display:none;} /* Title */ ytd-watch:not([theater]) #top.ytd-watch {margin-top:10px;} ytd-watch:not([theater]) #rsd-title {margin-bottom:5px;} ytd-watch[theater] #rsd-title, ytd-watch:not([theater]) ytd-video-primary-info-renderer h1.title {display:none;} /* Sidebar */ #meta.rsd-description {width:auto; padding-right:0; order:0;} ytd-video-secondary-info-renderer {max-height:390px; overflow:auto; width:auto; padding-top:0; padding-bottom:0; margin-right: 0 !important; background-color:var(--yt-playlist-background-item); padding:8px; border-bottom-width:0px;} @media screen and (min-width: 1000px) { ytd-video-secondary-info-renderer {margin-left:-14px;} } ytd-video-secondary-info-renderer #subscribe-button.ytd-video-secondary-info-renderer {justify-content: start; } ytd-video-secondary-info-renderer #subscribe-button.ytd-video-secondary-info-renderer ytd-subscribe-button-renderer {justify-content: start;} ytd-video-secondary-info-renderer #subscribe-button.ytd-video-secondary-info-renderer paper-button {padding:4px 10px;} ytd-video-secondary-info-renderer #subscribe-button.ytd-video-secondary-info-renderer ytd-toggle-button-renderer {--yt-button-icon-size:24px; --yt-button-icon-padding:0px;} ytd-video-secondary-info-renderer ytd-expander.description.ytd-video-secondary-info-renderer {margin-left:0; max-width:100%; font-size:1.3rem; line-height:normal;} ytd-video-secondary-info-renderer #less {display:none;} ytd-video-secondary-info-renderer #title.ytd-metadata-row-renderer {width:auto; font-size:1.1rem; line-height:normal;} ytd-video-secondary-info-renderer .content.ytd-metadata-row-renderer {width:auto; font-size:1.1rem; line-height:normal; white-space:normal;} #playlist.ytd-watch {margin-bottom:16px;} /* Below Video */ ytd-video-primary-info-renderer #info #menu-container {order:1;} ytd-video-primary-info-renderer #info #flex {order:2;} ytd-video-primary-info-renderer #info #rsd-likecountgroup {order:3; text-align:right;} #rsd-likecountgroup #sentiment {position:static;} "; script.retroCSS = " /*Retro CSS*/ body:not([dark]) :not([style-scope]):not(.style-scope) {--yt-main-app-background: white;} body, input, textarea, select {font-family:arial,sans-serif;} #masthead-container.ytd-app::after {display:none;} #masthead {border-bottom: 1px solid var(--yt-swatch-primary-darker);} #container.ytd-masthead {height:49px;} /*#logo-icon.ytd-topbar-logo-renderer {background:url(https://s.ytimg.com/yt/img/master.png) 0px -641px; } #logo-icon.ytd-topbar-logo-renderer svg {visibility:hidden;} #logo-icon.ytd-topbar-logo-renderer {width:99px; height:42px;}*/ ytd-topbar-logo-renderer #country-code {display:none;} #page-manager.ytd-app {margin-top: 49px;} ytd-watch:not([theater]) #top.ytd-watch {margin-top:6px;} #rsd-title h1 {font-size:19px; font-weight:bold;} @media screen and (min-width: 1000px) { ytd-watch:not([theater]) #playlist.ytd-watch {margin-top:-30px; margin-bottom:40px;} ytd-watch:not([theater]) #meta.rsd-description {margin-top:-30px;} } ytd-video-secondary-info-renderer {background:#EEEEEE; border:1px solid #CCCCCC; font-size:12px; padding:6px; margin-bottom:8px;} body[dark] ytd-video-secondary-info-renderer {background:var(--yt-playlist-background-item); border-color:var(--yt-border-color);} ytd-video-secondary-info-renderer a.yt-simple-endpoint:not(.ytd-button-renderer), ytd-video-secondary-info-renderer a.yt-simple-endpoint:not(.ytd-button-renderer):hover {color:#0033CC;} body[dark] ytd-video-secondary-info-renderer a.yt-simple-endpoint:not(.ytd-button-renderer), body[dark] ytd-video-secondary-info-renderer a.yt-simple-endpoint:not(.ytd-button-renderer):hover {color:var(--yt-endpoint-color);} ytd-video-secondary-info-renderer #top-row.ytd-video-secondary-info-renderer {margin-bottom:2px; } ytd-video-secondary-info-renderer #avatar.ytd-video-owner-renderer {border-radius:0; border:1px solid white; outline:1px solid #999999; margin:1px; margin-right:7px;} body[dark] ytd-video-secondary-info-renderer #avatar.ytd-video-owner-renderer {outline-color:#1b1b1b; border-color:var(--yt-border-color);} ytd-video-secondary-info-renderer #upload-info.ytd-video-owner-renderer {justify-content:flex-start;} ytd-video-secondary-info-renderer #upload-info.ytd-video-owner-renderer > * {height:18px;} ytd-video-secondary-info-renderer #owner-name.ytd-video-owner-renderer {font-weight:bold; font-size:1em;} ytd-video-secondary-info-renderer #upload-info.ytd-video-owner-renderer .date.ytd-video-secondary-info-renderer { font-size:1em; color:var(--yt-primary-text-color); } ytd-video-secondary-info-renderer ytd-expander.description.ytd-video-secondary-info-renderer {font-size:1em; line-height:normal;} ytd-video-secondary-info-renderer ytd-metadata-row-container-renderer {border-top:1px solid #CCCCCC; padding-top:2px; margin-top:8px;} body[dark] ytd-video-secondary-info-renderer ytd-metadata-row-container-renderer {border-color:var(--yt-border-color);} ytd-video-secondary-info-renderer ytd-metadata-row-renderer {margin:0; margin-top:2px; } ytd-video-secondary-info-renderer #title.ytd-metadata-row-renderer {width:auto; font-size:0.9em; line-height:normal;} ytd-video-secondary-info-renderer .content.ytd-metadata-row-renderer {width:auto; font-size:0.9em; line-height:normal; white-space:normal;} #player.ytd-watch {margin-bottom:30px;} ytd-watch[theater] #player.ytd-watch {margin-bottom:46px;} #player-container {padding-bottom:30px; overflow:hidden;} #movie_player:not(.ytp-fullscreen) {overflow:visible; contain: layout style size;} #movie_player:not(.ytp-fullscreen) .ytp-player-content, #movie_player:not(.ytp-fullscreen) .ytp-settings-menu {bottom:8px;} #movie_player:not(.ytp-fullscreen) .ytp-player-content.html5-endscreen {bottom:39px; top:28px;} #movie_player:not(.ytp-fullscreen) .ytp-bottom {bottom:14px; top:auto !important;} #movie_player:not(.ytp-fullscreen) .ytp-gradient-bottom {display:none;} #movie_player:not(.ytp-fullscreen) .ytp-chrome-bottom { background-color:#ccc; color:#000; text-shadow:none; border:0px solid #ccc; border-width: 0px 12px 0 12px; left:0 !important; opacity:1; bottom:-30px; height:27px;} #movie_player:not(.ytp-fullscreen) .ytp-progress-bar-container {bottom:27px;} #movie_player:not(.ytp-fullscreen) .ytp-progress-list {transform-origin:center bottom !important; background-color:#444; margin-left:-12px; } #movie_player:not(.ytp-fullscreen) .ytp-progress-bar-container:not(:hover) .ytp-progress-list {width:calc(100% + 24px) !important; } #movie_player:not(.ytp-fullscreen) .ytp-progress-bar-container:hover .ytp-progress-list {border:0px solid transparent; border-width:0px 12px 0px 12px; margin-right:-12px;} #movie_player:not(.ytp-fullscreen) .ytp-chrome-controls {padding-left:0; padding-right:0; margin-left:-12px; margin-right:-12px; height:27px; line-height:27px;} #movie_player:not(.ytp-fullscreen) .ytp-time-display {height:34px; margin-top:-3px; font-size:95%; line-height:34px;} #movie_player:not(.ytp-fullscreen) .ytp-time-separator, #movie_player:not(.ytp-fullscreen) .ytp-time-duration {color:#666;} #movie_player:not(.ytp-fullscreen) .ytp-chrome-controls .ytp-button, #movie_player:not(.ytp-fullscreen) .ytp-chrome-controls .ytp-volume-panel {color:#4d4d4d; opacity:1; height:34px; margin-top:-3px;} #movie_player:not(.ytp-fullscreen) .ytp-chrome-controls .ytp-volume-panel .ytp-volume-slider-handle:before, #movie_player:not(.ytp-fullscreen) .ytp-chrome-controls .ytp-volume-panel .ytp-volume-slider-handle, #movie_player:not(.ytp-fullscreen) .ytp-chrome-controls .ytp-volume-panel .ytp-volume-slider-handle:after {background-color:#4d4d4d;} #movie_player:not(.ytp-fullscreen) .ytp-chrome-controls .ytp-volume-panel .ytp-volume-slider-handle:after {opacity:0.35;} #movie_player:not(.ytp-fullscreen) .ytp-chrome-controls .ytp-button:hover {color:#3d3d3d;} #movie_player:not(.ytp-fullscreen) .ytp-chrome-controls .ytp-button .ytp-svg-fill, #movie_player:not(.ytp-fullscreen) .ytp-chrome-controls .ytp-button path[fill='#fff'] {fill:currentColor;} #movie_player:not(.ytp-fullscreen) .ytp-chrome-controls .ytp-button .ytp-svg-shadow {stroke:none;} body[dark] #movie_player:not(.ytp-fullscreen) .ytp-chrome-bottom {background-color:#1b1b1b; color:#fff; border-color:#1b1b1b;} body[dark] #movie_player:not(.ytp-fullscreen) .ytp-time-separator, body[dark] #movie_player:not(.ytp-fullscreen) .ytp-time-duration {color:#999;} body[dark] #movie_player:not(.ytp-fullscreen) .ytp-chrome-controls .ytp-button, body[dark] #movie_player:not(.ytp-fullscreen) .ytp-chrome-controls .ytp-volume-panel {color:#8E8E8E; } body[dark] #movie_player:not(.ytp-fullscreen) .ytp-chrome-controls .ytp-volume-panel .ytp-volume-slider-handle:before, body[dark] #movie_player:not(.ytp-fullscreen) .ytp-chrome-controls .ytp-volume-panel .ytp-volume-slider-handle, body[dark] #movie_player:not(.ytp-fullscreen) .ytp-chrome-controls .ytp-volume-panel .ytp-volume-slider-handle:after {background-color:#8E8E8E;} body[dark] #movie_player:not(.ytp-fullscreen) .ytp-chrome-controls .ytp-button:hover {color:#EBEBEB;} "; // Defining dynamic script properties script.cssMainLoaded = null; script.cssRetroLoaded = null; script.forceControlsTimer = null; script.forceControlsListener = null; script.watchSetupDone = false; // Experimental settings may be removed. Changing these will likely disable automatic update checks in your script manager script.applyStyleEverywhere = false; // - Apply style to all pages instead of just 'watch' pages. (default is false) function prepareTemplates() { //console.log("prepareTemplates"); t("ytd-watch", function(){ // Add top title spot $('
').prependTo( $("#top", this) ); // Move description & channel details to the right-side column var oldMeta = $("#meta",this).addClass("rsd-description"); var newMeta = oldMeta[0].outerHTML; oldMeta.remove(); $(newMeta).prependTo( $("#related", this) ); }); t("ytd-video-secondary-info-renderer", function() { //$("ytd-expander",this).attr("collapsed","[[!collapsed_]]"); // invert the collapse status, open description by default }); t("ytd-video-primary-info-renderer",function(){ // Group viewcount and likes $("").appendTo( $("#info", this) ); var oldCount = $("#count",this); var newCount = oldCount[0].outerHTML; oldCount.remove(); $(newCount).appendTo( $("#rsd-likecountgroup",this) ); var oldBar = $("ytd-sentiment-bar-renderer",this); var newBar = oldBar[0].outerHTML; oldBar.remove(); $(newBar).appendTo( $("#rsd-likecountgroup",this) ); }); } function pageSetup() { //console.log("pageFirstRun"); $(document).on("yt-navigate", prepareTemplates); $(document).on("yt-navigate-done", prepareTemplates); $(document.createElement("div")) .attr("id", "bwp-retrostyle-toggle") .attr("class", "style-scope ytd-menu-renderer style-default") .attr("is-icon-button", "") .attr("button-renderer","") .attr("hidden","hidden") .html("