// ==UserScript==
// @name StarTube13
// @namespace http://tampermonkey.net/
// @version 1.6.0
// @description Adds a bunch of customization options for V3
// @author lightbeam24
// @match *://*.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// @license MIT
// @downloadURL none
// ==/UserScript==
(function() {
'use strict';
// Click on the "StarTube13 Settings" button on the footer to change settings.
let expRelatedThumbsSizeMedium = localStorage.getItem("expRelatedThumbsSizeMedium");
let expRelatedThumbsSizeLarge = localStorage.getItem("expRelatedThumbsSizeLarge");
let expRelatedThumbsSizeStupid = localStorage.getItem("expRelatedThumbsSizeStupid");
let expAlwaysShowCompactDate = localStorage.getItem("expAlwaysShowCompactDate");
let expMoveGuideMainSectionToTop = localStorage.getItem("expMoveGuideMainSectionToTop");
let expMoreTooltips = localStorage.getItem("expMoreTooltips");
let expMoveGuideButtonToTopbar = localStorage.getItem("expMoveGuideButtonToTopbar");
let expRelatedTabs = localStorage.getItem("expRelatedTabs");
let expRelatedTabsHoldsSubscribe = localStorage.getItem("expRelatedTabsHoldsSubscribe");
let expWatch9 = localStorage.getItem("expWatch9");
let expWatch9NoOwner = localStorage.getItem("expWatch9NoOwner");
let expWatch9TrueExpander = localStorage.getItem("expWatch9TrueExpander");
let expRelatedGrid = localStorage.getItem("expRelatedGrid");
let expWatch8 = localStorage.getItem("expWatch8");
let expWatch8NoMore = localStorage.getItem("expWatch8NoMore");
let expMoveCountsToButtons = localStorage.getItem("expMoveCountsToButtons");
let expSharrow = localStorage.getItem("expSharrow");
let expGuideAlwaysPinned = localStorage.getItem("expGuideAlwaysPinned");
let expWatch7AboutTabRename = localStorage.getItem("expWatch7AboutTabRename");
let expTwoColumnSearchResults = localStorage.getItem("expTwoColumnSearchResults");
let configNoTabTopBorder = localStorage.getItem("configNoTabTopBorder");
let configTopbarChannelLinkStyling = localStorage.getItem("configTopbarChannelLinkStyling");
let configWatch7SidebarCardShadow = localStorage.getItem("configWatch7SidebarCardShadow");
let configRecommendedGridExpandFix = localStorage.getItem("configRecommendedGridExpandFix");
let expFlatLogo = localStorage.getItem("expFlatLogo");
let expInvertLogo = localStorage.getItem("expInvertLogo");
let expGlossyLogo = localStorage.getItem("expGlossyLogo");
let expModernStyles = localStorage.getItem("expModernStyles");
let expModernTopbar = localStorage.getItem("expModernTopbar");
let expModernUpload = localStorage.getItem("expModernUpload");
let expModernGuideButton = localStorage.getItem("expModernGuideButton");
let expModernSearchIcon = localStorage.getItem("expModernSearchIcon");
let expSearchText = localStorage.getItem("expSearchText");
let expModernTitle = localStorage.getItem("expModernTitle");
let expModernGuide = localStorage.getItem("expModernGuide");
let expViewsString = localStorage.getItem("expViewsString");
let expGoogleApps = localStorage.getItem("expGoogleApps");
let expCommentsFullWidth = localStorage.getItem("expCommentsFullWidth");
if (expRelatedThumbsSizeMedium == null) {
expRelatedThumbsSizeMedium = "true";
localStorage.setItem("expRelatedThumbsSizeMedium","true");
}
if (expRelatedThumbsSizeLarge == null) {
expRelatedThumbsSizeLarge = "false";
localStorage.setItem("expRelatedThumbsSizeLarge","false");
}
if (expRelatedThumbsSizeStupid == null) {
expRelatedThumbsSizeStupid = "false";
localStorage.setItem("expRelatedThumbsSizeStupid","false");
}
if (expAlwaysShowCompactDate == null) {
expAlwaysShowCompactDate = "true";
localStorage.setItem("expAlwaysShowCompactDate","true");
}
if (expMoveGuideMainSectionToTop == null) {
expMoveGuideMainSectionToTop = "false";
localStorage.setItem("expMoveGuideMainSectionToTop","false");
}
if (expMoreTooltips == null) {
expMoreTooltips = "true";
localStorage.setItem("expMoreTooltips","true");
}
if (expMoveGuideButtonToTopbar == null) {
expMoveGuideButtonToTopbar = "false";
localStorage.setItem("expMoveGuideButtonToTopbar","false");
}
if (expRelatedTabs == null) {
expRelatedTabs = "true";
localStorage.setItem("expRelatedTabs","true");
}
if (expRelatedTabsHoldsSubscribe == null) {
expRelatedTabsHoldsSubscribe = "true";
localStorage.setItem("expRelatedTabsHoldsSubscribe","true");
}
if (expWatch9 == null) {
expWatch9 = "true";
localStorage.setItem("expWatch9","true");
}
if (expWatch9NoOwner == null) {
expWatch9NoOwner = "true";
localStorage.setItem("expWatch9NoOwner","true");
}
if (expWatch9TrueExpander == null) {
expWatch9TrueExpander = "false";
localStorage.setItem("expWatch9TrueExpander","false");
}
if (expRelatedGrid == null) {
expRelatedGrid = "false";
localStorage.setItem("expRelatedGrid","false");
}
if (expWatch8 == null) {
expWatch8 = "false";
localStorage.setItem("expWatch8","false");
}
if (expWatch8NoMore == null) {
expWatch8NoMore = "false";
localStorage.setItem("expWatch8NoMore","false");
}
if (expMoveCountsToButtons == null) {
expMoveCountsToButtons = "false";
localStorage.setItem("expMoveCountsToButtons","false");
}
if (expSharrow == null) {
expSharrow = "false";
localStorage.setItem("expSharrow","false");
}
if (expGuideAlwaysPinned == null) {
expGuideAlwaysPinned = "false";
localStorage.setItem("expGuideAlwaysPinned","false");
}
if (expWatch7AboutTabRename == null) {
expWatch7AboutTabRename = "false";
localStorage.setItem("expWatch7AboutTabRename","false");
}
if (expTwoColumnSearchResults == null) {
expTwoColumnSearchResults = "false";
localStorage.setItem("expTwoColumnSearchResults","false");
}
if (configNoTabTopBorder == null) {
configNoTabTopBorder = "true";
localStorage.setItem("configNoTabTopBorder","true");
}
if (configTopbarChannelLinkStyling == null) {
configTopbarChannelLinkStyling = "true";
localStorage.setItem("configTopbarChannelLinkStyling","true");
}
if (configWatch7SidebarCardShadow == null) {
configWatch7SidebarCardShadow = "true";
localStorage.setItem("configWatch7SidebarCardShadow","true");
}
if (configRecommendedGridExpandFix == null) {
configRecommendedGridExpandFix = "false";
localStorage.setItem("configRecommendedGridExpandFix","false");
}
if (expFlatLogo == null) {
expFlatLogo = "false";
localStorage.setItem("expFlatLogo","false");
}
if (expInvertLogo == null) {
expInvertLogo = "false";
localStorage.setItem("expInvertLogo","false");
}
if (expGlossyLogo == null) {
expGlossyLogo = "false";
localStorage.setItem("expGlossyLogo","false");
}
if (expModernStyles == null) {
expModernStyles = "false";
localStorage.setItem("expModernStyles","false");
}
if (expModernTopbar == null) {
expModernTopbar = "false";
localStorage.setItem("expModernTopbar","false");
}
if (expModernUpload == null) {
expModernUpload = "false";
localStorage.setItem("expModernUpload","false");
}
if (expModernGuideButton == null) {
expModernGuideButton = "false";
localStorage.setItem("expModernGuideButton","false");
}
if (expModernSearchIcon == null) {
expModernSearchIcon = "false";
localStorage.setItem("expModernSearchIcon","false");
}
if (expSearchText == null) {
expSearchText = "false";
localStorage.setItem("expSearchText","false");
}
if (expModernTitle == null) {
expModernTitle = "false";
localStorage.setItem("expModernTitle","false");
}
if (expModernGuide == null) {
expModernGuide = "false";
localStorage.setItem("expModernGuide","false");
}
if (expViewsString == null) {
expViewsString = "false";
localStorage.setItem("expViewsString","false");
}
if (expGoogleApps == null) {
expGoogleApps = "false";
localStorage.setItem("expGoogleApps","false");
}
if (expCommentsFullWidth == null) {
expCommentsFullWidth = "true";
localStorage.setItem("expCommentsFullWidth","true");
}
var $ = a => document.querySelector(a);
document.addEventListener("V3_NAVITRONIC_FINISHED", function(e) {
everyLoad();
});
everyLoad();
setTimeout(everyLoad, 1000); // sometimes 's attributes "reset" halfway through loading, causing some settings to not apply, this should correct that when it happens. Done twice until I find a better way to do it.
setTimeout(everyLoad, 3000);
function getRndInteger(min, max) {
return Math.floor(Math.random() * (max - min)) + min;
}
var canGo = false;
var html = document.querySelector('html');
function timeout(durationMs) {
return new Promise((resolve, reject) => {
setTimeout(function() {
resolve();
}, durationMs);
});
}
async function waitForElement(elm) {
while (null == document.querySelector(elm)) {
await new Promise(r => requestAnimationFrame(r));
}
await timeout(50).then(function() {
canGo = true;
return document.querySelector(elm);
});
}
async function waitForElement10(elm) {
while (null == document.querySelector(elm)) {
await new Promise(r => requestAnimationFrame(r));
}
await timeout(10).then(function() {
canGo = true;
return document.querySelector(elm);
});
}
var elm = "#page";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
if (expMoveGuideMainSectionToTop == "true") {
var elm = ".guide-section";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var guideSection0 = document.querySelectorAll(".guide-section")[1];
var guideSection1 = document.querySelectorAll(".guide-section")[0];
var guideSection2 = document.querySelectorAll(".guide-section")[2];
var guideSection3 = document.querySelectorAll(".guide-section")[3];
var newHome = document.querySelector('.guide-toplevel');
newHome.appendChild(guideSection0);
newHome.appendChild(guideSection1);
newHome.appendChild(guideSection2);
newHome.appendChild(guideSection3);
}
});
}
}
});
var interval = setInterval(function() {
if (expViewsString == "true") {
if ($(".watch-view-count") != null) {
if (!$(".watch-view-count").textContent.includes('views')) {
var tC = $(".watch-view-count").textContent;
$(".watch-view-count").textContent = tC + " views";
}
}
}
}, 500);
setTimeout(interval, 10);
function everyLoad() {
if (document.querySelector("#lefv3-settings-button") == null) {
var elm = "#footer";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
createExpandedFooter();
}
});
}
if (expRelatedThumbsSizeMedium == "true") {
document.querySelector("html").setAttribute("exp-related-thumbs-size-medium", "");
}
if (expRelatedThumbsSizeLarge == "true") {
document.querySelector("html").setAttribute("exp-related-thumbs-size-large", "");
}
if (expRelatedThumbsSizeStupid == "true") {
document.querySelector("html").setAttribute("exp-related-thumbs-size-stupid", "");
}
if (configNoTabTopBorder == "true") {
document.querySelector("html").setAttribute("config-no-tab-top-border", "");
}
if (configTopbarChannelLinkStyling == "true") {
document.querySelector("html").setAttribute("config-topbar-channel-link-styling", "");
}
if (configWatch7SidebarCardShadow == "true") {
document.querySelector("html").setAttribute("config-watch7-sidebar-card-shadow", "");
}
if (configRecommendedGridExpandFix == "true") {
document.querySelector("html").setAttribute("config-recommended-grid-expand-fix", "");
}
if (expRelatedTabsHoldsSubscribe == "true") {
document.querySelector("html").setAttribute("exp-related-tabs-holds-subscribe", "");
}
if (expWatch9 == "true") {
document.querySelector("html").setAttribute("exp-watch9", "");
}
if (expWatch9NoOwner == "true") {
document.querySelector("html").setAttribute("exp-watch9-no-owner", "");
}
if (expWatch9TrueExpander == "true") {
document.querySelector("html").setAttribute("exp-watch9-true-expander", "");
}
if (expGuideAlwaysPinned == "true") {
if (document.querySelector(".guide-pinning-enabled") == null) {
document.querySelector("body").classList.add("guide-pinning-enabled");
}
if (document.querySelector(".guide-pinned") == null) {
document.querySelector("body").classList.add("guide-pinned");
}
if (document.querySelector(".guide-guide") == null) {
document.querySelector("body").classList.add("show-guide");
}
}
if (expWatch8 == "true") {
document.querySelector("html").setAttribute("exp-watch8", "");
if (document.querySelector("#watch7-content.watch-content .yt-uix-button") != null) {
if (document.querySelector("#watch8-container") == null) {
if (document.querySelector("#watch7-creator-bar") != null) {
createWatch8(2);
} else {
createWatch8(1);
}
}
} else {
var elm = "#watch7-content.watch-content .yt-uix-button";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
if (document.querySelector("#watch8-container") == null) {
if (document.querySelector("#watch7-creator-bar") != null) {
createWatch8(2);
} else {
createWatch8(1);
}
}
}
});
}
}
if (expWatch8NoMore == "true") {
document.querySelector("html").setAttribute("exp-watch8-no-more", "");
}
if (expSharrow == "true") {
document.querySelector("html").setAttribute("exp-sharrow", "");
}
if (expAlwaysShowCompactDate == "true") {
document.querySelector("html").setAttribute("exp-always-show-compact-date", "");
}
if (expTwoColumnSearchResults == "true") {
document.querySelector("html").setAttribute("exp-two-column-search-results", "");
}
if (expRelatedGrid == "true") {
document.querySelector("html").setAttribute("exp-related-grid", "");
}
if (expMoveGuideButtonToTopbar == "true") {
if (document.querySelector("html[exp-move-guide-button-to-topbar]") == null) {
document.querySelector("html").setAttribute("exp-move-guide-button-to-topbar", "");
}
var elm = "#appbar-guide-button";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
if (document.querySelector("#yt-masthead #appbar-guide-button") == null) {
var theBtn = document.querySelector("#appbar-guide-button");
var newHome = document.querySelector('#yt-masthead');
newHome.insertBefore(theBtn, newHome.children[1]);
}
}
});
}
if (expMoveCountsToButtons == "true") {
if (document.querySelector("html[exp-move-counts-to-buttons]") == null) {
document.querySelector("html").setAttribute("exp-move-counts-to-buttons", "");
}
var elm = ".watch";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
if (document.querySelector(".likes-count") != null) {
var likeCount = document.querySelector(".likes-count").textContent;
var dislikeCount = document.querySelector(".dislikes-count").textContent;
document.querySelector("#watch-like .run").textContent = likeCount;
document.querySelector("#watch-dislike .yt-uix-button-content").innerHTML = `
Dislike
`;
document.querySelector("#watch-dislike .run").textContent = dislikeCount;
document.querySelector("#watch-dislike").classList.remove("yt-uix-button-empty");
}
}
});
}
if (expMoreTooltips == "true") {
if (document.querySelector("html[exp-more-tooltips]") == null) {
document.querySelector("html").setAttribute("exp-more-tooltips", "");
}
var elm = ".watch";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
if (document.querySelector(".video-extras-sparkbars") != null) {
if (document.querySelector(".video-extras-sparkbars.yt-uix-tooltip") == null) {
var percent = document.querySelector(".video-extras-sparkbar-likes").style.width;
document.querySelector(".video-extras-sparkbars").setAttribute("title", percent + " of viewers like this video");
document.querySelector(".video-extras-sparkbars").classList.add("yt-uix-tooltip");
}
}
if (document.querySelector("#watch7-user-header .yt-user-name") != null) {
if (document.querySelector("#watch7-user-header .yt-user-name.yt-uix-tooltip") == null) {
var user = document.querySelector("#watch7-user-header .yt-user-name").textContent;
document.querySelector("#watch7-user-header .yt-user-name").setAttribute("title", "View " + user + "'s channel");
document.querySelector("#watch7-user-header .yt-user-name").classList.add("yt-uix-tooltip");
document.querySelector("#watch7-user-header .yt-user-videos").setAttribute("title", "View " + user + "'s videos");
document.querySelector("#watch7-user-header .yt-user-videos").classList.add("yt-uix-tooltip");
}
}
if (document.querySelector(".yt-uix-button-subscribe-branded:not([disabled='True'])") != null) {
if (document.querySelector(".yt-uix-button-subscribe-branded:not([disabled='True']):not(.yt-uix-tooltip)") != null) {
document.querySelector(".yt-uix-button-subscribe-branded:not([disabled='True']):not(.yt-uix-tooltip)").setAttribute("title", "Subscribe");
document.querySelector(".yt-uix-button-subscribe-branded:not([disabled='True']):not(.yt-uix-tooltip)").classList.add("yt-uix-tooltip");
}
}
if (document.querySelector(".yt-uix-button-subscribed-branded:not([disabled='True'])") != null) {
if (document.querySelector(".yt-uix-button-subscribed-branded:not([disabled='True']):not(.yt-uix-tooltip)") != null) {
document.querySelector(".yt-uix-button-subscribed-branded:not([disabled='True']):not(.yt-uix-tooltip)").setAttribute("title", "Unsubscribe");
document.querySelector(".yt-uix-button-subscribed-branded:not([disabled='True']):not(.yt-uix-tooltip)").classList.add("yt-uix-tooltip");
}
}
if (document.querySelector("#watch7-secondary-actions .start") != null) {
if (document.querySelector("#watch7-secondary-actions .start.yt-uix-tooltip") == null) {
document.querySelector("#watch7-secondary-actions .start").setAttribute("title", "Video info");
document.querySelector("#watch7-secondary-actions .start").classList.add("yt-uix-tooltip");
if (expWatch7AboutTabRename == "true") {
document.querySelector("#watch7-secondary-actions .start span").textContent = "Video info";
}
}
}
}
});
if (document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(2)") != null) {
if (document.querySelector("#watch7-secondary-actions .yt-uix-button.yt-uix-tooltip:nth-child(2)") == null) {
document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(2)").setAttribute("title", "Share");
document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(2)").classList.add("yt-uix-tooltip");
}
}
if (document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(3)") != null) {
if (document.querySelector("#watch7-secondary-actions .yt-uix-button.yt-uix-tooltip:nth-child(3)") == null) {
document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(3)").setAttribute("title", "Add to");
document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(3)").classList.add("yt-uix-tooltip");
}
}
}
if (expRelatedTabs == "true") {
if (document.querySelector(".watch") != null) {
if (document.querySelector(".live_chat_box_iframe_holder") != null) {
if (document.querySelector("#related-tabs") == null) {
createRelatedTabs(1);
}
} else {
if (document.querySelector("#related-tabs") == null) {
createRelatedTabs(0);
}
}
} else {
var elm = ".watch";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
if (document.querySelector("#alt-watch9-container") == null) {
if (document.querySelector(".live_chat_box_iframe_holder") != null) {
if (document.querySelector("#related-tabs") == null) {
createRelatedTabs(1);
}
} else {
if (document.querySelector(".watch") != null) {
if (document.querySelector("#related-tabs") == null) {
createRelatedTabs(0);
}
}
}
}
}
});
}
}
if (expWatch9 == "true") {
if (document.querySelector("#watch7-content.watch-content .yt-uix-button") != null) {
if (document.querySelector("#alt-watch9-container") == null) {
if (document.querySelector("#watch7-creator-bar") != null) {
createWatch9(1);
} else {
createWatch9(0);
}
}
} else {
var elm = "#watch7-content.watch-content .yt-uix-button";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
if (document.querySelector("#alt-watch9-container") == null) {
if (document.querySelector("#watch7-creator-bar") != null) {
createWatch9(1);
} else {
createWatch9(0);
}
}
}
});
}
}
if (expFlatLogo == "true") {
document.querySelector("html").setAttribute("exp-flat-logo", "");
}
if (expInvertLogo == "true") {
document.querySelector("html").setAttribute("exp-invert-logo", "");
}
if (expGlossyLogo == "true") {
document.querySelector("html").setAttribute("exp-glossy-logo", "");
}
if (expModernStyles == "true") {
document.querySelector("html").setAttribute("exp-modern-styles", "");
}
if (expModernTopbar == "true") {
document.querySelector("html").setAttribute("exp-modern-topbar", "");
}
if (expModernUpload == "true") {
document.querySelector("html").setAttribute("exp-modern-upload", "");
}
if (expModernGuideButton == "true") {
document.querySelector("html").setAttribute("exp-modern-guide-button", "");
}
if (expModernSearchIcon == "true") {
document.querySelector("html").setAttribute("exp-modern-search-icon", "");
}
if (expSearchText == "true") {
document.querySelector("html").setAttribute("exp-search-text", "");
if ($("#masthead-search-term") != null) {
$("#masthead-search-term").setAttribute("placeholder","Search");
}
}
if (expModernTitle == "true") {
document.querySelector("html").setAttribute("exp-modern-title", "");
}
if (expModernGuide == "true") {
document.querySelector("html").setAttribute("exp-modern-guide", "");
if ($("#FEwhat_to_watch-guide-item.startube") == null) {
if ($("#FEwhat_to_watch-guide-item") != null) {
$("#FEwhat_to_watch-guide-item .display-name span").textContent = "Home";
$("#FEwhat_to_watch-guide-item").classList.add("startube");
}
}
if ($("#FEsubscriptions-guide-item.startube") == null) {
if ($("#FEsubscriptions-guide-item") != null) {
$("#FEsubscriptions-guide-item .display-name span").textContent = "Subscriptions";
$("#FEsubscriptions-guide-item").classList.add("startube");
}
}
if ($("#FEhistory-guide-item.startube") == null) {
if ($("#FEhistory-guide-item") != null) {
$("#FEhistory-guide-item .display-name span").textContent = "History";
$("#FEhistory-guide-item").classList.add("startube");
}
}
if (
$(".appbar-nav-menu") != null &&
!window.location.href.includes("feed/history") &&
!window.location.href.includes("distiller_post_history")
) {
if (
$(".home") != null ||
$(".feed") != null
) {
var elm = ".epic-nav-item-heading";
waitForElement(elm).then(function(elm) {
if (canGo != false) {
if ($(".appbar-nav-menu li:nth-child(1) .epic-nav-item-heading") != null) {
$(".appbar-nav-menu li:nth-child(1) .epic-nav-item-heading").textContent = "Home";
} else {
$(".appbar-nav-menu li:nth-child(1) .yt-uix-button-content span").textContent = "Home";
}
if ($(".appbar-nav-menu li:nth-child(2) .epic-nav-item-heading") != null) {
$(".appbar-nav-menu li:nth-child(2) .epic-nav-item-heading").textContent = "Subscriptions";
} else {
$(".appbar-nav-menu li:nth-child(2) .yt-uix-button-content span").textContent = "Subscriptions";
}
}
});
}
}
}
if (expGoogleApps == "true") {
if (document.querySelector("#yt-masthead-content") != null) {
if (document.querySelector("#google-apps") == null) {
createApps();
}
} else {
var elm = "#yt-masthead-content";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
if (document.querySelector("#google-apps") == null) {
createApps();
}
}
});
}
}
if (expCommentsFullWidth == "true") {
document.querySelector("html").setAttribute("exp-comments-full-width", "");
}
}
function createExpandedFooter() {
let container = document.querySelector('.pickers.yt-uix-button-group');
var newElem = document.createElement("li");
newElem.innerHTML = `
`;
container.insertBefore(newElem, container.children[0]);
container = document.querySelector('#footer');
newElem = document.createElement("div");
newElem.id = "footer-expanded";
newElem.classList.add("hid");
newElem.innerHTML = `
RETURN TO DEFAULTS
expRelatedThumbsSizeMedium
CustomTube medium related videos size option
expRelatedThumbsSizeLarge
Late 2016-Present
expRelatedThumbsSizeStupid
Based off the "watch feed big thumbs" experiment in Kevlar. Added as a joke, don't use this
expAlwaysShowCompactDate
Display dates on related videos without having to hover over them.
expMoveGuideMainSectionToTop
Only meant to be used with v3's regular 2013 guide.
expMoreTooltips
Adds more tooltip; Increases the amount of tooltips; Enables the tooltip tribe to be more plentiful in the site, compared to without the option enabled
expMoveGuideButtonToTopbar
Only works with the appbar enabled.
expRelatedTabs
Creates the related tabs.
expRelatedTabsHoldsSubscribe
Move the subscribe button to the related tabs area.
expWatch9
Enables the alternate universe watch9 layout (alt-watch9). Currently a little buggy without "expWatch9NoOwner". DO NOT USE WITH expWatch8.
expWatch9NoOwner
Removes the owner column from alt-watch9. Recommended if using "expRelatedTabs".
expWatch9TrueExpander
Not recommended. Makes the description work more like it does in watch7, and removes the Description tab.
expRelatedGrid
*Currently does not work with the centered layout.* Use grid view for related videos. Intended to be used with expRelatedThumbsSizeLarge.
expWatch8
Enables watch8. DO NOT USE WITH expWatch9.
expWatch8NoMore
Remove the "More" button in favor of showing all buttons at once. NOTE: V3's built-in Watch8 option would best be disabled.
expMoveCountsToButtons
Moves like and dislike counts to the buttons.
expSharrow
Use Late 2015-Onwards share icon in watch8
expGuideAlwaysPinned
Always have guide pinned. Untested with 2013 guide.
expWatch7AboutTabRename
Change "About" to "Video info" on regular watch7.
expTwoColumnSearchResults
*Currently does not work with the centered layout.* Makes search results 2 columns, instead of 1. Works best on 1920x1080 screens or better.
configNoTabTopBorder
remove blue borders on watch7 tabs
configTopbarChannelLinkStyling
style the topbar channel name as a link
configWatch7SidebarCardShadow
Add a box shadow to the related videos section if indiviual cards watch is on
configRecommendedGridExpandFix
when the recommended grid is expanded, it will remain 6 videos per row instead of changing to 5. Not necessary in the center aligned layout.
expFlatLogo
Use the 2015-2017 logo
expInvertLogo
Use the Ringo (2017-Present) logo. Also makes many UI elements a brighter red.
expGlossyLogo
Use the pre-2012 logo
expModernStyles
Enable ~2015 styling
expModernTopbar
Makes the topbar in general look more like 2015 onwards
expModernUpload
Remove the icon on the upload button (intended to be used without promintent upload button)
expModernGuideButton
Enable late 2015-Present guide button
expModernSearchIcon
Enable late 2015-Present search icon
expSearchText
Enable "Search" text placeholder on searchbar
expModernTitle
Enable smaller title text from 2016-onwards
expModernGuide
Make the guide look like it did in late 2015 onwards, also changes stuff like What to Watch to Home
expViewsString
Always show the "views" text on the view count.
expGoogleApps
Use apps button from 2015 Google
expCommentsFullWidth
Make comments take up the full width of the section, rather than being limited 640px
`;
container.insertBefore(newElem, container.children[1]);
$("#lefv3-settings-button").addEventListener("click", function() {
if ($("#footer-expanded.hid") != null) {
$("#footer-expanded").classList.remove("hid");
} else if ($("#footer-expanded.hid") == null) {
$("#footer-expanded").classList.add("hid");
}
});
if (expRelatedThumbsSizeMedium == "true") {
$("#expRelatedThumbsSizeMedium").setAttribute("checked","true");
}
if (expRelatedThumbsSizeLarge == "true") {
$("#expRelatedThumbsSizeLarge").setAttribute("checked","true");
}
if (expRelatedThumbsSizeStupid == "true") {
$("#expRelatedThumbsSizeStupid").setAttribute("checked","true");
}
if (expAlwaysShowCompactDate == "true") {
$("#expAlwaysShowCompactDate").setAttribute("checked","true");
}
if (expMoveGuideMainSectionToTop == "true") {
$("#expMoveGuideMainSectionToTop").setAttribute("checked","true");
}
if (expMoreTooltips == "true") {
$("#expMoreTooltips").setAttribute("checked","true");
}
if (expMoveGuideButtonToTopbar == "true") {
$("#expMoveGuideButtonToTopbar").setAttribute("checked","true");
}
if (expRelatedTabs == "true") {
$("#expRelatedTabs").setAttribute("checked","true");
}
if (expRelatedTabsHoldsSubscribe == "true") {
$("#expRelatedTabsHoldsSubscribe").setAttribute("checked","true");
}
if (expWatch9 == "true") {
$("#expWatch9").setAttribute("checked","true");
}
if (expWatch9NoOwner == "true") {
$("#expWatch9NoOwner").setAttribute("checked","true");
}
if (expWatch9TrueExpander == "true") {
$("#expWatch9TrueExpander").setAttribute("checked","true");
}
if (expRelatedGrid == "true") {
$("#expRelatedGrid").setAttribute("checked","true");
}
if (expWatch8 == "true") {
$("#expWatch8").setAttribute("checked","true");
}
if (expWatch8NoMore == "true") {
$("#expWatch8NoMore").setAttribute("checked","true");
}
if (expMoveCountsToButtons == "true") {
$("#expMoveCountsToButtons").setAttribute("checked","true");
}
if (expSharrow == "true") {
$("#expSharrow").setAttribute("checked","true");
}
if (expGuideAlwaysPinned == "true") {
$("#expGuideAlwaysPinned").setAttribute("checked","true");
}
if (expWatch7AboutTabRename == "true") {
$("#expWatch7AboutTabRename").setAttribute("checked","true");
}
if (expTwoColumnSearchResults == "true") {
$("#expTwoColumnSearchResults").setAttribute("checked","true");
}
if (configNoTabTopBorder == "true") {
$("#configNoTabTopBorder").setAttribute("checked","true");
}
if (configTopbarChannelLinkStyling == "true") {
$("#configTopbarChannelLinkStyling").setAttribute("checked","true");
}
if (configWatch7SidebarCardShadow == "true") {
$("#configWatch7SidebarCardShadow").setAttribute("checked","true");
}
if (configRecommendedGridExpandFix == "true") {
$("#configRecommendedGridExpandFix").setAttribute("checked","true");
}
if (expFlatLogo == "true") {
$("#expFlatLogo").setAttribute("checked","true");
}
if (expInvertLogo == "true") {
$("#expInvertLogo").setAttribute("checked","true");
}
if (expGlossyLogo == "true") {
$("#expGlossyLogo").setAttribute("checked","true");
}
if (expModernStyles == "true") {
$("#expModernStyles").setAttribute("checked","true");
}
if (expModernTopbar == "true") {
$("#expModernTopbar").setAttribute("checked","true");
}
if (expModernUpload == "true") {
$("#expModernUpload").setAttribute("checked","true");
}
if (expModernGuideButton == "true") {
$("#expModernGuideButton").setAttribute("checked","true");
}
if (expModernSearchIcon == "true") {
$("#expModernSearchIcon").setAttribute("checked","true");
}
if (expSearchText == "true") {
$("#expSearchText").setAttribute("checked","true");
}
if (expModernTitle == "true") {
$("#expModernTitle").setAttribute("checked","true");
}
if (expModernGuide == "true") {
$("#expModernGuide").setAttribute("checked","true");
}
if (expViewsString == "true") {
$("#expViewsString").setAttribute("checked","true");
}
if (expGoogleApps == "true") {
$("#expGoogleApps").setAttribute("checked","true");
}
if (expCommentsFullWidth == "true") {
$("#expCommentsFullWidth").setAttribute("checked","true");
}
doListen();
function doListen() {
let i = 0;
for (i = 0; i < document.querySelectorAll(".lb-setting").length; i++) {
document.querySelectorAll(".lb-setting")[i].onclick = function(e)
{
e.preventDefault();
var thisElm = this;
changeSetting(thisElm);
};
}
}
function changeSetting(thisElm) {
var theSetting = thisElm.getAttribute("id");
var checked = thisElm.getAttribute("checked");
if (theSetting == "RTD") {
localStorage.removeItem("expRelatedThumbsSizeMedium");
localStorage.removeItem("expRelatedThumbsSizeLarge");
localStorage.removeItem("expRelatedThumbsSizeStupid");
localStorage.removeItem("expAlwaysShowCompactDate");
localStorage.removeItem("expMoveGuideMainSectionToTop");
localStorage.removeItem("expMoreTooltips");
localStorage.removeItem("expMoveGuideButtonToTopbar");
localStorage.removeItem("expRelatedTabs");
localStorage.removeItem("expRelatedTabsHoldsSubscribe");
localStorage.removeItem("expWatch9");
localStorage.removeItem("expWatch9NoOwner");
localStorage.removeItem("expWatch9TrueExpander");
localStorage.removeItem("expRelatedGrid");
localStorage.removeItem("expWatch8");
localStorage.removeItem("expWatch8NoMore");
localStorage.removeItem("expMoveCountsToButtons");
localStorage.removeItem("expSharrow");
localStorage.removeItem("expGuideAlwaysPinned");
localStorage.removeItem("expWatch7AboutTabRename");
localStorage.removeItem("expTwoColumnSearchResults");
localStorage.removeItem("configNoTabTopBorder");
localStorage.removeItem("configTopbarChannelLinkStyling");
localStorage.removeItem("configWatch7SidebarCardShadow");
localStorage.removeItem("configRecommendedGridExpandFix");
localStorage.removeItem("expFlatLogo");
localStorage.removeItem("expInvertLogo");
localStorage.removeItem("expGlossyLogo");
localStorage.removeItem("expModernStyles");
localStorage.removeItem("expModernTopbar");
localStorage.removeItem("expModernUpload");
localStorage.removeItem("expModernGuideButton");
localStorage.removeItem("expModernSearchIcon");
localStorage.removeItem("expSearchText")
localStorage.removeItem("expModernTitle");
localStorage.removeItem("expModernGuide");
localStorage.removeItem("expViewsString");
localStorage.removeItem("expGoogleApps");
localStorage.removeItem("expCommentsFullWidth");
window.location.reload();
} else {
if (checked == "true") {
localStorage.setItem(theSetting,"false");
thisElm.setAttribute("checked","false");
} else {
localStorage.setItem(theSetting,"true");
thisElm.setAttribute("checked","true");
}
}
}
}
function createWatch8(number) {
if (document.querySelector(".cardified-page.exp-individual-cards-watch") == null) {
number++;
}
let container = document.querySelector('#watch7-content.watch-content .yt-uix-button-panel');
var altWatch9 = document.createElement("div");
altWatch9.id = "watch8-container";
altWatch9.setAttribute("state","none");
altWatch9.innerHTML = `
Add to
Share
Statistics
Transcript
Report
More
Statistics
Transcript
Channel videos
`;
container.insertBefore(altWatch9, container.children[number]);
if (document.querySelector(".cardified-page") != null) {
document.querySelector("#watch8-desc").setAttribute("class","yt-card yt-card-no-padding");
document.querySelector("#watch8-share").setAttribute("class","yt-card yt-card-no-padding");
document.querySelector("#watch8-stats").setAttribute("class","yt-card yt-card-no-padding");
document.querySelector("#watch8-transcript").setAttribute("class","yt-card yt-card-no-padding");
document.querySelector("#watch8-actions-row").setAttribute("class","yt-card yt-card-no-padding");
}
var elm = "#watch8-container";
waitForElement(elm).then(function(elm) {
if (canGo != false) {
if (document.querySelector("#watch8-sentiment-actions #watch7-sentiment-actions") == null) {
var elm = "#eow-description";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector("#watch7-sentiment-actions");
var newHome5 = document.querySelector('#watch8-sentiment-actions');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
if (document.querySelector("#watch8-desc #action-panel-details") == null) {
var elm = "#eow-description";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector("#action-panel-details");
var newHome5 = document.querySelector('#watch8-desc');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
if (document.querySelector("#watch9-share #action-panel-share") == null) {
document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(2)").click();
}
if (document.querySelector("#watch8-desc #action-panel-share") == null) {
var elm = "#eow-description";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector("#action-panel-share");
var newHome5 = document.querySelector('#watch8-share');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
if (document.querySelector("#watch7-secondary-actions .hid.yt-uix-button:nth-child(4)") == null) {
if (document.querySelector("#watch9-share #action-panel-transcript") == null) {
document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(4)").click();
}
if (document.querySelector("#watch8-desc #action-panel-transcript") == null) {
var elm = ".watch-transcript";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector("#action-panel-transcript");
var newHome5 = document.querySelector('#watch8-transcript');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
}
if (document.querySelector("#watch9-share #action-panel-stats") == null) {
document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(5)").click();
}
if (document.querySelector("#watch8-desc #action-panel-stats") == null) {
var elm = ".metric-label";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector("#action-panel-stats");
var newHome5 = document.querySelector('#watch8-stats');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
if (document.querySelector("#watch9-addto #action-panel-addto") == null) {
document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(3)").click();
}
if (document.querySelector("#watch8-addto #action-panel-addto") == null) {
var elm = ".playlist-items";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector("#action-panel-addto");
var newHome5 = document.querySelector('#watch8-addto');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
var nonfloater = document.querySelector("#nonfloater");
var addTo = document.querySelector("#addto.watch8-action");
var share = document.querySelector("#share.watch8-action");
var stats = document.querySelector("#stats.watch8-menuitem");
var stats2 = document.querySelector("#stats.watch8-button");
var transcript = document.querySelector("#transcript.watch8-menuitem");
var transcript2 = document.querySelector("#transcript.watch8-button");
var moreActions = document.querySelector("#more-actions.watch8-action");
var showScroller = document.querySelector("#channel-videos.watch8-action");
var close = document.querySelector("#watch8-close button");
if (document.querySelector("#watch7-secondary-actions .hid.yt-uix-button:nth-child(4)") != null) {
document.querySelector("#transcript.watch8-button").classList.add("hid");
document.querySelector("#transcript.watch8-menuitem").setAttribute("visible","false");
}
nonfloater.addEventListener("click", function() {
document.querySelector("#watch8-addto").setAttribute("visible", "false");
document.querySelector("#watch8-more").setAttribute("visible", "false");
document.querySelector("#nonfloater").setAttribute("visible", "false");
document.querySelector("#watch8-container").setAttribute("addto-visible", "false");
document.querySelector("#watch8-container").setAttribute("more-visible", "false");
});
addTo.addEventListener("click", function() {
if (document.querySelector("#watch8-addto[visible='false']") != null) {
document.querySelector("#watch8-addto").setAttribute("visible", "true");
document.querySelector("#nonfloater").setAttribute("visible", "true");
document.querySelector("#watch8-container").setAttribute("addto-visible", "true");
} else {
document.querySelector("#watch8-addto").setAttribute("visible", "false");
document.querySelector("#nonfloater").setAttribute("visible", "false");
document.querySelector("#watch8-container").setAttribute("addto-visible", "false");
}
});
share.addEventListener("click", function() {
if (document.querySelector("#watch8-container[state='share']") != null) {
document.querySelector("#watch8-container").setAttribute("state", "none");
} else {
document.querySelector("#watch8-container").setAttribute("state", "share");
}
});
moreActions.addEventListener("click", function() {
if (document.querySelector("#watch8-more[visible='false']") != null) {
document.querySelector("#watch8-more").setAttribute("visible", "true");
document.querySelector("#nonfloater").setAttribute("visible", "true");
document.querySelector("#watch8-container").setAttribute("more-visible", "true");
} else {
document.querySelector("#watch8-more").setAttribute("visible", "false");
document.querySelector("#nonfloater").setAttribute("visible", "false");
document.querySelector("#watch8-container").setAttribute("more-visible", "false");
}
});
stats.addEventListener("click", function() {
document.querySelector("#watch8-more").setAttribute("visible", "false");
document.querySelector("#nonfloater").setAttribute("visible", "false");
document.querySelector("#watch8-container").setAttribute("more-visible", "false");
if (document.querySelector("#watch8-container[state='stats']") != null) {
document.querySelector("#watch8-container").setAttribute("state", "none");
} else {
document.querySelector("#watch8-container").setAttribute("state", "stats");
}
});
stats2.addEventListener("click", function() {
if (document.querySelector("#watch8-container[state='stats']") != null) {
document.querySelector("#watch8-container").setAttribute("state", "none");
} else {
document.querySelector("#watch8-container").setAttribute("state", "stats");
}
});
transcript.addEventListener("click", function() {
document.querySelector("#watch8-more").setAttribute("visible", "false");
document.querySelector("#nonfloater").setAttribute("visible", "false");
document.querySelector("#watch8-container").setAttribute("more-visible", "false");
if (document.querySelector("#watch8-container[state='transcript']") != null) {
document.querySelector("#watch8-container").setAttribute("state", "none");
} else {
document.querySelector("#watch8-container").setAttribute("state", "transcript");
}
});
transcript2.addEventListener("click", function() {
if (document.querySelector("#watch8-container[state='transcript']") != null) {
document.querySelector("#watch8-container").setAttribute("state", "none");
} else {
document.querySelector("#watch8-container").setAttribute("state", "transcript");
}
});
close.addEventListener("click", function() {
document.querySelector("#watch8-container").setAttribute("state", "none");
});
var elm = "#watch-uploader-info";
waitForElement(elm).then(function(elm) {
if (canGo != false) {
// applyMetadata();
}
});
function applyMetadata() {
}
}
});
}
function createWatch9(number) {
let container = document.querySelector('#watch7-content.watch-content');
var altWatch9 = document.createElement("div");
altWatch9.id = "alt-watch9-container";
altWatch9.innerHTML = `