// ==UserScript== // @name StarTube // @namespace http://tampermonkey.net/ // @version 2.0.1 // @description Adds a bunch of customization options to 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'; let currStarVer = "2.0.1"; let starTubeConfigCreated = localStorage.getItem("starTubeConfigCreated"); if (starTubeConfigCreated == null) { starTubeConfigCreated = currStarVer; } var $ = a => document.querySelector(a); var STH = { WMR_ACTIONS: `
Share
Save
` }; let globalDataPoints = { dummy: "" }; var V3_SETTINGS = localStorage.getItem("v3_local_db"); V3_SETTINGS = JSON.parse(V3_SETTINGS); var V3_SETTINGS_CONF = V3_SETTINGS.config.db.yt; var STS = localStorage.getItem("ST_SETTINGS"); var defaultConfigs = { "polymerWarningBanner": true, "expRelatedThumbsSizeMedium": true, "expRelatedThumbsSizeLarge": false, "expRelatedThumbsSizeStupid": false, "expAlwaysShowCompactDate": true, "expMoveGuideMainSectionToTop": false, "expMoreTooltips": true, "expMoveGuideButtonToTopbar": false, "expRelatedTabs": true, "expRelatedTabsHoldsSubscribe": true, "expWatch9": true, "expWatch9NoOwner": true, "expWatch9TrueExpander": false, "expVerticalWatch9": false, "expWatch9SidebarBus": false, "expWatch9StickyColumns": false, "expWatch9ReportTab": true, "expRelatedGrid": false, "expWatch8": false, "expWatch8NoMore": false, "expMoveCountsToButtons": false, "expSharrow": false, "expGuideAlwaysPinned": false, "expWatch7AboutTabRename": false, "expWatch7AboutTabRename2": false, "expTwoColumnSearchResults": false, "configNoTabTopBorder": true, "configWatch7SidebarCardShadow": true, "expFlatLogo": false, "expInvertLogo": false, "expGlossyLogo": false, "expClassicTitle": false, "expClassicGuide": false, "expClassicSubscribe": false, "expClassicStyles": false, "expClassicLtod": false, "expClassicButtons": false, "expBigSearchThumbs": false, "expBiggerSearchThumbs": false, "expModernStyles": false, "expModernTopbar": false, "expModernUpload": false, "expModernGuideButton": false, "expModernSearchIcon": false, "expSearchText": false, "expModernTitle": false, "expModernGuide": false, "expModernHome": false, "expTrueScrollableGuide": false, "expModernPlayer": false, "expModernPlayerV2": false, "expViewsString": true, "expGoogleApps": false, "expCommentsFullWidth": true, "expNoByText": false, "expAccountMenu": false, "expStaticSite": false, "expHideAppbar": false, "expEpicWatch7": false, "expEpicWatch7Flat": false, "expEpicHeader": false, "expEpicStyling": false, "expCosmicHeader": false, "expCosmicBG": false, "expCosmicButtons": false, "expCosmicStyles": false, "expCosmicComments": false, "expCosmicGuideStyle": false, "expCosmicGuideLayout": false, "expCosmicFeedsV1": false, "expWatch5D": false, "expNoGuide": false, "expGuideOnFeedsOnly": false, "expAozoraHome": false, "expAozoraHeader": false, "expAozoraBG": false, "expAozoraStyles": false, "expAozoraSubscribe": false, "expAozoraTopbarLinks": false, "expWatch5C": false, "expHomeTab": false, "expRoboto": false, "expCenteredSearch": false, "expBigSearch": false, "expSecondarySearchIcon": false, "expMaterialSearch": false, "expPolymerShell": false, "expEarlyPolymerShell": false, "expEarlyPolymerGuide": false, "expPolymerGen2Colors": false, "expPolymerSubscribe": false, "expPolymerGen2Subscribe": false, "expPolymerStyles": false, "expPolymerChannels": false, "expPolymerComments": false, "expPolymerTooltips": false, "expWatch9A": false, "expWatch9B": false, "expWatch10Beta": false, "expWMRButtonsLowercase": false, "expOutlineIcons": false, "expRichGridHome": false, "expRoundedTopbarPfp": false, "expUploadIcon": false, "presetAozora2011": false, "presetEpicPanda": false, "presetCosmicPanda": false, "presetHitchhiker2013_1": false, "presetHitchhiker2013_1Alt": false, "presetHitchhiker2013_2": false, "presetHitchhiker2013_2Alt": false, "presetHitchhiker2013_3": false, "presetHitchhiker2013_3Alt": false, "presetHitchhiker2014": false, "presetHitchhiker2014Alt": false, "presetHitchhiker2015": false, "presetHitchhiker2015Alt": false, "presetHitchhiker2016": false, "presetHitchhiker2016Alt": false, "presetHitchhiker2017": false, "presetHitchhiker2017Alt": false, "presetPolymer2016": false, "presetPolymer2019": false, "presetPolymer2020": false, "presetPolymer2021": false, "presetPolymer2022": false, "STPresetsAlsoSetV3Settings": true, "expHomepageRedirectsToFeed": false, "expLogoLinksToFeed": false, "expLogoLinksToSubs": false, "show2point0": true, "expHideYoodles": false, "expFixedShareIcons": true, "expFixedXIcon": true, "expMaterialGbar": false, }; if (STS == null) { STS = defaultConfigs; } else { try { STS = JSON.parse(STS); applyNewSettings(); } catch(err) { console.log("It looks like you had a bad config. Your settings have been reset."); STS = defaultConfigs; applySettings(); } } function applySettings() { localStorage.setItem("ST_SETTINGS",JSON.stringify(STS)); } function applyNewSettings() { if (STS.expPolymerComments == true) { STS.expModernStyles = false; } if (STS.show2point0 == null) { STS.show2point0 = true; } if ( STS.expFixedXIcon == null || STS.expFixedShareIcons == null || STS.expMaterialGbar == null || STS.expRoundedTopbarPfp == null || STS.expUploadIcon == null || STS.expNoByText == null || STS.expAccountMenu == null || STS.expWatch9ReportTab == null || STS.expPolymerGen2Subscribe == null || STS.expPolymerGen2Colors == null || STS.expWMRButtonsLowercase == null || STS.expRichGridHome == null || STS.expClassicGuide == null || STS.expClassicSubscribe == null || STS.expClassicStyles == null || STS.expClassicLtod == null || STS.expClassicButtons == null || STS.expAozoraHeader == null || STS.expAozoraBG == null || STS.expAozoraStyles == null || STS.expAozoraSubscribe == null || STS.expAozoraTopbarLinks == null || STS.expWatch5C == null || STS.presetAozora2011 == null || STS.presetHitchhiker2013_1 == null || STS.presetHitchhiker2013_1Alt == null || STS.presetHitchhiker2013_2 == null || STS.presetHitchhiker2013_2Alt == null || STS.presetPolymer2020 == null ) { STS.expFixedXIcon = true; STS.expFixedShareIcons = true; STS.expMaterialGbar = false; STS.expRoundedTopbarPfp = false; STS.expUploadIcon = false; STS.expNoByText = false; STS.expAccountMenu = false; STS.expWatch9ReportTab = false; STS.expPolymerGen2Subscribe = false; STS.expPolymerGen2Colors = false; STS.expWMRButtonsLowercase = false; STS.expClassicGuide = false; STS.expClassicSubscribe = false STS.expClassicStyles = false; STS.expClassicGuide = false; STS.expClassicButtons = false; STS.expRichGridHome = false; STS.expAozoraHeader = false; STS.expAozoraBG = false; STS.expAozoraStyles = false; STS.expAozoraSubscribe = false; STS.expAozoraTopbarLinks = false; STS.expWatch5C = false; STS.presetAozora2011 = false; STS.presetHitchhiker2013_1 = false; STS.presetHitchhiker2013_1Alt = false; STS.presetHitchhiker2013_2 = false; STS.presetHitchhiker2013_2Alt = false; STS.presetPolymer2020 = false; if (STS.expWatch9B == true) { STS.expPolymerGen2Subscribe = true; STS.expPolymerGen2Colors = true; } if (STS.expPolymerShell == true) { STS.expMaterialGbar = true; } if (STS.expWatch9 == true) { STS.expWatch9ReportTab = true; } if (STS.expFlatLogo == true || STS.expInvertLogo == true || STS.expPolymerShell == true) { STS.expRoundedTopbarPfp = true; STS.expNoByText = true; STS.expAccountMenu = true; } if (STS.expInvertLogo == true || STS.expPolymerShell == true) { STS.expUploadIcon = true; } applySettings(); } if (STS.expOutlineIcons == null || STS.presetPolymer2021 == null || STS.presetPolymer2022 == null || STS.expPolymerTooltips == null || STS.expSecondarySearchIcon == null || STS.expBigSearchThumbs == null || STS.expBiggerSearchThumbs == null || STS.expEarlyPolymerGuide == null || STS.expMaterialSearch == null || STS.presetPolymer2016 == null) { STS.expOutlineIcons = false; STS.presetPolymer2016 = false; STS.presetPolymer2021 = false; STS.presetPolymer2022 = false; STS.expPolymerTooltips = false; STS.expSecondarySearchIcon = false; STS.expBigSearchThumbs = false; STS.expBiggerSearchThumbs = false; STS.expEarlyPolymerGuide = false; STS.expMaterialSearch = false; if (STS.presetHitchhiker2017 == true || STS.presetPolymer2019 == true) { STS.expBigSearchThumbs = true; } if (STS.presetPolymer2020 == true) { STS.expBiggerSearchThumbs = true; } if (STS.presetPolymer2019 == true || STS.presetPolymer2020 == true) { STS.expPolymerTooltips = true; } applySettings(); } } function grabData() { if ($("#yt-masthead-user")) { globalDataPoints.lowPfp = $("#yt-masthead-user .yt-thumb-27 img").src; globalDataPoints.pfp = $("#yt-masthead-user .yt-thumb-27 img").src; globalDataPoints.pfp = globalDataPoints.pfp.split("=s")[0] + "=s108"; } } let arra = Object.entries(STS); async function checkSetting(settingName) { let value = STS[settingName]; return value; } if (window.location.href == "https://www.youtube.com/" && STS.expHomepageRedirectsToFeed == true) { window.location = "https://www.youtube.com/feed/recommended_for_you"; } 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 waitForElement500(elm) { while (null == document.querySelector(elm)) { await new Promise(r => requestAnimationFrame(r)); } await timeout(500).then(function() { canGo = true; return document.querySelector(elm); }); } 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); }); } let refreshCheck = 0; if ($(".v3")) { doStarTube(); } else if (STS.polymerWarningBanner == false) { doStarTube(); } else if (STS.polymerWarningBanner == true) { setTimeout(function() { if ($(".v3")) { doStarTube(); } else if ($("ytd-app")) { doBanner(); } }, 1000); } function doStarTube() { document.addEventListener("V3_NAVITRONIC_FINISHED", function(e) { refreshCheck = 0; everyLoad("x"); checkContentMargin(); setTimeout(checkContentMargin, 500); setTimeout(checkContentMargin, 1500); setTimeout(checkContentMargin, 2500); setTimeout(checkContentMargin, 3000); }); document.addEventListener("V3_NAVITRONIC_STARTED", function(e) { setTimeout(checkContentMargin, 500); setTimeout(checkContentMargin, 1500); deleteTitleOnTop(); }); window.addEventListener("resize", function() { checkContentMargin(); }); everyLoad(); setTimeout(createThirdColumn, 2000); checkContentMargin(); function checkContentMargin() { if ( $("#content") && $("[static] #appbar-guide-menu") ) { var rock = $("#content").getBoundingClientRect(); $("#appbar-guide-menu").style.left = rock.left + "px"; $("html").style.setProperty("--guide-left",rock.left + "px"); if ($("#masthead-positioner")) { var stone = $("#masthead-positioner").getBoundingClientRect(); $("#appbar-guide-menu").style.top = stone.height + "px"; $("html").style.setProperty("--guide-top",stone.height + "px"); } $("#appbar-guide-menu").style.height = rock.height - 20 + "px"; $("html").style.setProperty("--guide-height",rock.height - 20 + "px"); } } 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); setTimeout(everyLoad, 6000); setTimeout(everyLoad, 10000); setTimeout(everyLoad, 15000); setTimeout(checkContentMargin, 1500); setTimeout(checkContentMargin, 3000); var elm = "#page"; waitForElement10(elm).then(function(elm) { if (canGo != false) { if (STS.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 (STS.expViewsString == true) { if ($(".watch-view-count") != null) { if (!$(".watch-view-count").textContent.includes('view') && !$(".watch-view-count").textContent.includes('wa')) { var tC = $(".watch-view-count").textContent; $(".watch-view-count").textContent = tC + " views"; } } } }, 500); setTimeout(interval, 10); function createThirdColumn() { if ( $("#page.home") && STS.expAozoraHome == true ) { // $(".branded-page-v2-secondary-col").innerHTML = ``; let stolenRecoms = ""; if ($(".lohp-newspaper-shelf")) { stolenRecoms = document.querySelectorAll(".feed-item-container")[1]; } else { stolenRecoms = $(".feed-item-container"); } let newHome = $(".branded-page-v2-secondary-col .branded-page-box"); stolenRecoms.style.display = "block"; newHome.appendChild(stolenRecoms); let container = document.querySelector(".branded-page-v2-secondary-col"); var newElem = document.createElement("div"); newElem.id = "epic-panda-rules"; newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[0]); var elm = ".feed-item-container:nth-child(10) img"; waitForElement500(elm).then(function(elm) { if (canGo != false) { let arrayShelves = document.querySelectorAll(".compact-shelf"); // console.log(arrayShelves); arrayShelves.forEach(itemRoot => { if (itemRoot) { itemRoot.classList.add("rule-added"); var newElem = document.createElement("div"); newElem.setAttribute("class","horizontal-rule"); newElem.innerHTML = ` `; itemRoot.insertBefore(newElem, itemRoot.children[0]); // console.log(newElem); } }); } }); } } function createFeedText() { if (document.querySelector(".epic-panda-header") == null) { var elm = ".branded-page-v2-subnav-container"; waitForElement10(elm).then(function(elm) { if (canGo != false) { let container = document.querySelector('.feed-item-container'); var newElem = document.createElement("div"); newElem.class = "epic-panda-header"; newElem.innerHTML = ` From YouTube `; container.insertBefore(newElem, container.children[0]); } }); } } if (document.querySelector("#st-settings-button") == null) { var elm = "#footer"; waitForElement10(elm).then(function(elm) { if (canGo != false) { $(".oz-expand-debugger-icon").addEventListener("click", function() { if (document.querySelector("#st-settings-button") == null) { createExpandedFooter(); } }); } }); } function deleteTitleOnTop() { if ( $("#watch5-above-container") ) { $("#watch5-above-container").remove(); } } function guideAlwaysPinned() { 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"); } } function hideYoodles() { if ($("#logo-container.doodle")) { $("#logo-container.doodle").classList.remove("doodle"); $("#logo-container img").src = "//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif"; if ($(".content-region")) { $(".content-region").removeAttribute("style"); } } } function createRelatedTabsPrep() { 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); } } } } } }); } } function createWatch9Prep() { 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); } } } }); } } function createWatch8Prep() { 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); } } } }); } } function createWatch5Prep() { var elm = "#watch7-content.watch-content .yt-uix-button"; waitForElement10(elm).then(function(elm) { if (canGo != false) { if (document.querySelector("#watch5-container") == null) { if (document.querySelector("#watch7-creator-bar") != null) { createWatch5(1, "d"); } else { createWatch5(0, "d"); } } } }); } function createRealWatch9Prep() { if (document.querySelector("#watch7-content.watch-content .yt-uix-button") != null) { if (document.querySelector("#watch9-container") == null) { if (document.querySelector("#watch7-creator-bar") != null) { createRealWatch9(1); } else { createRealWatch9(0); } } } else { var elm = "#watch7-content.watch-content .yt-uix-button"; waitForElement10(elm).then(function(elm) { if (canGo != false) { if (document.querySelector("#watch9-container") == null) { if (document.querySelector("#watch7-creator-bar") != null) { createRealWatch9(1); } else { createRealWatch9(0); } } } }); } } function createWatch10Prep() { if (document.querySelector("#watch7-content.watch-content .yt-uix-button") != null) { if (document.querySelector("#watch10-container") == null) { if (document.querySelector("#watch7-creator-bar") != null) { createWatch10(1); } else { createWatch10(0); } } } else { var elm = "#watch7-content.watch-content .yt-uix-button"; waitForElement10(elm).then(function(elm) { if (canGo != false) { if (document.querySelector("#watch10-container") == null) { if (document.querySelector("#watch7-creator-bar") != null) { createWatch10(1); } else { createWatch10(0); } } } }); } } function moveGuideButtonToTopbar() { 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]); } } }); } function moveCountsToButtons() { 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"); } } }); } function createMoreTooltips() { 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 (STS.expWatch7AboutTabRename == true) { document.querySelector("#watch7-secondary-actions .start span").textContent = "Video info"; } if (STS.expWatch7AboutTabRename2 == true) { document.querySelector("#watch7-secondary-actions .start span").textContent = "Details"; } } } } }); 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"); } } } function createSearchText() { if ($("#masthead-search-term") != null) { $("#masthead-search-term").setAttribute("placeholder","Search"); } } function doModernGuide() { 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"); let container = $("#FEwhat_to_watch-guide-item .yt-valign-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[0]); } } if ($("#FEsubscriptions-guide-item.startube") == null) { if ($("#FEsubscriptions-guide-item") != null) { $("#FEsubscriptions-guide-item .display-name span").textContent = "Subscriptions"; let container = $("#FEsubscriptions-guide-item .yt-valign-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[0]); $("#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"; let container = $("#FEhistory-guide-item .yt-valign-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[0]); $("#FEhistory-guide-item").classList.add("startube"); } } if ($("#FEtrending-guide-item.startube") == null) { if ($("#FEtrending-guide-item") != null) { let container = $("#FEtrending-guide-item .yt-valign-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[0]); $("#FEtrending-guide-item").classList.add("startube"); } } if ($("#FEsocial-guide-item.startube") == null) { if ($("#FEsocial-guide-item") != null) { let container = $("#FEsocial-guide-item .yt-valign-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[0]); $("#FEsocial-guide-item").classList.add("startube"); } } if ($("#VLWL-guide-item.startube") == null) { if ($("#VLWL-guide-item") != null) { let container = $("#VLWL-guide-item .yt-valign-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[0]); $("#VLWL-guide-item").classList.add("startube"); } } if ($("#VLLL-guide-item.startube") == null) { if ($("#VLLL-guide-item") != null) { let container = $("#VLLL-guide-item .yt-valign-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[0]); $("#VLLL-guide-item").classList.add("startube"); } } if ($(".guide-user-links .guide-channel[id^='UC']") != null) { if ($(".startube-mychan > a") == null) { let container1 = $(".guide-user-links .guide-channel[id^='UC']"); container1.classList.add("startube-mychan"); let container = container1.querySelector(".yt-valign-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[0]); container1.classList.add("startube"); let newHome = $(".guide-user-links"); newHome.insertBefore(container1, newHome.children[1]); } } if ($(".guide-channel[id^='VLP']:not(.startube)")) { let list = document.querySelectorAll(".guide-channel[id^='VLP']:not(.startube)"); list.forEach(item => { let container = item.querySelector(".yt-valign-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[0]); item.classList.add("startube"); }); } if ($("#appbar-guide-button.startube") == null) { if ($("#appbar-guide-button") != null) { let container = $("#appbar-guide-button"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[0]); $("#appbar-guide-button").classList.add("startube"); } } if ($("#logo-container.startube") == null) { if ($("#logo-container") != null) { let container = $("#logo-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[0]); $("#logo-container").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 ( $("[location='feed-recs']") != null && $("[exp-cosmic-guide-layout]") != 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 = "From YouTube"; } else { $(".appbar-nav-menu li:nth-child(1) .yt-uix-button-content span").textContent = "From YouTube"; } } }); } } } function doScrollableGuide() { if ($("#guide-library-section")) { $("#guide-library-section").data.guideSubscriptionsSectionRenderer.navigationEndpoint = ""; } if ($(".startube-fixed-guide-item") == null) { var elm = "#guide-library-container"; waitForElement(elm).then(function(elm) { if (canGo != false) { if ($("#guide-library-container .guide-flyout") && $("#startube-library-expander-container") == null) { let container = $("#guide-library-container"); let newElem = document.createElement("div"); newElem.id = "startube-library-expander-container"; newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[5]); var theFlyout = document.querySelector("#guide-library-container .guide-flyout .guide-channels-list"); var newHome = document.querySelector("#guide-library-container .startube-guide-expander-items"); newHome.insertBefore(theFlyout, newHome.children[0]); newHome.classList.add("startube-fixed-guide-item"); } if ($("#guide-subscriptions-container .guide-flyout") && $("#startube-subs-expander-container") == null) { let container = $("#guide-subscriptions-container"); let newElem = document.createElement("div"); newElem.id = "startube-subs-expander-container"; newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[4]); theFlyout = document.querySelector("#guide-subscriptions-container .guide-flyout .guide-channels-list"); newHome = document.querySelector("#guide-subscriptions-container .startube-guide-expander-items"); newHome.insertBefore(theFlyout, newHome.children[0]); } newHome.classList.add("startube-fixed-guide-item"); } }); } } function doModernPlayer() { if (STS.expModernPlayer == true || STS.expModernPlayerV2 == true) { document.querySelector("html").setAttribute("exp-modern-player", ""); if (STS.expModernPlayerV2 == true) { document.querySelector("html").setAttribute("exp-modern-player-v2", ""); } if ($("#page.watch") || $("#page.channel")) { var elm = ".html5-player-chrome"; waitForElement10(elm).then(function(elm) { if (canGo != false) { $("#movie_player").classList.add("autohide-controls"); if ($(".ytp-button-play.startube-has-icon") == null && $(".ytp-button-pause.startube-has-icon") == null) { let container; if ($(".ytp-button-play")) { container = $(".ytp-button-play"); } else { container = $(".ytp-button-pause"); } let newElem = document.createElement("div"); newElem.setAttribute("class","startube-player-svg"); container.classList.add("startube-has-icon"); container.classList.add("startube-player-icon"); container.id = "startube-playpause"; if (STS.expModernPlayerV2 == true) { newElem.innerHTML = ` `; } else { newElem.innerHTML = ` `; } container.insertBefore(newElem, container.children[0]); let currPlayerState = "paused"; // Select the node that will be observed for mutations const targetNode = document.querySelector("#movie_player"); // Options for the observer (which mutations to observe) const config = { attributes: true }; // Callback function to execute when mutations are observed const callback = (mutationList, observer) => { for (const mutation of mutationList) { if ($(".playing-mode") && currPlayerState == "paused") { $("#st-playing").beginElement(); currPlayerState = "playing"; } if ($(".paused-mode") && currPlayerState == "playing") { $("#st-pausing").beginElement(); currPlayerState = "paused"; } } }; // Create an observer instance linked to the callback function const observer = new MutationObserver(callback); // Start observing the target node for configured mutations observer.observe(targetNode, config); } if ($(".ytp-button-volume.startube-has-icon") == null) { let container = $(".ytp-button-volume"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-player-svg"); container.classList.add("startube-has-icon"); container.classList.add("startube-player-icon"); container.id = "startube-volume"; newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[0]); } if ($("#subtitles_button.startube-has-icon") == null && $("#subtitles_button")) { let container = $("#subtitles_button"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-player-svg"); container.classList.add("startube-has-icon"); container.classList.add("startube-player-icon"); if (STS.expModernPlayerV2 == true) { newElem.innerHTML = ` `; } else { newElem.innerHTML = ` `; } container.insertBefore(newElem, container.children[1]); } if ($("#settings_button.startube-has-icon") == null) { let container = $("#settings_button"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-player-svg"); container.classList.add("startube-has-icon"); container.classList.add("startube-player-icon"); if (STS.expModernPlayerV2 == true) { newElem.innerHTML = ` `; } else { newElem.innerHTML = ` `; } container.insertBefore(newElem, container.children[1]); } if ($(".ytp-size-toggle-large.startube-has-icon") == null && $(".ytp-size-toggle-small.startube-has-icon") == null) { let container; if ($(".ytp-size-toggle-large")) { container = $(".ytp-size-toggle-large"); } else { container = $(".ytp-size-toggle-small"); } let newElem = document.createElement("div"); newElem.setAttribute("class","startube-player-svg"); container.classList.add("startube-has-icon"); container.classList.add("startube-player-icon"); container.id = "startube-theater"; if (STS.expModernPlayerV2 == true) { newElem.innerHTML = `
`; } else { newElem.innerHTML = `
`; } container.insertBefore(newElem, container.children[0]); } if ($(".ytp-button-fullscreen-enter.startube-has-icon") == null && $(".ytp-button-fullscreen-exit.startube-has-icon") == null) { let container; if ($(".ytp-button-fullscreen-enter")) { container = $(".ytp-button-fullscreen-enter"); } else { container = $(".ytp-button-fullscreen-exit"); } let newElem = document.createElement("div"); newElem.setAttribute("class","startube-player-svg"); container.classList.add("startube-has-icon"); container.classList.add("startube-player-icon"); container.id = "startube-fullscreen"; if (STS.expModernPlayerV2 == true) { newElem.innerHTML = `
`; } else { newElem.innerHTML = `
`; } container.insertBefore(newElem, container.children[0]); } if ($(".ytp-action-buttons .ytp-button-watch-later") == null) { var theBtn = document.querySelector(".ytp-button-watch-later"); var newHome = document.querySelector('.ytp-action-buttons'); newHome.insertBefore(theBtn, newHome.children[2]); } if ($(".ytp-button-watch-later.startube-has-icon") == null) { let container = $(".ytp-button-watch-later"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-player-svg"); container.classList.add("startube-has-icon"); container.classList.add("startube-player-icon"); newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[0]); } if ($(".ytp-button-share.startube-has-icon") == null) { let container = $(".ytp-button-share"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-player-svg"); container.classList.add("startube-has-icon"); container.classList.add("startube-player-icon"); newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[0]); } if ($(".ytp-button-prev.startube-has-icon") == null) { let container = $(".ytp-button-prev"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-player-svg"); container.classList.add("startube-has-icon"); container.classList.add("startube-player-icon"); if (STS.expModernPlayerV2 == true) { newElem.innerHTML = ` `; } else { newElem.innerHTML = ` `; } container.insertBefore(newElem, container.children[0]); } if ($(".ytp-button-next.startube-has-icon") == null) { let container = $(".ytp-button-next"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-player-svg"); container.classList.add("startube-has-icon"); container.classList.add("startube-player-icon"); if (STS.expModernPlayerV2 == true) { newElem.innerHTML = ` `; } else { newElem.innerHTML = ` `; } container.insertBefore(newElem, container.children[0]); } } }); } } } function createGoogleApps() { 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(); } } }); } } function createMenus() { if ($("#st-menus") == null) { let container = $("body"); let newElem = document.createElement("div"); newElem.id = "st-menus-container"; newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[0]); $("#st-menus-fence").addEventListener("click", function() { $("#st-menus-container").classList.remove("menu-visible"); }); } } function createAccountMenu() { if ($("#st-account-menu") == null && $(".yt-masthead-user-icon") != null && $(".yt-masthead-user-icon.startube-evented") == null) { $(".yt-masthead-user-icon").classList.add("startube-evented"); $(".yt-masthead-user-icon").addEventListener("click", function() { if ($("#st-account-menu") == null) { $("#masthead-expanded [href='#']").click(); let container = $("#st-menus"); let newElem = document.createElement("div"); newElem.id = "st-account-menu"; newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[0]); constructAccountMenu(); } if ($("#st-menus-container.menu-visible")) { $("#st-menus-container").classList.remove("menu-visible"); } else { $("#st-menus-container").classList.add("menu-visible"); } }); } } function constructAccountMenu() { var elm = "#masthead-expanded .yt-uix-clickcard-card"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var elem = $(".masthead-card-switch-account .yt-uix-clickcard-card-body"); var newHome = $("#st-account-menu-other .st-account-menu-content"); newHome.insertBefore(elem, newHome.children[0]); var elem = $("#yt-masthead-multilogin-actions"); var newHome = $("#st-account-menu-footer"); newHome.insertBefore(elem, newHome.children[0]); $("#yt-masthead-multilogin-actions a:nth-child(2)").textContent = "Add channel"; $("#yt-masthead-multilogin-actions a").classList.add("yt-uix-button"); $("#yt-masthead-multilogin-actions a:nth-child(2)").classList.add("yt-uix-button"); $("#yt-masthead-multilogin-actions a").classList.add("yt-uix-button-default"); $("#yt-masthead-multilogin-actions a:nth-child(2)").classList.add("yt-uix-button-default"); globalDataPoints.email = $("#masthead-expanded-menu-email").textContent; globalDataPoints.name = $("#masthead-expanded-menu-account-info p").textContent; globalDataPoints.subs = $(".yt-masthead-multilogin-user-content span:nth-of-type(2)").textContent; $("#st-account-menu-main .st-account-menu-header span").textContent = globalDataPoints.email; $("#st-account-menu-username span").textContent = globalDataPoints.name; $("#st-account-menu-sub-count span").textContent = globalDataPoints.subs; $("#st-account-menu-pfp img").src = globalDataPoints.pfp; } }); } function createCosmicGuide() { if ($("#appbar-guide-menu") && $(".show-guide") && $("#startube-guide-top-left") == null) { let container = $("#appbar-guide-menu"); let newElem = document.createElement("div"); newElem.id = "startube-guide-cosmic-section"; newElem.innerHTML = `
Browse Channels
My Channel My Videos Liked Videos History Watch Later
`; container.insertBefore(newElem, container.children[0]); let container2 = $(".guide-toplevel"); let newElem2 = document.createElement("div"); newElem2.id = "startube-guide-z-section"; newElem2.innerHTML = `
`; container2.insertBefore(newElem2, container2.children[0]); var theBtn = document.querySelector("#FEwhat_to_watch-guide-item"); var newHome = document.querySelector('#startube-guide-z-section .guide-channels-list'); newHome.insertBefore(theBtn, newHome.children[1]); if ($("#yt-masthead-user .yt-thumb-27 img")) { var theBtn = document.querySelector("#FEsubscriptions-guide-item"); var newHome = document.querySelector('#guide-channels').parentNode; newHome.insertBefore(theBtn, newHome.children[0]); var theBtn = document.querySelector("#guide-subscriptions-section"); var newHome = document.querySelector('.guide-toplevel'); newHome.insertBefore(theBtn, newHome.children[0]); let guideUrl = $(".guide-user-links .guide-channel[id^='UC'] a").getAttribute("href"); let guideId = guideUrl.split("/channel/")[1]; let guideUrlVids = guideUrl + "/videos"; $("#startube-guide-pfp img").src = globalDataPoints.pfp; $("#startube-guide-pfp").href = guideUrl; $("#st-g-my-channel").href = guideUrl; $("#st-g-my-videos").href = guideUrlVids; $("#recommended-guide-item").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "FErecommended_for_you", canonicalBaseUrl: "/feed/recommended_for_you" }, commandMetadata: { webCommandMetadata: { url: "/feed/recommended_for_you" } } } } } $("#startube-guide-browse-button").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "FEguide_builder", canonicalBaseUrl: "/feed/guide_builder" }, commandMetadata: { webCommandMetadata: { url: "/feed/guide_builder" } } } } } $("#st-g-history").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "FEhistory", canonicalBaseUrl: "/feed/history" }, commandMetadata: { webCommandMetadata: { url: "/feed/history" } } } } } $("#st-g-watch-later").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "VLWL", canonicalBaseUrl: "/playlist?list=WL" }, commandMetadata: { webCommandMetadata: { url: "/playlist?list=WL" } } } } } $("#st-g-likes").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "VLLL", canonicalBaseUrl: "/playlist?list=LL" }, commandMetadata: { webCommandMetadata: { url: "/playlist?list=LL" } } } } } $("#st-g-my-channel").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: guideId, canonicalBaseUrl: guideUrl }, commandMetadata: { webCommandMetadata: { url: guideUrl } } } } } $("#startube-guide-pfp").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: guideId, canonicalBaseUrl: guideUrl }, commandMetadata: { webCommandMetadata: { url: guideUrl } } } } } $("#st-g-my-videos").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: guideId, canonicalBaseUrl: guideUrlVids, params: "EgZ2aWRlb3PyBgQKAjoA" }, commandMetadata: { webCommandMetadata: { url: guideUrlVids } } } } } 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"); } } } else { $("#startube-guide-profile-section").style.display = "none"; } } } // EXfunct function doRichGridHome() { if ($("#page.home")) { let list = document.querySelectorAll(".yt-shelf-grid-item"); $("#content").classList.add("yt-rich-grid"); list.forEach(item => { if (item.querySelector(".yt-lockup-user-photo") == null) { let pfp; let data; let url; if (item.data.richItemRenderer) { pfp = item.data.richItemRenderer.content.gridVideoRenderer.contextItemData.authorAvatar; data = item.data.richItemRenderer.content.gridVideoRenderer.contextItemData.authorNavigationEndpoint; url = item.data.richItemRenderer.content.gridVideoRenderer.contextItemData.authorNavigationEndpoint.browseEndpoint.canonicalBaseUrl; } else if (item.data.compactVideoRenderer) { pfp = item.data.compactVideoRenderer.channelThumbnail.thumbnails[0].url; data = item.data.compactVideoRenderer.contextItemData.authorNavigationEndpoint; url = item.data.compactVideoRenderer.contextItemData.authorNavigationEndpoint.browseEndpoint.canonicalBaseUrl; } data = { abstractVorElement: { navigationEndpoint: data } } let container = item.querySelector(".yt-lockup-content"); let newElem = document.createElement("a"); newElem.setAttribute("class","yt-lockup-user-photo"); newElem.href = url; newElem.data = data; newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[0]); container = item.querySelector(".yt-lockup-content"); newElem = document.createElement("div"); newElem.setAttribute("class","yt-lockup-details"); container.insertBefore(newElem, container.children[1]); let newHome = item.querySelector(".yt-lockup-details"); let toMove = item.querySelector(".yt-lockup-title"); let toMove2 = item.querySelector(".yt-lockup-meta"); newHome.appendChild(toMove); newHome.appendChild(toMove2); if (item.querySelector(".yt-lockup-badges")) { let toMove3 = item.querySelector(".yt-lockup-badges"); newHome.appendChild(toMove3); } item.classList.add("yt-rich-lockup-item"); } }); } } // EXfunct function createUploadIcon() { if ($("#yt-masthead-content") && $("#startube-upload-icon") == null) { let container = $("#yt-masthead-content"); let newElem = document.createElement("a"); newElem.id = "startube-upload-icon"; newElem.setAttribute("class","startube-show-svgs yt-uix-tooltip"); newElem.setAttribute("title","Upload"); newElem.href = "/upload"; newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[2]); } } // EXfunct function createSearchTumor() { if ($("#yt-masthead-content") && $("#startube-search-tumor") == null) { let container = $("#masthead-search-terms"); let newElem = document.createElement("div"); newElem.id = "startube-search-tumor"; newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[0]); } } // EXfunct function createSearchIcon() { if ($("#yt-masthead-content") && $("#startube-search-icon") == null) { let container = $("#search-btn"); let newElem = document.createElement("div"); newElem.id = "startube-search-icon"; newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[0]); } } // EXfunct function searchButtonLowercase() { if ($("#search-btn")) { $("#search-btn .run").textContent = "Search"; } } // EXfunct function createAozoraTopbarLinks() { if ($("#yt-masthead-content") && $("#aozora-topbar-links") == null) { let container = $("#yt-masthead-content"); let newElem = document.createElement("div"); newElem.id = "aozora-topbar-links"; newElem.setAttribute("class","flex-bar"); newElem.innerHTML = ` Browse Movies Upload `; container.insertBefore(newElem, container.children[2]); } } // EXfunct function changeCommentPlaceholder(n) { if ($("#page.watch") && $(".widget_bounds .yt-spinner-message") == null && $(".share.focus_caller.startube") == null) { var elm = ".focus_caller"; waitForElement10(elm).then(function(elm) { if (canGo != false && $("#page.watch")) { if (n == 1) { $(".share.focus_caller").textContent = "Add a public comment"; } else if (n == 0) { $(".share.focus_caller").textContent = "Add a comment"; } $(".share.focus_caller").classList.add("startube"); } }); } } function everyLoad(x) { grabData(); $("html").setAttribute("startube",""); createMenus(); if ($("#st-menus-container") && x === "x") { $("#st-menus-container").classList.remove("menu-visible"); } if ($("[comment-panel-open]") && x === "x") { $("html").setAttribute("comment-panel-open","false"); } if ($(".gaiabar")) { $("html").setAttribute("v3-has-gbar","true"); } if ( x === "x" && $("#watch5-above-container") ) { $("#watch5-above-container").remove(); } if ($("#page.home")) { var elm = ".feed-item-container:nth-child(5) img"; if ( x === "x" && STS.expAozoraHome == true ) { waitForElement10(elm).then(function(elm) { if (canGo != false) { createThirdColumn(); } }); } $("html").setAttribute("location","home"); } if (window.location.href.includes("feed/UC")) { $("html").setAttribute("location","feed-inline-channel"); } if (window.location.href.includes("feed")) { $("html").setAttribute("location","feed"); /*if (document.querySelector(".epic-panda-header") == null) { createFeedText(refreshCheck); }*/ } if (window.location.href.includes("/playlist")) { $("html").setAttribute("location","playlist"); } if (window.location.href.includes("feed/guide")) { $("html").setAttribute("location","feed-guide-builder"); } if (window.location.href.includes("/subscriptions")) { $("html").setAttribute("location","feed-subs"); } if (window.location.href.includes("recommended_for_you")) { $("html").setAttribute("location","feed-recs"); } if (window.location.href.includes("/what_to_watch/recommended")) { $("html").setAttribute("location","feed-recs"); } if ($("#page.search")) { $("html").setAttribute("location","search"); } if ($("#page.all_comments")) { $("html").setAttribute("location","comments"); } if ($("#page.watch")) { $("html").setAttribute("location","watch"); } if ($("#page.channel")) { $("html").setAttribute("location","channel"); $("html").setAttribute("channel-location","home"); if (window.location.href.includes("/feed")) { $("html").setAttribute("channel-location","feed"); } if (window.location.href.includes("/videos")) { $("html").setAttribute("channel-location","videos"); } if (window.location.href.includes("/playlists")) { $("html").setAttribute("channel-location","playlists"); } if (window.location.href.includes("/community")) { $("html").setAttribute("channel-location","backstage"); } if (window.location.href.includes("/about")) { $("html").setAttribute("channel-location","about"); } if (window.location.href.includes("/search")) { $("html").setAttribute("channel-location","search"); } if (STS.expPolymerChannels == true) { if ($(".channel-header-profile-image-container")) { var theBtn = document.querySelector(".channel-header-profile-image-container"); var newHome = document.querySelector('#c4-primary-header-contents'); newHome.insertBefore(theBtn, newHome.children[2]); } else { var elm = ".channel-header-profile-image-container"; waitForElement10(elm).then(function(elm) { if (canGo != false && $("#page.channel")) { var theBtn = document.querySelector(".channel-header-profile-image-container"); var newHome = document.querySelector('#c4-primary-header-contents'); newHome.insertBefore(theBtn, newHome.children[2]); } }); } } if (STS.expPolymerChannels == true) { if ($(".yt-subscription-button-subscriber-count-branded-horizontal") && $(".startube-poly-sub-count") == null) { var theBtn = document.querySelector(".yt-subscription-button-subscriber-count-branded-horizontal"); theBtn.textContent = theBtn.textContent + " subscribers"; var newHome = document.querySelector('.branded-page-header-title'); newHome.insertBefore(theBtn, newHome.children[0]); theBtn.classList.add("startube-poly-sub-count"); } else { var elm = ".yt-subscription-button-subscriber-count-branded-horizontal"; waitForElement10(elm).then(function(elm) { if (canGo != false && $(".startube-poly-sub-count") == null && $("#page.channel")) { var theBtn = document.querySelector(".yt-subscription-button-subscriber-count-branded-horizontal"); theBtn.textContent = theBtn.textContent + " subscribers"; var newHome = document.querySelector('.branded-page-header-title'); newHome.insertBefore(theBtn, newHome.children[0]); theBtn.classList.add("startube-poly-sub-count"); } }); } } if (STS.expHomeTab == true) { setTimeout(function() { if ($(".startube-tab") == null) { if ($(".epic-nav-item-empty.selected")) { $(".epic-nav-item-empty.selected").parentNode.id = "channel-main-tab"; let container = $("#channel-navigation-menu"); let newElem = document.createElement("li"); newElem.setAttribute("class","startube-tab"); newElem.innerHTML = `

Home

`; container.insertBefore(newElem, container.children[0]); } else if ($("#channel-navigation-menu .epic-nav-item-empty.selected") == null) { var elm = "#channel-navigation-menu li:nth-child(1) a"; waitForElement10(elm).then(function(elm) { if (canGo != false) { if ($("#channel-navigation-menu .epic-nav-item-empty.selected") == null) { let navData = $("#channel-navigation-menu li a").data; let navUrl = $("#channel-navigation-menu li a").getAttribute("href"); let container = $("#channel-navigation-menu"); let newElem = document.createElement("li"); newElem.setAttribute("class","startube-tab"); newElem.innerHTML = ` Home `; container.insertBefore(newElem, container.children[0]); newElem.data = navData; } } }); } } }, 250); } } else { if ($("[channel-location]")) { $("html").removeAttribute("channel-location"); } } if ($("#page.search")) { $("html").setAttribute("location","search"); } if (STS.expLogoLinksToFeed == true && $("#logo-container")) { $("#logo-container").href = "/feed/recommended_for_you"; $("#logo-container").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "FErecommended_for_you", canonicalBaseUrl: "/feed/recommended_for_you" }, commandMetadata: { webCommandMetadata: { url: "/feed/recommended_for_you" } } } } } } if (STS.expLogoLinksToSubs == true && $("#logo-container")) { $("#logo-container").href = "/feed/subscriptions"; $("#logo-container").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "FEsubscriptions", canonicalBaseUrl: "/feed/subscriptions" }, commandMetadata: { webCommandMetadata: { url: "/feed/subscriptions" } } } } } } var arraNum = 0; arra.forEach(itemRoot => { let name = itemRoot[0]; checkSetting(name).then(function(value) { if (value == true && name == "expRelatedThumbsSizeMedium") { $("html").setAttribute("exp-related-thumbs-size-medium", ""); } else if (value == true && name == "expRelatedThumbsSizeLarge") { $("html").setAttribute("exp-related-thumbs-size-large", ""); } else if (value == true && name == "expRelatedThumbsSizeStupid") { $("html").setAttribute("exp-related-thumbs-size-stupid", ""); } else if (value == true && name == "configNoTabTopBorder") { $("html").setAttribute("config-no-tab-top-border", ""); } else if (value == true && name == "configWatch7SidebarCardShadow") { $("html").setAttribute("config-watch7-sidebar-card-shadow", ""); } else if (value == true && name == "expRelatedTabs") { $("html").setAttribute("exp-related-tabs", ""); createRelatedTabsPrep(); } else if (value == true && name == "expRelatedTabsHoldsSubscribe") { $("html").setAttribute("exp-related-tabs-holds-subscribe", ""); } else if (value == true && name == "expWatch9") { $("html").setAttribute("exp-watch9", ""); createWatch9Prep(); } else if (value == true && name == "expWatch9NoOwner") { $("html").setAttribute("exp-watch9-no-owner", ""); } else if (value == true && name == "expWatch9TrueExpander") { $("html").setAttribute("exp-watch9-true-expander", ""); } else if (value == true && name == "expVerticalWatch9") { $("html").setAttribute("exp-vertical-watch9", ""); } else if (value == true && name == "expWatch9SidebarBus") { $("html").setAttribute("exp-watch9-sidebar-bus", ""); } else if (value == true && name == "expWatch9StickyColumns") { $("html").setAttribute("exp-watch9-sticky-columns", ""); } else if (value == true && name == "expWatch9ReportTab") { $("html").setAttribute("exp-watch9-report-tab", ""); } else if (value == true && name == "expGuideAlwaysPinned") { guideAlwaysPinned(); } else if (value == true && name == "expWatch8") { $("html").setAttribute("exp-watch8", ""); createWatch8Prep(); } else if (value == true && name == "expWatch8NoMore") { $("html").setAttribute("exp-watch8-no-more", ""); } else if (value == true && name == "expSharrow") { $("html").setAttribute("exp-sharrow", ""); } else if (value == true && name == "expAlwaysShowCompactDate") { $("html").setAttribute("exp-always-show-compact-date", ""); } else if (value == true && name == "expTwoColumnSearchResults") { $("html").setAttribute("exp-two-column-search-results", ""); } else if (value == true && name == "expRelatedGrid") { $("html").setAttribute("exp-related-grid", ""); } else if (value == true && name == "expMoveGuideButtonToTopbar") { $("html").setAttribute("exp-move-guide-button-to-topbar", ""); moveGuideButtonToTopbar(); } else if (value == true && name == "expMoveCountsToButtons") { $("html").setAttribute("exp-move-counts-to-buttons", ""); moveCountsToButtons(); } else if (value == true && name == "expMoreTooltips") { $("html").setAttribute("exp-more-tooltips", ""); createMoreTooltips(); } else if (value == true && name == "expFlatLogo") { $("html").setAttribute("exp-flat-logo", ""); } else if (value == true && name == "expInvertLogo") { $("html").setAttribute("exp-invert-logo", ""); } else if (value == true && name == "expGlossyLogo") { $("html").setAttribute("exp-glossy-title", ""); } else if (value == true && name == "expClassicTitle") { $("html").setAttribute("exp-classic-title", ""); } else if (value == true && name == "expClassicGuide") { $("html").setAttribute("exp-classic-guide", ""); } else if (value == true && name == "expClassicSubscribe") { $("html").setAttribute("exp-classic-subscribe", ""); } else if (value == true && name == "expClassicStyles") { $("html").setAttribute("exp-classic-styles", ""); } else if (value == true && name == "expClassicLtod") { $("html").setAttribute("exp-classic-ltod", ""); } else if (value == true && name == "expClassicButtons") { $("html").setAttribute("exp-classic-buttons", ""); } else if (value == true && name == "expBigSearchThumbs") { $("html").setAttribute("exp-big-search-thumbs", ""); } else if (value == true && name == "expBiggerSearchThumbs") { $("html").setAttribute("exp-bigger-search-thumbs", ""); } else if (value == true && name == "expModernStyles") { $("html").setAttribute("exp-modern-styles", ""); changeCommentPlaceholder(0); } else if (value == true && name == "expModernTopbar") { $("html").setAttribute("exp-modern-topbar", ""); } else if (value == true && name == "expModernUpload") { $("html").setAttribute("exp-modern-upload", ""); } else if (value == true && name == "expModernGuideButton") { $("html").setAttribute("exp-modern-guide-button", ""); } else if (value == true && name == "expModernSearchIcon") { $("html").setAttribute("exp-modern-search-icon", ""); } else if (value == true && name == "expSearchText") { $("html").setAttribute("exp-search-text", ""); createSearchText(); } else if (value == true && name == "expModernTitle") { $("html").setAttribute("exp-modern-title", ""); } else if (value == true && name == "expModernGuide") { $("html").setAttribute("exp-modern-guide", ""); doModernGuide(); } else if (value == true && name == "expModernHome") { $("html").setAttribute("exp-modern-home", ""); } else if (value == true && name == "expTrueScrollableGuide") { $("html").setAttribute("exp-true-scrollable-guide", ""); doScrollableGuide(); } else if (value == true && name == "expModernPlayer") { $("html").setAttribute("exp-modern-player", ""); doModernPlayer(); } else if (value == true && name == "expModernPlayerV2") { $("html").setAttribute("exp-modern-player", ""); $("html").setAttribute("exp-modern-player-v2", ""); doModernPlayer(); } else if (value == true && name == "expGoogleApps") { $("html").setAttribute("exp-google-apps", ""); createGoogleApps(); } else if (value == true && name == "expCommentsFullWidth") { $("html").setAttribute("exp-comments-full-width", ""); } else if (value == true && name == "expNoByText") { $("html").setAttribute("exp-no-by-text", ""); } else if (value == true && name == "expAccountMenu") { $("html").setAttribute("exp-account-menu", ""); createAccountMenu(); } else if (value == true && name == "expStaticSite") { $("html").setAttribute("static", ""); } else if (value == true && name == "expHideAppbar") { $("html").setAttribute("hide-appbar", ""); } else if (value == true && name == "expEpicWatch7") { $("html").setAttribute("exp-epic-watch7", ""); } else if (value == true && name == "expEpicWatch7Flat") { $("html").setAttribute("exp-epic-watch7-flat", ""); } else if (value == true && name == "expEpicHeader") { $("html").setAttribute("topbar", "epic"); } else if (value == true && name == "expEpicStyling") { $("html").setAttribute("exp-epic-styling", ""); } else if (value == true && name == "expCosmicHeader") { $("html").setAttribute("topbar", "cosmic"); } else if (value == true && name == "expCosmicBG") { $("html").setAttribute("cosmic-bg", ""); } else if (value == true && name == "expCosmicButtons") { $("html").setAttribute("cosmic-buttons", ""); } else if (value == true && name == "expCosmicStyles") { $("html").setAttribute("cosmic-styles", ""); } else if (value == true && name == "expCosmicComments") { $("html").setAttribute("exp-comsic-comments", ""); } else if (value == true && name == "expCosmicGuideStyle") { $("html").setAttribute("exp-cosmic-guide-style", ""); } else if (value == true && name == "expCosmicGuideLayout") { $("html").setAttribute("exp-cosmic-guide-layout", ""); createCosmicGuide(); } else if (value == true && name == "expCosmicFeedsV1") { $("html").setAttribute("exp-cosmic-feeds-v1", ""); } else if (value == true && name == "expWatch5D") { $("html").setAttribute("exp-watch5d", ""); createWatch5Prep(); } else if (value == true && name == "expNoGuide") { $("html").setAttribute("guide", "no"); } else if (value == true && name == "expGuideOnFeedsOnly") { $("html").setAttribute("guide", "feeds"); } else if (value == true && name == "expAozoraHome") { $("html").setAttribute("exp-aozora-home", ""); } else if (value == true && name == "expAozoraHeader") { $("html").setAttribute("exp-aozora-header", ""); searchButtonLowercase(); } else if (value == true && name == "expAozoraBG") { $("html").setAttribute("exp-aozora-bg", ""); } else if (value == true && name == "expAozoraStyles") { $("html").setAttribute("exp-aozora-styles", ""); } else if (value == true && name == "expAozoraSubscribe") { $("html").setAttribute("exp-aozora-subscribe", ""); } else if (value == true && name == "expAozoraTopbarLinks") { $("html").setAttribute("exp-aozora-topbar-links", ""); createAozoraTopbarLinks(); } else if (value == true && name == "expWatch5C") { $("html").setAttribute("exp-watch5d", ""); $("html").setAttribute("exp-watch5c", ""); createWatch5Prep(); } else if (value == true && name == "expHomeTab") { $("html").setAttribute("exp-home-tab", ""); } else if (value == true && name == "expRoboto") { $("html").setAttribute("exp-roboto", ""); } else if (value == true && name == "expCenteredSearch") { $("html").setAttribute("exp-centered-search", ""); } else if (value == true && name == "expBigSearch") { $("html").setAttribute("exp-big-search", ""); } else if (value == true && name == "expSecondarySearchIcon") { $("html").setAttribute("exp-secondary-search-icon", ""); createSearchTumor(); } else if (value == true && name == "expMaterialSearch") { $("html").setAttribute("exp-material-search", ""); createSearchIcon(); } else if (value == true && name == "expPolymerShell") { $("html").setAttribute("exp-polymer-shell", ""); createSearchIcon(); } else if (value == true && name == "expEarlyPolymerShell") { $("html").setAttribute("exp-polymer-shell", ""); $("html").setAttribute("exp-early-polymer-shell", ""); } else if (value == true && name == "expEarlyPolymerGuide") { $("html").setAttribute("exp-early-polymer-guide", ""); } else if (value == true && name == "expPolymerGen2Colors") { $("html").setAttribute("exp-polymer-gen2-colors", ""); } else if (value == true && name == "expPolymerSubscribe") { $("html").setAttribute("exp-polymer-subscribe", ""); } else if (value == true && name == "expPolymerGen2Subscribe") { $("html").setAttribute("exp-polymer-subscribe", ""); $("html").setAttribute("exp-polymer-gen2-subscribe", ""); } else if (value == true && name == "expPolymerStyles") { $("html").setAttribute("exp-polymer-styles", ""); changeCommentPlaceholder(1); } else if (value == true && name == "expPolymerChannels") { $("html").setAttribute("exp-polymer-channels", ""); } else if (value == true && name == "expPolymerComments") { $("html").setAttribute("exp-polymer-comments", ""); } else if (value == true && name == "expPolymerTooltips") { $("html").setAttribute("exp-polymer-tooltips", ""); } else if (value == true && name == "expRichGridHome") { $("html").setAttribute("exp-rich-grid-home", ""); doRichGridHome(); } else if (value == true && name == "expWatch9A") { $("html").setAttribute("exp-watch9a", ""); createRealWatch9Prep(); } else if (value == true && name == "expWatch9B") { $("html").setAttribute("exp-watch9b", ""); createRealWatch9Prep(); } else if (value == true && name == "expWatch10Beta") { $("html").setAttribute("exp-watch10-beta", ""); createWatch10Prep(); } else if (value == true && name == "expWMRButtonsLowercase") { $("html").setAttribute("exp-wmr-buttons-lowercase", ""); } else if (value == true && name == "expOutlineIcons") { $("html").setAttribute("exp-outline-icons", ""); } else if (value == true && name == "expRoundedTopbarPfp") { $("html").setAttribute("exp-rounded-topbar-pfp", ""); } else if (value == true && name == "expUploadIcon") { $("html").setAttribute("exp-upload-icon", ""); createUploadIcon(); } else if (value == true && name == "expHideYoodles") { $("html").setAttribute("exp-hide-yoodles", ""); hideYoodles(); } else if (value == true && name == "expFixedShareIcons") { $("html").setAttribute("exp-fixed-share-icons", ""); } else if (value == true && name == "expFixedXIcon") { $("html").setAttribute("exp-fixed-x-icon", ""); } else if (value == true && name == "expMaterialGbar") { $("html").setAttribute("exp-material-gbar", ""); } }); }); refreshCheck++; if ( $("#startube-new-settings-popup") === null && STS.show2point0 == true ) { let container76 = document.querySelector('.spitfire-body-container.v3'); let newElem76 = document.createElement("div"); newElem76.id = "startube-new-settings-popup"; newElem76.innerHTML = `
What's new in StarTube 2.0.0
More Layouts
New layout presets have been added: Aozora 2011, Early and Mid 2013 (along with Alt-watch9 variants), Polymer 2016, and Polymer 2020-2022.
Improved Accuracy
Most layouts are now more accurate. The 2015-2017 layouts are a good example.
`; container76.insertBefore(newElem76, container76.children[0]); $("#close-startube-new-settings-popup").addEventListener("click", function() { $("#startube-new-settings-popup").remove(); STS.show2point0 = false; applySettings(); $("html").setAttribute("no-startube-popup",""); var elm = "#show2point0"; waitForElement10(elm).then(function(elm) { if (canGo != false) { $("#show2point0").setAttribute("checked","false"); } }); }); } } function createExpandedFooter() { let container = document.querySelector('.smartadd.selected .smartadd_content'); var newElem = document.createElement("div"); newElem.id = "startube13-settings"; newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[2]); container = document.querySelector('.spitfire-body-container.v3'); newElem = document.createElement("div"); newElem.id = "startube13-settings-window"; newElem.classList.add("hid"); newElem.innerHTML = `
StarTube Settings
Main
Anti-Main
Presets
All
Presets
Return to defaults
Disable all StarTube options
Download StarTube Config JSON

Note: These presets will override ALMOST ALL your StarTube settings! You may need to enter this config window again to change some things after enabling a preset.

STPresetsAlsoSetV3Settings
If you don't want StarTube to change your V3 config, uncheck this. (The page will reload after changing this setting)

Use default V3 player (2014)
Use 2015-2016 player
Use 2016-2020 player

Use Aozora (2011)
Use Cosmic Panda
Use Epic Panda
Use Early 2013
Use Early 2013 Alt
With alt-watch9
Use Mid 2013
Use Mid 2013 Alt
With alt-watch9
Use Late 2013
Use Late 2013 Alt
With alt-watch9
Use 2014
Use 2014 Alt
With alt-watch9
Use 2015
Use 2015 Alt
With alt-watch9
Use 2016
Use 2016 Alt
With alt-watch9
Use 2017
Use 2017 Alt
With alt-watch9
Use Polymer 2016
Very unfinished
Use Polymer 2019
Use Polymer 2020
Use Polymer 2021
Use Polymer 2022
All
show2point0
Show the 2.0.0 update card.
polymerWarningBanner
If V3 is disabled or not installed, StarTube will display a banner urging the user to install it.
expHomepageRedirectsToFeed
On the inital page load only, if the current URL is https://www.youtube.com, it will redirect to https://www.youtube.com/feed/recommended_for_you, which is useful for the Cosmic Panda layout.
expLogoLinksToFeed
The YouTube logo will link to https://www.youtube.com/feed/recommended_for_you
expLogoLinksToSubs
The YouTube logo will link to https://www.youtube.com/feed/subscriptions
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.
expVerticalWatch9
Makes alt-watch9's panels scroll vertically instead of horizontally.
expWatch9SidebarBus
Makes alt-watch9's sidebar item selection move. Glitchy on some zoom levels.
expWatch9StickyColumns
When on the description tab, the sidebar and owner column will stay on screen while you scroll.
expWatch9ReportTab
Rename Alt-watch9's "More actions" tab to "Report".
expRelatedGrid
*Now works 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.
expWatch7AboutTabRename2
Change "About" to "Details" 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
configWatch7SidebarCardShadow
Add a box shadow to the related videos section if indiviual cards watch is on
expClassicTitle
Early 2013 video title
expClassicGuide
Early 2013 guide styling
expClassicSubscribe
Early 2013 subscribe button
expClassicStyles
General early 2013 styling
expClassicLtod
Early 2013 like to dislike bar and icons
expClassicButtons
Early 2013 uix button styling
expBigSearchThumbs
Use the slightly bigger search thumbnails from around 2017-2019. Pfps also become centered if this is enabled.
expBiggerSearchThumbs
Use the much bigger search thumbnails from around 2020-2022. Pfps also become centered if this is enabled.
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
expModernHome
Removes recommended channels and fixes thumbnail sizes on home
expTrueScrollableGuide
Make the guide act like it did in 2015 onwards, removing the flyouts. Requires APPBAR_GUIDE_SCROLL to be disabled.
expModernPlayer
Make the player look like it did from 2015-2016
expModernPlayerV2
Make the player look like it did in 2016-2020
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
expNoByText
Removes the "by" text on video elements.
expAccountMenu
Replace the expanded masthead with the account dropdown menu.
expStaticSite
Forces the site to have a consistent width of 970 pixels. Center alignment required.
expHideAppbar
The appbar can be problematic on some configurations, but the appbar guide cannot be used without the appbar. This option will hide the appbar, without disabling the appbar guide.
expEpicWatch7
Makes watch7 use epic panda styling.
expEpicWatch7Flat
Removes the shadow on epic watch7.
expEpicHeader
Use the scrapped Epic Panda topbar
expEpicStyling
Recommended for Epic Panda layout
expCosmicHeader
Use the Cosmic Panda topbar
expCosmicBG
Makes the site use the Cosmic Panda background image
expCosmicButtons
Makes the site use Cosmic Panda styled buttons
expCosmicStyles
Makes the site use Cosmic Panda styling in general.
expCosmicGuideStyle
Makes the site use the Cosmic Panda black guide.
expCosmicGuideLayout
Makes the guide's structure similar to the Cosmic Panda one, with the browse channels button being on top for example.
expCosmicFeedsV1
Makes feed video renderers use the late 2011-early 2012 style.
expWatch5D
Use the Cosmic Panda watch layout
expNoGuide
Removes the guide (center alignment required)
expGuideOnFeedsOnly
Makes the guide only appear on feeds (such as subscriptions page) (center alignment required)
expAozoraHome
Arranges the homepage like the 2011 layout.
expAozoraHeader
Makes the topbar look like the 2011 layout.
expAozoraBG
Pure white site background.
expAozoraStyles
Styles many things to look like the Aozora (2010-2011) layout.
expAozoraSubscribe
White subscribe button
expWatch5C
Use the mid-late 2011 watch layout.
expHomeTab
Gives the channel page a regular home tab, instead of the icon tab.
expRoboto
Makes the site use the Roboto font.
expCenteredSearch
Centers the searchbar. Intended to be used with the Polymer layout recreation.
expBigSearch
Taller search bar from certain eras of Polymer.
expSecondarySearchIcon
Adds that weird redundant search icon that appears on the left side of the search bar when it is focused, which was added in 2022 and still exists today.
expMaterialSearch
Material search bar from 2016 Polymer, and some Hitchhiker experiements.
expPolymerShell
Changes the topbar, guide, and some other things to look like they did in Polymer Gen 1 (2017-2019).
expEarlyPolymerShell
Changes the topbar, guide, and some other things to look like they did in the Polymer Beta/Polymer Gen 0 (2016-2017).
expEarlyPolymerGuide
Makes the guide items 48px tall.
expPolymerGen2Colors
Makes the site use the colors it did in Polymer Gen 2 (2020-2022).
expPolymerSubscribe
Makes the subscribe button use the Polymer Gen 1 style (sub count inside the button)
expPolymerGen2Subscribe
Makes the subscribe button use the Polymer Gen 2 style (sub count not inside the button)
expPolymerStyles
Makes video renderers and other things look like Polymer.
expPolymerChannels
2017 onwards channels.
expPolymerComments
Polymer comments.
expPolymerTooltips
Polymer tooltips.
expRichGridHome
Makes the homepage videos really big.
expWatch9A
Enables the watch layout used from 2016-2019 in Polymer. Not the same as expWatch9.
expWatch9B
Enables the watch layout used from 2020-2022 in Polymer. Not the same as expWatch9.
expWatch10Beta
Use the weird mid 2022 Watch Metadata Refresh layout.
expWMRButtonsLowercase
Makes the Polymer watch layouts use lowercase buttons.
expOutlineIcons
Use the outline icons that were introduced in 2021.
expRoundedTopbarPfp
Makes the topbar pfp round like it was in 2016 onwards.
expUploadIcon
Replace the upload button with the upload icon from 2016-2018-ish.
expHideYoodles
Hide YouTube Doodles because they break the styling of the logo on some layouts.
The following options are not affected by any of the layout presets.
expFixedShareIcons
Some share options incorrectly appear as Facebook. This option fixes some of them.
expFixedXIcon
Makes the X share option use the modern icon, as opposed to the pre-2023 icon.
expMaterialGbar
Gives the modern gbar a Material-ish skin. Requires V3's MODERN_GBAR_DELEGATION to be enabled.
`; container.insertBefore(newElem, container.children[1]); $("#downloadJSON").addEventListener("click", function() { createJSON(); }); $("#st-load-file button").addEventListener("click", function() { if ($("#st-load-file input").files[0]) { var theFile = $("#st-load-file input").files[0].type; if (theFile == "application/json") { var file = $("#st-load-file input").files[0]; actionFile(file); } else { alert("Invalid file type. Please upload a JSON file."); } } else { alert("Please select a file."); } }); $("#st-settings-button").addEventListener("click", function() { if ($("#startube13-settings-window.hid") != null) { $("#startube13-settings-window").classList.remove("hid"); } else if ($("#startube13-settings-window.hid") == null) { $("#startube13-settings-window").classList.add("hid"); } }); var arraySettings = document.querySelectorAll(".lb-setting"); arraySettings.forEach(itemRoot => { if (itemRoot) { var item = itemRoot.getAttribute("id"); var itemV = STS[item]; if (itemV == true) { itemRoot.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); }; } let list = document.querySelectorAll(".lb-setting"); list.forEach(item => { item.addEventListener("contextmenu", (e) => { e.preventDefault(); item.classList.add("startube-iron-setting"); }); }); } function changeSetting(thisElm) { var theSetting = thisElm.getAttribute("id"); var checked = thisElm.getAttribute("checked"); if (theSetting == "presetRegularPlayer") { STS.expModernPlayer = false; STS.expModernPlayerV2 = false; window.location.reload(); } if (theSetting == "presetModernPlayer") { STS.expModernPlayer = true; STS.expModernPlayerV2 = false; window.location.reload(); } if (theSetting == "presetModernPlayerV2") { STS.expModernPlayer = false; STS.expModernPlayerV2 = true; window.location.reload(); } if (theSetting == "RTD") { localStorage.removeItem("ST_SETTINGS"); localStorage.removeItem("starTubeConfigCreated"); window.location.reload(); } else { if (checked == "true") { STS[theSetting] = false; //localStorage.setItem(theSetting,"false"); thisElm.setAttribute("checked","false"); applySettings(); } else { STS[theSetting] = true; //localStorage.setItem(theSetting,"true"); thisElm.setAttribute("checked","true"); applySettings(); } } function disableOtherPresets(preset) { STS.presetAozora2011 = false; STS.presetCosmicPanda = false; STS.presetEpicPanda = false; STS.presetHitchhiker2013_1 = false; STS.presetHitchhiker2013_1Alt = false; STS.presetHitchhiker2013_2 = false; STS.presetHitchhiker2013_2Alt = false; STS.presetHitchhiker2013_3 = false; STS.presetHitchhiker2013_3Alt = false; STS.presetHitchhiker2014 = false; STS.presetHitchhiker2014Alt = false; STS.presetHitchhiker2015 = false; STS.presetHitchhiker2015Alt = false; STS.presetHitchhiker2016 = false; STS.presetHitchhiker2016Alt = false; STS.presetHitchhiker2017 = false; STS.presetHitchhiker2017Alt = false; STS.presetPolymer2016 = false; STS.presetPolymer2019 = false; STS.presetPolymer2020 = false; STS.presetPolymer2021 = false; STS.presetPolymer2022 = false; STS[preset] = true; } if (theSetting == "STPresetsAlsoSetV3Settings") { STPresetsAlsoSetV3Settings == checked; window.location.reload(); } if (theSetting == "presetWatch9") { STS.expRelatedTabs = true; STS.expRelatedTabsHoldsSubscribe = true; STS.expWatch9 = true; STS.expWatch9NoOwner = true; STS.expWatch9TrueExpander = false; STS.expVerticalWatch9 = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expWatch9ReportTab = true; STS.expRelatedGrid = false; STS.expWatch8 = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = false; STS.expWatch9A = false; STS.expWatch9B = false; STS.expWatch10Beta = false; STS.expWMRButtonsLowercase = false; } if (theSetting == "presetWatch9ThreeColumns") { STS.expRelatedTabs = false; STS.expRelatedTabsHoldsSubscribe = false; STS.expWatch9 = true; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expVerticalWatch9 = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expWatch9ReportTab = true; STS.expRelatedGrid = false; STS.expWatch8 = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = false; STS.expWatch9A = false; STS.expWatch9B = false; STS.expWatch10Beta = false; STS.expWMRButtonsLowercase = false; } if (theSetting == "presetWatch9Fancy") { STS.expRelatedTabs = true; STS.expRelatedTabsHoldsSubscribe = true; STS.expWatch9 = true; STS.expWatch9NoOwner = true; STS.expWatch9TrueExpander = false; STS.expVerticalWatch9 = true; STS.expWatch9SidebarBus = true; STS.expWatch9StickyColumns = true; STS.expWatch9ReportTab = true; STS.expRelatedGrid = false; STS.expWatch8 = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = false; STS.expWatch9A = false; STS.expWatch9B = false; STS.expWatch10Beta = false; STS.expWMRButtonsLowercase = false; } if (theSetting == "disableEverything") { localStorage.setItem(theSetting,"true"); var settingArray = document.querySelectorAll('[state-id="all"] .lb-setting[checked="true"]'); settingArray.forEach(item => { item.click(); }); window.location.reload(); } function presetSelected(theSetting) { disableOtherPresets(theSetting); applySettings(); window.location.reload(); } if ( theSetting == "presetAozora2011" ) { STCosmicPandaSettings(); STAozoraSettings(); presetSelected(theSetting); } if ( theSetting == "presetCosmicPanda" ) { STCosmicPandaSettings(); presetSelected(theSetting); } if ( theSetting == "presetEpicPanda" ) { STEpicPandaSettings(); presetSelected(theSetting); } if ( theSetting == "presetHitchhiker2013_1" ) { STModernHitchhikerSettings(); ST2014Settings(); ST2013Settings(); STMid2013Settings(); STEarly2013Settings(); STWatch7(); presetSelected(theSetting); } if ( theSetting == "presetHitchhiker2013_1Alt" ) { STModernHitchhikerSettings(); ST2014Settings(); ST2013Settings(); STMid2013Settings(); STEarly2013Settings(); STAltWatch9(); presetSelected(theSetting); } if ( theSetting == "presetHitchhiker2013_2" ) { STModernHitchhikerSettings(); ST2014Settings(); ST2013Settings(); STMid2013Settings(); STWatch7(); presetSelected(theSetting); } if ( theSetting == "presetHitchhiker2013_2Alt" ) { STModernHitchhikerSettings(); ST2014Settings(); ST2013Settings(); STMid2013Settings(); STAltWatch9(); presetSelected(theSetting); } if ( theSetting == "presetHitchhiker2013_3" ) { STModernHitchhikerSettings(); ST2014Settings(); ST2013Settings(); STWatch7(); presetSelected(theSetting); } if ( theSetting == "presetHitchhiker2013_3Alt" ) { STModernHitchhikerSettings(); ST2014Settings(); ST2013Settings(); STAltWatch9(); presetSelected(theSetting); } if ( theSetting == "presetHitchhiker2014" ) { STModernHitchhikerSettings(); ST2014Settings(); STWatch7(); presetSelected(theSetting); } if ( theSetting == "presetHitchhiker2014Alt" ) { STModernHitchhikerSettings(); ST2014Settings(); STAltWatch9(); presetSelected(theSetting); } if ( theSetting == "presetHitchhiker2015" ) { STModernHitchhikerSettings(); presetSelected(theSetting); } if ( theSetting == "presetHitchhiker2015Alt" ) { STModernHitchhikerSettings(); STAltWatch9(); presetSelected(theSetting); } if ( theSetting == "presetHitchhiker2016" ) { STModernHitchhikerSettings(); ST2016Settings(); presetSelected(theSetting); } if ( theSetting == "presetHitchhiker2016Alt" ) { STModernHitchhikerSettings(); ST2016Settings(); STAltWatch9(); presetSelected(theSetting); } if ( theSetting == "presetHitchhiker2017" ) { STModernHitchhikerSettings(); ST2016Settings(); ST2017Settings(); presetSelected(theSetting); } if ( theSetting == "presetHitchhiker2017Alt" ) { STModernHitchhikerSettings(); ST2016Settings(); ST2017Settings(); STAltWatch9(); presetSelected(theSetting); } if ( theSetting == "presetPolymer2016" ) { ST2019Settings(); ST2016PolySettings(); presetSelected(theSetting); } if ( theSetting == "presetPolymer2019" ) { ST2019Settings(); presetSelected(theSetting); } if ( theSetting == "presetPolymer2020" ) { ST2019Settings(); ST2020Settings(); presetSelected(theSetting); } if ( theSetting == "presetPolymer2021" ) { ST2019Settings(); ST2020Settings(); ST2021Settings(); presetSelected(theSetting); } if ( theSetting == "presetPolymer2022" ) { ST2019Settings(); ST2020Settings(); ST2021Settings(); ST2022Settings(); presetSelected(theSetting); } function STAltWatch9() { STS.expRelatedTabs = true; STS.expRelatedTabsHoldsSubscribe = true; STS.expWatch9 = true; STS.expWatch9NoOwner = true; STS.expWatch9TrueExpander = false; STS.expVerticalWatch9 = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expWatch9ReportTab = true; STS.expRelatedGrid = false; STS.expWatch8 = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = false; STS.expWatch9A = false; STS.expWatch9B = false; STS.expWatch10Beta = false; STS.expWMRButtonsLowercase = false; } function STWatch7() { STS.expRelatedTabs = false; STS.expRelatedTabsHoldsSubscribe = false; STS.expWatch9 = false; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expVerticalWatch9 = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expRelatedGrid = false; STS.expWatch8 = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = false; STS.expWatch9A = false; STS.expWatch9B = false; STS.expWatch10Beta = false; STS.expWMRButtonsLowercase = false; } function STModernHitchhikerSettings() { STS.expHomepageRedirectsToFeed = false; STS.expLogoLinksToFeed = false; STS.expLogoLinksToSubs = false; STS.expRelatedThumbsSizeMedium = false; STS.expRelatedThumbsSizeLarge = false; STS.expRelatedThumbsSizeStupid = false; STS.expAlwaysShowCompactDate = true; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = true; STS.expMoveGuideButtonToTopbar = false; STS.expRelatedTabs = false; STS.expRelatedTabsHoldsSubscribe = false; STS.expWatch9 = false; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expVerticalWatch9 = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expWatch9ReportTab = false; STS.expRelatedGrid = false; STS.expWatch8 = true; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = true; STS.expSharrow = false; STS.expGuideAlwaysPinned = false; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = false; STS.expTwoColumnSearchResults = false; STS.configNoTabTopBorder = true; STS.configWatch7SidebarCardShadow = true; STS.expFlatLogo = false; STS.expInvertLogo = false; STS.expGlossyLogo = false; STS.expClassicTitle = false; STS.expClassicGuide = false; STS.expClassicSubscribe = false; STS.expClassicStyles = false; STS.expClassicLtod = false; STS.expClassicButtons = false; STS.expBigSearchThumbs = false; STS.expBiggerSearchThumbs = false; STS.expModernStyles = true; STS.expModernTopbar = true; STS.expModernUpload = true; STS.expModernGuideButton = false; STS.expModernSearchIcon = false; STS.expSearchText = false; STS.expModernTitle = false; STS.expModernGuide = false; STS.expModernHome = true; STS.expTrueScrollableGuide = true; STS.expModernPlayer = true; STS.expModernPlayerV2 = false; STS.expViewsString = false; STS.expGoogleApps = false; STS.expCommentsFullWidth = true; STS.expNoByText = false; STS.expAccountMenu = true; STS.expStaticSite = false; STS.expHideAppbar = false; STS.expEpicWatch7 = false; STS.expEpicWatch7Flat = false; STS.expEpicHeader = false; STS.expEpicStyling = false; STS.expCosmicHeader = false; STS.expCosmicBG = false; STS.expCosmicButtons = false; STS.expCosmicStyles = false; STS.expCosmicComments = false; STS.expCosmicGuideStyle = false; STS.expCosmicGuideLayout = false; STS.expCosmicFeedsV1 = false; STS.expWatch5D = false; STS.expNoGuide = false; STS.expGuideOnFeedsOnly = false; STS.expAozoraHome = false; STS.expAozoraHeader = false; STS.expAozoraBG = false; STS.expAozoraStyles = false; STS.expAozoraSubscribe = false; STS.expAozoraTopbarLinks = false; STS.expWatch5C = false; STS.expHomeTab = false; STS.expRoboto = false; STS.expCenteredSearch = false; STS.expBigSearch = false; STS.expSecondarySearchIcon = false; STS.expMaterialSearch = false; STS.expPolymerShell = false; STS.expEarlyPolymerShell = false; STS.expEarlyPolymerGuide = false; STS.expPolymerGen2Colors = false; STS.expPolymerSubscribe = false; STS.expPolymerGen2Subscribe = false; STS.expPolymerStyles = false; STS.expPolymerChannels = false; STS.expPolymerComments = false; STS.expPolymerTooltips = false; STS.expRichGridHome = false; STS.expWatch9A = false; STS.expWatch9B = false; STS.expWatch10Beta = false; STS.expWMRButtonsLowercase = false; STS.expOutlineIcons = false; STS.expRoundedTopbarPfp = false; STS.expUploadIcon = false; STS.expHideYoodles = false; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("nirvana15"); } } function ST2016Settings() { STS.expRelatedThumbsSizeLarge = true; STS.expSharrow = true; STS.expFlatLogo = true; STS.expModernGuideButton = true; STS.expModernSearchIcon = true; STS.expSearchText = true; STS.expModernTitle = true; STS.expModernGuide = true; STS.expModernHome = true; STS.expTrueScrollableGuide = true; STS.expModernPlayer = false; STS.expModernPlayerV2 = true; STS.expViewsString = true; STS.expNoByText = true; STS.expHomeTab = true; STS.expRoboto = true; STS.expRoundedTopbarPfp = true; STS.expHideYoodles = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("nirvana16"); } } function ST2017Settings() { STS.expFlatLogo = false; STS.expInvertLogo = true; STS.expBigSearchThumbs = true; STS.expUploadIcon = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("nirvana16"); } } function ST2014Settings() { STS.expModernStyles = false; STS.expModernGuideButton = false; STS.expModernSearchIcon = false; STS.expModernHome = false; STS.expModernTopbar = false; STS.expTrueScrollableGuide = false; STS.expModernPlayer = false; STS.expModernPlayerV2 = false; STS.expAccountMenu = false; STS.expHideYoodles = false; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("nirvana14"); } } function ST2013Settings() { if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("hitchhiker13"); } } function STMid2013Settings() { STS.expClassicLtod = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("hitchhiker13mid"); } } function STEarly2013Settings() { STS.expClassicTitle = true; STS.expClassicGuide = true; STS.expClassicSubscribe = true; STS.expClassicStyles = true; STS.expClassicLtod = true; STS.expClassicButtons = true; STS.expAozoraHome = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("hitchhiker13early"); } } function STEpicPandaSettings() { STS.expHomepageRedirectsToFeed = false; STS.expLogoLinksToFeed = true; STS.expLogoLinksToSubs = false; STS.expRelatedThumbsSizeMedium = false; STS.expRelatedThumbsSizeLarge = false; STS.expRelatedThumbsSizeStupid = false; STS.expAlwaysShowCompactDate = true; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = true; STS.expMoveGuideButtonToTopbar = false; STS.expRelatedTabs = false; STS.expRelatedTabsHoldsSubscribe = false; STS.expWatch9 = false; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expVerticalWatch9 = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expWatch9ReportTab = false; STS.expRelatedGrid = false; STS.expWatch8 = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = false; STS.expGuideAlwaysPinned = false; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = true; STS.expTwoColumnSearchResults = false; STS.configNoTabTopBorder = true; STS.configWatch7SidebarCardShadow = true; STS.expFlatLogo = false; STS.expInvertLogo = false; STS.expGlossyLogo = false; STS.expClassicTitle = false; STS.expClassicGuide = false; STS.expClassicSubscribe = false; STS.expClassicStyles = false; STS.expClassicLtod = false; STS.expClassicButtons = true; STS.expBigSearchThumbs = false; STS.expBiggerSearchThumbs = false; STS.expModernStyles = false; STS.expModernTopbar = false; STS.expModernUpload = true; STS.expModernGuideButton = false; STS.expModernSearchIcon = false; STS.expSearchText = false; STS.expModernTitle = false; STS.expModernGuide = false; STS.expModernHome = false; STS.expTrueScrollableGuide = false; STS.expModernPlayer = false; STS.expModernPlayerV2 = false; STS.expViewsString = false; STS.expGoogleApps = false; STS.expCommentsFullWidth = true; STS.expNoByText = false; STS.expAccountMenu = false; STS.expStaticSite = true; STS.expHideAppbar = true; STS.expEpicWatch7 = true; STS.expEpicWatch7Flat = true; STS.expEpicHeader = true; STS.expEpicStyling = true; STS.expCosmicHeader = false; STS.expCosmicBG = false; STS.expCosmicButtons = false; STS.expCosmicStyles = false; STS.expCosmicComments = false; STS.expCosmicGuideStyle = false; STS.expCosmicGuideLayout = true; STS.expCosmicFeedsV1 = false; STS.expWatch5D = false; STS.expNoGuide = false; STS.expGuideOnFeedsOnly = true; STS.expAozoraHome = true; STS.expAozoraHeader = false; STS.expAozoraBG = false; STS.expAozoraStyles = false; STS.expAozoraSubscribe = false; STS.expAozoraTopbarLinks = false; STS.expWatch5C = false; STS.expHomeTab = false; STS.expRoboto = false; STS.expCenteredSearch = false; STS.expBigSearch = false; STS.expSecondarySearchIcon = false; STS.expMaterialSearch = false; STS.expPolymerShell = false; STS.expEarlyPolymerShell = false; STS.expEarlyPolymerGuide = false; STS.expPolymerGen2Colors = false; STS.expPolymerSubscribe = false; STS.expPolymerGen2Subscribe = false; STS.expPolymerStyles = false; STS.expPolymerChannels = false; STS.expPolymerComments = false; STS.expPolymerTooltips = false; STS.expRichGridHome = false; STS.expWatch9A = false; STS.expWatch9B = false; STS.expWatch10Beta = false; STS.expWMRButtonsLowercase = false; STS.expOutlineIcons = false; STS.expRoundedTopbarPfp = false; STS.expUploadIcon = false; STS.expHideYoodles = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("cosmic"); } } function STCosmicPandaSettings() { STS.expHomepageRedirectsToFeed = true; STS.expLogoLinksToFeed = true; STS.expLogoLinksToSubs = false; STS.expRelatedThumbsSizeMedium = false; STS.expRelatedThumbsSizeLarge = false; STS.expRelatedThumbsSizeStupid = false; STS.expAlwaysShowCompactDate = true; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = true; STS.expMoveGuideButtonToTopbar = false; STS.expRelatedTabs = false; STS.expRelatedTabsHoldsSubscribe = false; STS.expWatch9 = false; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expVerticalWatch9 = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expWatch9ReportTab = false; STS.expRelatedGrid = false; STS.expWatch8 = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = false; STS.expGuideAlwaysPinned = false; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = false; STS.expTwoColumnSearchResults = false; STS.configNoTabTopBorder = true; STS.configWatch7SidebarCardShadow = true; STS.expFlatLogo = false; STS.expInvertLogo = false; STS.expGlossyLogo = false; STS.expClassicTitle = false; STS.expClassicGuide = false; STS.expClassicSubscribe = false; STS.expClassicStyles = false; STS.expClassicLtod = false; STS.expClassicButtons = false; STS.expBigSearchThumbs = false; STS.expBiggerSearchThumbs = false; STS.expModernStyles = false; STS.expModernTopbar = false; STS.expModernUpload = true; STS.expModernGuideButton = false; STS.expModernSearchIcon = false; STS.expSearchText = false; STS.expModernTitle = false; STS.expModernGuide = false; STS.expModernHome = false; STS.expTrueScrollableGuide = true; STS.expModernPlayer = false; STS.expModernPlayerV2 = false; STS.expViewsString = false; STS.expGoogleApps = false; STS.expCommentsFullWidth = true; STS.expNoByText = false; STS.expAccountMenu = false; STS.expStaticSite = true; STS.expHideAppbar = true; STS.expEpicWatch7 = false; STS.expEpicWatch7Flat = false; STS.expEpicHeader = false; STS.expEpicStyling = false; STS.expCosmicHeader = true; STS.expCosmicBG = true; STS.expCosmicButtons = true; STS.expCosmicStyles = true; STS.expCosmicComments = true; STS.expCosmicGuideStyle = true; STS.expCosmicGuideLayout = true; STS.expCosmicFeedsV1 = true; STS.expWatch5D = true; STS.expNoGuide = false; STS.expGuideOnFeedsOnly = true; STS.expAozoraHome = true; STS.expAozoraHeader = false; STS.expAozoraBG = false; STS.expAozoraStyles = false; STS.expAozoraSubscribe = false; STS.expAozoraTopbarLinks = true; STS.expWatch5C = false; STS.expHomeTab = false; STS.expRoboto = false; STS.expCenteredSearch = false; STS.expBigSearch = false; STS.expSecondarySearchIcon = false; STS.expMaterialSearch = false; STS.expPolymerShell = false; STS.expEarlyPolymerShell = false; STS.expEarlyPolymerGuide = false; STS.expPolymerGen2Colors = false; STS.expPolymerSubscribe = false; STS.expPolymerGen2Subscribe = false; STS.expPolymerStyles = false; STS.expPolymerChannels = false; STS.expPolymerComments = false; STS.expPolymerTooltips = false; STS.expRichGridHome = false; STS.expWatch9A = false; STS.expWatch9B = false; STS.expWatch10Beta = false; STS.expWMRButtonsLowercase = false; STS.expOutlineIcons = false; STS.expRoundedTopbarPfp = false; STS.expUploadIcon = false; STS.expHideYoodles = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("cosmic"); } } function STAozoraSettings() { STS.expHomepageRedirectsToFeed = false; STS.expLogoLinksToFeed = false; STS.expCosmicHeader = false; STS.expCosmicBG = false; STS.expCosmicButtons = false; STS.expCosmicStyles = false; STS.expCosmicComments = false; STS.expCosmicGuideStyle = false; STS.expCosmicGuideLayout = true; STS.expCosmicFeedsV1 = false; STS.expWatch5D = false; STS.expAozoraHeader = true; STS.expAozoraBG = true; STS.expAozoraStyles = true; STS.expAozoraSubscribe = true; STS.expWatch5C = true; } function ST2019Settings() { STS.expHomepageRedirectsToFeed = false; STS.expLogoLinksToFeed = false; STS.expLogoLinksToSubs = false; STS.expRelatedThumbsSizeMedium = false; STS.expRelatedThumbsSizeLarge = true; STS.expRelatedThumbsSizeStupid = false; STS.expAlwaysShowCompactDate = true; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = true; STS.expMoveGuideButtonToTopbar = false; STS.expRelatedTabs = false; STS.expRelatedTabsHoldsSubscribe = false; STS.expWatch9 = false; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expVerticalWatch9 = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expWatch9ReportTab = false; STS.expRelatedGrid = false; STS.expWatch8 = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = true; STS.expSharrow = true; STS.expGuideAlwaysPinned = false; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = false; STS.expTwoColumnSearchResults = false; STS.configNoTabTopBorder = true; STS.configWatch7SidebarCardShadow = true; STS.expFlatLogo = false; STS.expInvertLogo = true; STS.expGlossyLogo = false; STS.expClassicTitle = false; STS.expClassicGuide = false; STS.expClassicSubscribe = false; STS.expClassicStyles = false; STS.expClassicLtod = false; STS.expClassicButtons = false; STS.expBigSearchThumbs = true; STS.expBiggerSearchThumbs = false; STS.expModernStyles = false; STS.expModernTopbar = true; STS.expModernUpload = true; STS.expModernGuideButton = true; STS.expModernSearchIcon = true; STS.expSearchText = true; STS.expModernTitle = true; STS.expModernGuide = true; STS.expModernHome = true; STS.expTrueScrollableGuide = true; STS.expModernPlayer = false; STS.expModernPlayerV2 = true; STS.expViewsString = true; STS.expGoogleApps = false; STS.expCommentsFullWidth = true; STS.expNoByText = true; STS.expAccountMenu = true; STS.expStaticSite = false; STS.expHideAppbar = true; STS.expEpicWatch7 = false; STS.expEpicWatch7Flat = false; STS.expEpicHeader = false; STS.expEpicStyling = false; STS.expCosmicHeader = false; STS.expCosmicBG = false; STS.expCosmicButtons = false; STS.expCosmicStyles = false; STS.expCosmicComments = false; STS.expCosmicGuideStyle = false; STS.expCosmicGuideLayout = false; STS.expCosmicFeedsV1 = false; STS.expWatch5D = false; STS.expNoGuide = false; STS.expGuideOnFeedsOnly = false; STS.expAozoraHome = false; STS.expAozoraHeader = false; STS.expAozoraBG = false; STS.expAozoraStyles = false; STS.expAozoraSubscribe = false; STS.expAozoraTopbarLinks = false; STS.expWatch5C = false; STS.expHomeTab = true; STS.expRoboto = true; STS.expCenteredSearch = true; STS.expBigSearch = false; STS.expSecondarySearchIcon = false; STS.expMaterialSearch = false; STS.expPolymerShell = true; STS.expEarlyPolymerShell = false; STS.expEarlyPolymerGuide = false; STS.expPolymerGen2Colors = false; STS.expPolymerSubscribe = true; STS.expPolymerGen2Subscribe = false; STS.expPolymerStyles = true; STS.expPolymerChannels = true; STS.expPolymerComments = true; STS.expPolymerTooltips = true; STS.expRichGridHome = false; STS.expWatch9A = true; STS.expWatch9B = false; STS.expWatch10Beta = false; STS.expWMRButtonsLowercase = false; STS.expOutlineIcons = false; STS.expRoundedTopbarPfp = true; STS.expUploadIcon = true; STS.expHideYoodles = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("poly16"); } } function ST2016PolySettings() { STS.expFlatLogo = true; STS.expInvertLogo = false; STS.expBigSearch = true; STS.expMaterialSearch = true; STS.expEarlyPolymerShell = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("poly16"); } } function ST2020Settings() { STS.expBigSearchThumbs = false; STS.expBiggerSearchThumbs = true; STS.expPolymerGen2Colors = true; STS.expPolymerGen2Subscribe = true; STS.expWatch9A = false; STS.expWatch9B = true; STS.expRichGridHome = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("poly16"); } } function ST2021Settings() { STS.expBigSearch = true; STS.expOutlineIcons = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("poly16"); } } function ST2022Settings() { STS.expSecondarySearchIcon = true; STS.expWatch9A = false; STS.expWatch9B = false; STS.expWatch10Beta = true; STS.expWMRButtonsLowercase = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("poly16"); } } } } function setV3Settings(preset) { if (preset == "poly16") { V3_SETTINGS_CONF.APPBAR_FLEXWATCH_MINI = true; V3_SETTINGS_CONF.SITE_CENTER_ALIGNED = true; V3_SETTINGS_CONF.APPBAR_GUIDE = true; V3_SETTINGS_CONF.MASTHEAD_APPBAR_LAUNCH = true; V3_SETTINGS_CONF.PROMINENT_UPLOAD_BUTTON = false; V3_SETTINGS_CONF.APPBAR_GUIDE_BUTTON_SIMPLE_STYLE = true; V3_SETTINGS_CONF.SITE_AS_GIANT_CARD = true; V3_SETTINGS_CONF.NEW_APPBAR_GUIDE_ICONS = true; V3_SETTINGS_CONF.APPBAR_GUIDE_PINNING = true; V3_SETTINGS_CONF.CARDIFIED_PAGE = false; V3_SETTINGS_CONF.INDIVIDUAL_CARDS_WATCH = false; V3_SETTINGS_CONF.WATCH7_ACTION_PANELS_USE_ICONS = false; V3_SETTINGS_CONF.WATCH7_TEXT_RATING = false; V3_SETTINGS_CONF.MASTHEAD_APPBAR_FUSION = true; V3_SETTINGS_CONF.WATCH8 = false; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.W2W_AS_LOHP_EVERYTIME = false; V3_SETTINGS_CONF.LOHP_VIDEO_FIX_THUMB_ASPECTRATIO = false; V3_SETTINGS_CONF.APPBAR_GUIDE_SCROLL = false; V3_SETTINGS_CONF.BODY_LEGACY_BACKGROUND = false; } if (preset == "hitchhiker13") { V3_SETTINGS_CONF.APPBAR_FLEXWATCH_MINI = false; V3_SETTINGS_CONF.SITE_CENTER_ALIGNED = false; V3_SETTINGS_CONF.APPBAR_GUIDE = false; V3_SETTINGS_CONF.MASTHEAD_APPBAR_LAUNCH = false; V3_SETTINGS_CONF.PROMINENT_UPLOAD_BUTTON = false; V3_SETTINGS_CONF.APPBAR_GUIDE_BUTTON_SIMPLE_STYLE = false; V3_SETTINGS_CONF.SITE_AS_GIANT_CARD = false; V3_SETTINGS_CONF.NEW_APPBAR_GUIDE_ICONS = false; V3_SETTINGS_CONF.APPBAR_GUIDE_PINNING = false; V3_SETTINGS_CONF.CARDIFIED_PAGE = false; V3_SETTINGS_CONF.INDIVIDUAL_CARDS_WATCH = false; V3_SETTINGS_CONF.WATCH7_ACTION_PANELS_USE_ICONS = false; V3_SETTINGS_CONF.WATCH7_TEXT_RATING = false; V3_SETTINGS_CONF.MASTHEAD_APPBAR_FUSION = false; V3_SETTINGS_CONF.WATCH8 = false; V3_SETTINGS_CONF.NEW_LOGO = true; V3_SETTINGS_CONF.BODY_LEGACY_BACKGROUND = false; } if (preset == "hitchhiker13mid") { V3_SETTINGS_CONF.NEW_LOGO = false; V3_SETTINGS_CONF.W2W_AS_LOHP_EVERYTIME = false; V3_SETTINGS_CONF.LOHP_VIDEO_FIX_THUMB_ASPECTRATIO = false; V3_SETTINGS_CONF.BODY_LEGACY_BACKGROUND = false; } if (preset == "hitchhiker13early") { V3_SETTINGS_CONF.NEW_LOGO = false; V3_SETTINGS_CONF.W2W_AS_LOHP_EVERYTIME = true; V3_SETTINGS_CONF.LOHP_VIDEO_FIX_THUMB_ASPECTRATIO = true; V3_SETTINGS_CONF.BODY_LEGACY_BACKGROUND = true; } if (preset == "nirvana14") { V3_SETTINGS_CONF.APPBAR_FLEXWATCH_MINI = false; V3_SETTINGS_CONF.SITE_CENTER_ALIGNED = true; V3_SETTINGS_CONF.APPBAR_GUIDE = true; V3_SETTINGS_CONF.MASTHEAD_APPBAR_LAUNCH = true; V3_SETTINGS_CONF.PROMINENT_UPLOAD_BUTTON = false; V3_SETTINGS_CONF.APPBAR_GUIDE_BUTTON_SIMPLE_STYLE = true; V3_SETTINGS_CONF.SITE_AS_GIANT_CARD = true; V3_SETTINGS_CONF.NEW_APPBAR_GUIDE_ICONS = true; V3_SETTINGS_CONF.APPBAR_GUIDE_PINNING = true; V3_SETTINGS_CONF.CARDIFIED_PAGE = true; V3_SETTINGS_CONF.INDIVIDUAL_CARDS_WATCH = false; V3_SETTINGS_CONF.WATCH7_ACTION_PANELS_USE_ICONS = false; V3_SETTINGS_CONF.WATCH7_TEXT_RATING = false; V3_SETTINGS_CONF.MASTHEAD_APPBAR_FUSION = true; V3_SETTINGS_CONF.WATCH8 = false; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.APPBAR_GUIDE_SCROLL = true; V3_SETTINGS_CONF.NEW_LOGO = true; V3_SETTINGS_CONF.BODY_LEGACY_BACKGROUND = false; } if (preset == "nirvana15") { V3_SETTINGS_CONF.APPBAR_FLEXWATCH_MINI = true; V3_SETTINGS_CONF.SITE_CENTER_ALIGNED = true; V3_SETTINGS_CONF.APPBAR_GUIDE = true; V3_SETTINGS_CONF.MASTHEAD_APPBAR_LAUNCH = true; V3_SETTINGS_CONF.PROMINENT_UPLOAD_BUTTON = false; V3_SETTINGS_CONF.APPBAR_GUIDE_BUTTON_SIMPLE_STYLE = true; V3_SETTINGS_CONF.SITE_AS_GIANT_CARD = true; V3_SETTINGS_CONF.NEW_APPBAR_GUIDE_ICONS = true; V3_SETTINGS_CONF.APPBAR_GUIDE_PINNING = true; V3_SETTINGS_CONF.CARDIFIED_PAGE = true; V3_SETTINGS_CONF.INDIVIDUAL_CARDS_WATCH = true; V3_SETTINGS_CONF.WATCH7_ACTION_PANELS_USE_ICONS = false; V3_SETTINGS_CONF.WATCH7_TEXT_RATING = false; V3_SETTINGS_CONF.MASTHEAD_APPBAR_FUSION = true; V3_SETTINGS_CONF.WATCH8 = false; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.APPBAR_GUIDE_SCROLL = false; V3_SETTINGS_CONF.NEW_LOGO = true; V3_SETTINGS_CONF.BODY_LEGACY_BACKGROUND = false; } if (preset == "nirvana16") { V3_SETTINGS_CONF.APPBAR_FLEXWATCH_MINI = true; V3_SETTINGS_CONF.SITE_CENTER_ALIGNED = true; V3_SETTINGS_CONF.APPBAR_GUIDE = true; V3_SETTINGS_CONF.MASTHEAD_APPBAR_LAUNCH = true; V3_SETTINGS_CONF.PROMINENT_UPLOAD_BUTTON = false; V3_SETTINGS_CONF.APPBAR_GUIDE_BUTTON_SIMPLE_STYLE = true; V3_SETTINGS_CONF.SITE_AS_GIANT_CARD = true; V3_SETTINGS_CONF.NEW_APPBAR_GUIDE_ICONS = true; V3_SETTINGS_CONF.APPBAR_GUIDE_PINNING = true; V3_SETTINGS_CONF.CARDIFIED_PAGE = true; V3_SETTINGS_CONF.INDIVIDUAL_CARDS_WATCH = true; V3_SETTINGS_CONF.WATCH7_ACTION_PANELS_USE_ICONS = false; V3_SETTINGS_CONF.WATCH7_TEXT_RATING = false; V3_SETTINGS_CONF.MASTHEAD_APPBAR_FUSION = true; V3_SETTINGS_CONF.WATCH8 = false; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.W2W_AS_LOHP_EVERYTIME = false; V3_SETTINGS_CONF.LOHP_VIDEO_FIX_THUMB_ASPECTRATIO = false; V3_SETTINGS_CONF.APPBAR_GUIDE_SCROLL = false; V3_SETTINGS_CONF.BODY_LEGACY_BACKGROUND = false; } else if (preset == "cosmic") { V3_SETTINGS_CONF.APPBAR_FLEXWATCH_MINI = false; V3_SETTINGS_CONF.SITE_CENTER_ALIGNED = true; V3_SETTINGS_CONF.APPBAR_GUIDE = true; V3_SETTINGS_CONF.MASTHEAD_APPBAR_LAUNCH = true; V3_SETTINGS_CONF.PROMINENT_UPLOAD_BUTTON = false; V3_SETTINGS_CONF.APPBAR_GUIDE_BUTTON_SIMPLE_STYLE = true; V3_SETTINGS_CONF.SITE_AS_GIANT_CARD = true; V3_SETTINGS_CONF.NEW_APPBAR_GUIDE_ICONS = true; V3_SETTINGS_CONF.APPBAR_GUIDE_PINNING = true; V3_SETTINGS_CONF.CARDIFIED_PAGE = false; V3_SETTINGS_CONF.WATCH7_ACTION_PANELS_USE_ICONS = false; V3_SETTINGS_CONF.WATCH7_TEXT_RATING = true; V3_SETTINGS_CONF.MASTHEAD_APPBAR_FUSION = true; V3_SETTINGS_CONF.WATCH8 = false; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.W2W_AS_LOHP_EVERYTIME = true; V3_SETTINGS_CONF.LOHP_VIDEO_FIX_THUMB_ASPECTRATIO = true; V3_SETTINGS_CONF.APPBAR_GUIDE_SCROLL = false; V3_SETTINGS_CONF.BODY_LEGACY_BACKGROUND = false; } var V3_SETTINGS = localStorage.getItem("v3_local_db"); V3_SETTINGS = JSON.parse(V3_SETTINGS); V3_SETTINGS.config.db.yt = V3_SETTINGS_CONF; V3_SETTINGS = JSON.stringify(V3_SETTINGS); localStorage.setItem("v3_local_db",V3_SETTINGS); } 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 createPopups() { if ($("#wmr-popups")) { $("#wmr-popups").remove(); } let container = $(".spitfire-body-container"); var newElem = document.createElement("div"); newElem.id = "wmr-popups"; newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[1]); document.querySelector("html").setAttribute("addto-visible", "false"); document.querySelector("html").setAttribute("share-visible", "false"); document.querySelector("html").setAttribute("more-visible", "false"); document.querySelector("html").setAttribute("popup-visible", "false"); if (document.querySelector("#wmr-popups #action-panel-addto") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(3)").click(); } if (document.querySelector("#wmr-popups #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('#wmr-addto-popup div'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if (document.querySelector("#wmr-popups #action-panel-share") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(2)").click(); } if (document.querySelector("#wmr-popups #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('#wmr-share-popup div'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } var nonfloater = document.querySelector("#wmr-fence"); var addTo = document.querySelector("[js-addto]"); var share = document.querySelector("[js-share]"); /*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("#wmr-addto-popup").setAttribute("visible", "false"); document.querySelector("#wmr-share-popup").setAttribute("visible", "false"); document.querySelector("#wmr-fence").setAttribute("visible", "false"); document.querySelector("html").setAttribute("addto-visible", "false"); document.querySelector("html").setAttribute("share-visible", "false"); document.querySelector("html").setAttribute("more-visible", "false"); document.querySelector("html").setAttribute("popup-visible", "false"); }); addTo.addEventListener("click", function() { if (document.querySelector("#wmr-addto-popup[visible='false']") != null) { document.querySelector("#wmr-addto-popup").setAttribute("visible", "true"); document.querySelector("#wmr-fence").setAttribute("visible", "true"); document.querySelector("html").setAttribute("addto-visible", "true"); document.querySelector("html").setAttribute("popup-visible", "true"); } else { document.querySelector("#wmr-addto-popup").setAttribute("visible", "false"); document.querySelector("#wmr-fence").setAttribute("visible", "false"); document.querySelector("html").setAttribute("addto-visible", "false"); document.querySelector("html").setAttribute("popup-visible", "false"); } }); share.addEventListener("click", function() { if (document.querySelector("#wmr-share-popup[visible='false']") != null) { document.querySelector("#wmr-share-popup").setAttribute("visible", "true"); document.querySelector("#wmr-fence").setAttribute("visible", "true"); document.querySelector("html").setAttribute("share-visible", "true"); document.querySelector("html").setAttribute("popup-visible", "true"); } else { document.querySelector("#wmr-share-popup").setAttribute("visible", "false"); document.querySelector("#wmr-fence").setAttribute("visible", "false"); document.querySelector("html").setAttribute("share-visible", "false"); document.querySelector("html").setAttribute("popup-visible", "false"); } }); } function createRealWatch9(number) { if (document.querySelector(".cardified-page.exp-individual-cards-watch") == null) { //number++; } let container = document.querySelector('#watch7-content.watch-content .yt-uix-button-panel'); container = $("#watch7-content.watch-content"); var altWatch9 = document.createElement("div"); altWatch9.id = "watch9-container"; altWatch9.innerHTML = `
`; container.insertBefore(altWatch9, container.children[number]); $("#wmr-actions-container").innerHTML = STH.WMR_ACTIONS; createPopups(); var elm = "#watch9-container"; waitForElement(elm).then(function(elm) { if (canGo != false) { addIcons(); if (document.querySelector("#watch9-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('#watch9-sentiment-actions'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if (document.querySelector("#watch9-desc #watch-description") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector("#watch-description"); var newHome5 = document.querySelector('#watch9-desc'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if (document.querySelector("#watch9-owner #watch7-subscription-container") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector("#watch7-subscription-container"); var newHome5 = document.querySelector('#watch9-subscribe'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if (document.querySelector("#watch9-container .video-extras-sparkbars") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector(".video-extras-sparkbars"); var newHome5 = document.querySelector('#watch7-sentiment-actions'); newHome5.insertBefore(thePanel, newHome5.children[1]); } }); } if (document.querySelector("#watch9-container .watch-view-count") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector(".watch-view-count"); var newHome5 = document.querySelector('#watch9-view-count'); newHome5.insertBefore(thePanel, newHome5.children[1]); } }); } if (document.querySelector("#watch9-container .watch-title") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector(".watch-title"); var newHome5 = document.querySelector('#watch9-title'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if (document.querySelector("#watch9-container .yt-user-photo") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector(".yt-user-photo"); var newHome5 = document.querySelector('#watch9-pfp'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if (document.querySelector("#watch9-container .yt-user-name") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector("#watch7-user-header"); var newHome5 = document.querySelector('#watch9-channel-name'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if (document.querySelector("#watch9-container #watch9-subtitle #watch-uploader-info") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector("#watch-uploader-info"); var newHome5 = document.querySelector('#watch9-publish-date'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } var elm = "#watch-uploader-info"; waitForElement(elm).then(function(elm) { if (canGo != false) { applyMetadata(); } }); function applyMetadata() { if (document.querySelector(".yt-subscription-button-subscriber-count-branded-horizontal") != null) { var subCount = document.querySelector(".yt-subscription-button-subscriber-count-branded-horizontal").textContent; document.querySelector("#watch9-sub-count").textContent = subCount + " subscribers"; } if (document.querySelector("#watch-uploader-info") != null) { var date = document.querySelector("#watch-uploader-info").textContent; date = date.split("on ")[1]; document.querySelector("#watch9-upload-date span").textContent = date; } } } }); } function createWatch10(number) { if (document.querySelector(".cardified-page.exp-individual-cards-watch") == null) { //number++; } let container = document.querySelector('#watch7-content.watch-content .yt-uix-button-panel'); container = $("#watch7-content.watch-content"); var altWatch9 = document.createElement("div"); altWatch9.id = "watch10-container"; altWatch9.innerHTML = `
Comments
Add a comment...
`; container.insertBefore(altWatch9, container.children[number]); container = $("#watch7-sidebar"); var altWatch9 = document.createElement("div"); altWatch9.id = "watch-panels"; altWatch9.innerHTML = `
Comments
`; container.insertBefore(altWatch9, container.children[0]); $("#wmr-actions-container").innerHTML = STH.WMR_ACTIONS; createPopups(); var elm = "#watch10-container"; waitForElement(elm).then(function(elm) { if (canGo != false) { addIcons(); if (document.querySelector("#watch10-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('#watch10-sentiment-actions'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if (document.querySelector("#watch10-desc #watch-description") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector("#watch-description"); var newHome5 = document.querySelector('#watch10-desc'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if (document.querySelector("#watch10-owner #watch7-subscription-container") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector("#watch7-subscription-container"); var newHome5 = document.querySelector('#watch10-subscribe'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if (document.querySelector("#watch10-container .video-extras-sparkbars") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector(".video-extras-sparkbars"); var newHome5 = document.querySelector('#watch7-sentiment-actions'); newHome5.insertBefore(thePanel, newHome5.children[1]); } }); } if (document.querySelector("#watch10-desc #watch10-views-info") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { let container = $("#eow-description"); let newElem = document.createElement("span"); newElem.id = "watch10-views-info"; newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[0]); } }); } if (document.querySelector("#watch10-container .watch-view-count") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector(".watch-view-count"); var newHome5 = document.querySelector('#watch10-view-count'); newHome5.insertBefore(thePanel, newHome5.children[1]); } }); } if (document.querySelector("#watch10-container .watch-title") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector(".watch-title"); var newHome5 = document.querySelector('#watch10-title'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if (document.querySelector("#watch10-container .yt-user-photo") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector(".yt-user-photo"); var newHome5 = document.querySelector('#watch10-pfp'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if (document.querySelector("#watch10-container .yt-user-name") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector("#watch7-user-header"); var newHome5 = document.querySelector('#watch10-channel-name'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if ($("#yt-masthead-user .yt-masthead-user-icon img")) { let yourPfp = $("#yt-masthead-user .yt-masthead-user-icon img").src; $("#comment-teaser-your-pfp img").src = yourPfp; } $("#watch-description-expand span").textContent = "...more"; var elm = ".distiller_content"; waitForElement10(elm).then(function(elm) { if (canGo != false && $(".comment")) { $("#watch10-comment-teaser").setAttribute("has-comment",""); let count = $(".distiller_yt_headline span:nth-child(2)").textContent.split("(")[1].split(")")[0]; let comment = $(".comment"); let pfp = comment.querySelector(".distiller_yt-thread_avatar").src; let text = comment.querySelector(".text-content span").textContent; $("#comment-count span").textContent = count; $("#comment-teaser-pfp img").src = pfp; $("#comment-teaser-text span").textContent = text; $("#comment-panel .watch-panel-subtitle").textContent = count; } }); $("#watch10-comment-teaser").addEventListener("click", function() { handoffComments("forward"); }); $("#comment-panel-close").addEventListener("click", function() { handoffComments("backward"); }); /*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"); }); /*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() { if (document.querySelector(".yt-subscription-button-subscriber-count-branded-horizontal") != null) { var subCount = document.querySelector(".yt-subscription-button-subscriber-count-branded-horizontal").textContent; document.querySelector("#watch10-sub-count").textContent = subCount + " subscribers"; } if (document.querySelector("#watch-uploader-info") != null) { var date = document.querySelector("#watch-uploader-info").textContent; if (date.includes("on")) { date = date.split("on ")[1]; } document.querySelector("#watch10-upload-date").textContent = date; } /*if (document.querySelector("#watch9-container") != null) { var viewCount = document.querySelector(".watch-view-count").textContent; document.querySelector("#watch9-views-info #watch9-view-count span").textContent = viewCount; var videoLikes = document.querySelector("#watch8-action-buttons .video-extras-sparkbar-likes").getAttribute("style"); var videoDislikes = document.querySelector("#watch8-action-buttons .video-extras-sparkbar-dislikes").getAttribute("style"); document.querySelector("#watch9-info .video-extras-sparkbar-likes").setAttribute("style", videoLikes); document.querySelector("#watch9-info .video-extras-sparkbar-dislikes").setAttribute("style", videoDislikes); var ltodBar = document.querySelector("#watch9-info .video-extras-sparkbars"); var likesPercent = ltodBar.querySelector("#watch9-info .video-extras-sparkbar-likes").style.width; ltodBar.setAttribute("data-tooltip-text", likesPercent + " of viewers like this video"); ltodBar.style.display = "block"; ltodBar.style.padding = "5px 0"; ltodBar.style.marginBottom = "-5px"; document.querySelector(".watch-view-count").style.marginBottom = "-3px"; } if (document.querySelector("#watch-uploader-info") != null) { var uploadDateRaw = document.querySelector("#watch-uploader-info").textContent; let notNeedNewString = uploadDateRaw.includes("Published"); if (notNeedNewString == true) { var cutString = uploadDateRaw.split('on '); var uploadDate = cutString[1]; document.querySelector("#first-part").style.display = "inline"; document.querySelector("#third-part").style.display = "none"; } else { var uploadDate = uploadDateRaw; document.querySelector("#first-part").style.display = "none"; document.querySelector("#third-part").style.display = "inline"; } document.querySelector(".watch9-upload-date .upload-date").textContent = uploadDate; } if (document.querySelector("#eow-description") != null) { var descElem = document.querySelector("#watch-description-text"); var newHome = document.querySelector('#watch9-description .description-inner'); newHome.insertBefore(descElem, newHome.children[0]); var descHTML = document.querySelector("#eow-description").innerHTML; document.querySelector(".desc-snippet .description-inner").innerHTML = descHTML; //document.querySelector("#watch9-description .description-inner").innerHTML = descHTML; }*/ } } }); } function handoffComments(dir) { if (dir == "forward") { var thePanel = document.querySelector(".comments-iframe-container"); var newHome = document.querySelector("#comment-panel [js-destination]"); newHome.insertBefore(thePanel, newHome.children[0]); $("html").setAttribute("comment-panel-open","true"); } if (dir == "backward") { var thePanel = document.querySelector(".comments-iframe-container"); var newHome = document.querySelector("#watch-discussion"); newHome.insertBefore(thePanel, newHome.children[0]); $("html").setAttribute("comment-panel-open","false"); } } //EXfunct function addIcons() { if (document.querySelector("#watch-like svg") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { let container = $("#watch-like .yt-uix-button-icon-wrapper"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[0]); } }); } if (document.querySelector("#watch-dislike svg") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { let container = $("#watch-dislike .yt-uix-button-icon-wrapper"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[0]); } }); } } function createWatch9(number) { let container = document.querySelector('#watch7-content.watch-content'); var altWatch9 = document.createElement("div"); altWatch9.id = "alt-watch9-container"; altWatch9.innerHTML = `
Uploaded by ???? on ??? ??, ???? by ????
Show more
Show less
Description
Show less
Add to playlist
This feature is unavailable.
See all
`; container.insertBefore(altWatch9, container.children[number]); var elm = ".watch9"; waitForElement(elm).then(function(elm) { if (canGo != false) { if (STS.expWatch9NoOwner == true) { document.querySelector(".watch9").setAttribute("show-owner", "false"); } if (document.querySelector("#watch9-addto #action-panel-addto") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(3)").click(); } if (document.querySelector("#watch9-addto #action-panel-addto") == null) { var elm = ".playlist-items"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var theAddToBtn = document.querySelector("#action-panel-addto"); var newHome = document.querySelector('#watch9-addto .slider-inner'); newHome.appendChild(theAddToBtn); } }); } if (document.querySelector("#watch9-share #action-panel-share") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(2)").click(); } if (document.querySelector("#alt-watch9-container #action-panel-share") == null) { setTimeout(() => { var theSharePanel = document.querySelector("#action-panel-share"); var newHome5 = document.querySelector('#watch9-share .slider-inner'); newHome5.insertBefore(theSharePanel, newHome5.children[1]); }, "1000"); } if (document.querySelector("#watch9-stats #action-panel-stats") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(5)").click(); } if (document.querySelector("#watch9-stats #action-panel-stats") == null) { var elm = ".metric-label"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var theAddToBtn = document.querySelector("#action-panel-stats"); var newHome = document.querySelector('#watch9-stats .slider-inner'); newHome.appendChild(theAddToBtn); } }); } if (document.querySelector("#watch7-secondary-actions .hid.yt-uix-button:nth-child(4)") == null) { if (document.querySelector("#watch9-stats #action-panel-transcript") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(4)").click(); } if (document.querySelector("#watch9-stats #action-panel-transcript") == null) { var elm = ".watch-transcript"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var theAddToBtn = document.querySelector("#action-panel-transcript"); var newHome = document.querySelector('#watch9-transcript .slider-inner'); newHome.appendChild(theAddToBtn); } }); } } else { document.querySelector("#transcript.sidebar-item").classList.add("hid"); $(".watch9").setAttribute("no-transcript",""); } var elm = "#watch-uploader-info"; waitForElement(elm).then(function(elm) { if (canGo != false) { applyMetadata(); } }); function applyMetadata() { if (document.querySelector("#eow-title") != null) { var videoTitle = document.querySelector("#eow-title").textContent; document.querySelector("#watch9-title span").textContent = videoTitle; } if (document.querySelector("#watch-uploader-info") != null) { var uploadDateRaw = document.querySelector("#watch-uploader-info").textContent; let notNeedNewString = uploadDateRaw.includes("Published"); if (notNeedNewString == true) { var cutString = uploadDateRaw.split('on '); var uploadDate = cutString[1]; document.querySelector("#first-part").style.display = "inline"; document.querySelector("#third-part").style.display = "none"; } else { var uploadDate = uploadDateRaw; document.querySelector("#first-part").style.display = "none"; document.querySelector("#third-part").style.display = "inline"; } document.querySelector(".watch9-upload-date .upload-date").textContent = uploadDate; } if (document.querySelector("#eow-description") != null) { var descElem = document.querySelector("#watch-description-text"); var newHome = document.querySelector('#watch9-description .description-inner'); newHome.insertBefore(descElem, newHome.children[0]); var descHTML = document.querySelector("#eow-description").innerHTML; document.querySelector(".desc-snippet .description-inner").innerHTML = descHTML; //document.querySelector("#watch9-description .description-inner").innerHTML = descHTML; } if (document.querySelector(".yt-user-name") != null) { var authorElem = document.querySelector("#watch7-user-header .yt-user-name"); var authorName = authorElem.textContent; var authorLink = document.querySelector(".yt-user-photo").getAttribute("href"); //var authorPfp = document.querySelector(".yt-user-photo img").getAttribute("data-thumb"); document.querySelector(".author-link").textContent = authorName; document.querySelector(".author-link").setAttribute("href", authorLink); document.querySelector("#third-part .author-link").textContent = authorName; document.querySelector("#third-part .author-link").setAttribute("href", authorLink); document.querySelector(".owner-videos-scroller a").setAttribute("href", authorLink + "/videos"); document.querySelector(".owner-videos-scroller a").setAttribute("data-tooltip-text", "View " + authorName + "'s videos"); authorElem.classList.add("yt-uix-tooltip"); authorElem.setAttribute("data-tooltip-text", "View " + authorName + "'s channel"); } if (document.querySelector("#watch8-action-buttons") != null) { var viewCount = document.querySelector("#watch8-action-buttons .watch-view-count").textContent; document.querySelector("#watch9-views-info .watch-view-count").textContent = viewCount; var videoLikes = document.querySelector("#watch8-action-buttons .video-extras-sparkbar-likes").getAttribute("style"); var videoDislikes = document.querySelector("#watch8-action-buttons .video-extras-sparkbar-dislikes").getAttribute("style"); document.querySelector("#watch9-info .video-extras-sparkbar-likes").setAttribute("style", videoLikes); document.querySelector("#watch9-info .video-extras-sparkbar-dislikes").setAttribute("style", videoDislikes); var ltodBar = document.querySelector("#watch9-info .video-extras-sparkbars"); var likesPercent = ltodBar.querySelector("#watch9-info .video-extras-sparkbar-likes").style.width; ltodBar.setAttribute("data-tooltip-text", likesPercent + " of viewers like this video"); ltodBar.style.display = "block"; ltodBar.style.padding = "5px 0"; ltodBar.style.marginBottom = "-5px"; document.querySelector(".watch-view-count").style.marginBottom = "-3px"; } var theViewsInfo = document.querySelector("#watch7-views-info"); var newHome0 = document.querySelector('#watch9-sentiment-actions'); newHome0.insertBefore(theViewsInfo, newHome0.children[0]); var music = document.querySelector("#watch-description-extra-info"); var newHome1 = document.querySelector('.watch9-extra'); newHome1.insertBefore(music, newHome1.children[0]); var theOwner = document.querySelector("#watch7-user-header"); var newHome2 = document.querySelector('#watch9-owner .owner-inner'); newHome2.insertBefore(theOwner, newHome2.children[0]); var theExtras = document.querySelector("#watch-description-extras"); var newHome3 = document.querySelector('.watch9-category'); newHome3.insertBefore(theExtras, newHome3.children[0]); var theLtod = document.querySelector("#watch7-sentiment-actions"); var newHome4 = document.querySelector('#ltod'); newHome4.insertBefore(theLtod, newHome4.children[0]); if (document.querySelector("#watch9-owner .owner-inner") != null) { var ownerHTML = document.querySelector("#watch9-owner .owner-inner").innerHTML; document.querySelector("#watch9-owner-slider .slider-inner").innerHTML = ownerHTML; } var creator = document.querySelector("#creator.sidebar-item"); var videoInfo = document.querySelector("#video-info.sidebar-item"); var description = document.querySelector("#description.sidebar-item"); var addTo = document.querySelector("#add-to.sidebar-item"); var share = document.querySelector("#share.sidebar-item"); var stats = document.querySelector("#stats.sidebar-item"); var transcript = document.querySelector("#transcript.sidebar-item"); var moreActions = document.querySelector("#more-actions.sidebar-item"); var showMore = document.querySelector("#watch9-info .watch9-expand"); var showLess = document.querySelector("#watch9-description .watch9-expand"); var showLess2 = document.querySelector("#watch9-info #collapse"); var addToBtn = document.querySelector(".addto-button"); var showScroller = document.querySelector(".owner-videos-scroller button"); var showScroller2 = document.querySelector("#watch9-owner .owner-videos-scroller button"); var infoHeight = $("#watch9-info.slider").offsetHeight; var descHeight = $(".description-inner").offsetHeight; descHeight = descHeight + 60; $("#watch9-slider").setAttribute("desc-height",descHeight); creator.addEventListener("click", function() { creatorClicked(); }); videoInfo.addEventListener("click", function() { if ($("#watch9-slider[desc-is-long]")) { $("#watch9-slider[desc-is-long]").removeAttribute("desc-is-long"); } vidInfoClicked(); }); description.addEventListener("click", function() { descClicked(); }); showMore.addEventListener("click", function() { if (STS.expWatch9TrueExpander == true) { expand(); } else { descClicked(); } }); showLess.addEventListener("click", function() { if ($("#watch9-slider[desc-is-long]")) { $("#watch9-slider[desc-is-long]").removeAttribute("desc-is-long"); } vidInfoClicked(); }); showLess2.addEventListener("click", function() { collapse(); }); function creatorClicked() { document.querySelector("#watch9-slider").setAttribute("state", "creator"); document.querySelector(".watch9").setAttribute("state", "creator"); document.querySelector(".sidebar-item.active").classList.remove("active"); document.querySelector("#creator.sidebar-item").classList.add("active"); setTimeout(checkIfShowOwner, 10); } function vidInfoClicked() { document.querySelector("#watch9-slider").setAttribute("state", "video-info"); document.querySelector(".watch9").setAttribute("state", "video-info"); document.querySelector(".sidebar-item.active").classList.remove("active"); document.querySelector("#video-info.sidebar-item").classList.add("active"); setTimeout(checkIfShowOwner, 10); } function expand() { document.querySelector("#watch9-slider").setAttribute("state", "video-info"); document.querySelector(".watch9").setAttribute("state", "video-info"); document.querySelector(".sidebar-item.active").classList.remove("active"); document.querySelector("#video-info.sidebar-item").classList.add("active"); $("#watch9-slider").setAttribute("description-expanded",""); setTimeout(checkIfShowOwner, 10); } function collapse() { document.querySelector("#watch9-slider").setAttribute("state", "video-info"); document.querySelector(".watch9").setAttribute("state", "video-info"); document.querySelector(".sidebar-item.active").classList.remove("active"); document.querySelector("#video-info.sidebar-item").classList.add("active"); $("#watch9-slider").removeAttribute("description-expanded"); setTimeout(checkIfShowOwner, 10); } function descClicked() { $("#watch9-slider").setAttribute("desc-is-long",""); document.querySelector("#watch9-slider").setAttribute("state", "description"); document.querySelector(".watch9").setAttribute("state", "description"); document.querySelector(".sidebar-item.active").classList.remove("active"); document.querySelector("#description.sidebar-item").classList.add("active"); setTimeout(checkIfShowOwner, 10); if ($("#startubestyle1") == null) { var container = $("#alt-watch9-container"); var newElem = document.createElement("style"); newElem.setAttribute("id", "startubestyle1"); newElem.innerHTML = ` [exp-vertical-watch9] [state="description"][desc-is-long] #watch9-description, [exp-vertical-watch9] [state="description"][desc-is-long] .slider-container-inner { min-height: ${descHeight}px !important; max-height: ${descHeight}px !important; height: ${descHeight}px !important; } [exp-vertical-watch9] [state="description"][desc-is-long] .slider-container-inner { transform: translateY(-${infoHeight}px) !important; } ` container.insertBefore(newElem, container.children[0]); } setTimeout(function() { $("#watch9-slider").setAttribute("desc-is-long",""); // $(".slider-container-inner").style.transform = "translateY(-" + infoHeight + "px)"; /* $(".slider-container-inner").style.height = descHeight + "px"; $(".slider-container-inner").style.minHeight = descHeight + "px"; $(".slider-container-inner").style.maxHeight = descHeight + "px"; $("#watch9-description").style.height = descHeight + "px"; $("#watch9-description").style.minHeight = descHeight + "px"; $("#watch9-description").style.maxHeight = descHeight + "px";*/ }, 500); } addTo.addEventListener("click", function() { setTimeout(function() { if ($("#watch9-slider[desc-is-long]")) { $("#watch9-slider[desc-is-long]").removeAttribute("desc-is-long"); } }, 500); document.querySelector("#watch9-slider").setAttribute("state", "add-to"); document.querySelector(".watch9").setAttribute("state", "add-to"); document.querySelector(".sidebar-item.active").classList.remove("active"); document.querySelector("#add-to.sidebar-item").classList.add("active"); setTimeout(checkIfShowOwner, 10); }); share.addEventListener("click", function() { setTimeout(function() { if ($("#watch9-slider[desc-is-long]")) { $("#watch9-slider[desc-is-long]").removeAttribute("desc-is-long"); } }, 500); document.querySelector("#watch9-slider").setAttribute("state", "share"); document.querySelector(".watch9").setAttribute("state", "share"); document.querySelector(".sidebar-item.active").classList.remove("active"); document.querySelector("#share.sidebar-item").classList.add("active"); setTimeout(checkIfShowOwner, 10); }); stats.addEventListener("click", function() { setTimeout(function() { if ($("#watch9-slider[desc-is-long]")) { $("#watch9-slider[desc-is-long]").removeAttribute("desc-is-long"); } }, 500); document.querySelector("#watch9-slider").setAttribute("state", "stats"); document.querySelector(".watch9").setAttribute("state", "stats"); document.querySelector(".sidebar-item.active").classList.remove("active"); document.querySelector("#stats.sidebar-item").classList.add("active"); setTimeout(checkIfShowOwner, 10); }); transcript.addEventListener("click", function() { setTimeout(function() { if ($("#watch9-slider[desc-is-long]")) { $("#watch9-slider[desc-is-long]").removeAttribute("desc-is-long"); } }, 500); document.querySelector("#watch9-slider").setAttribute("state", "transcript"); document.querySelector(".watch9").setAttribute("state", "transcript"); document.querySelector(".sidebar-item.active").classList.remove("active"); document.querySelector("#transcript.sidebar-item").classList.add("active"); setTimeout(checkIfShowOwner, 10); }); moreActions.addEventListener("click", function() { setTimeout(function() { if ($("#watch9-slider[desc-is-long]")) { $("#watch9-slider[desc-is-long]").removeAttribute("desc-is-long"); } }, 500); document.querySelector("#watch9-slider").setAttribute("state", "more-actions"); document.querySelector(".watch9").setAttribute("state", "more-actions"); document.querySelector(".sidebar-item.active").classList.remove("active"); document.querySelector("#more-actions.sidebar-item").classList.add("active"); setTimeout(checkIfShowOwner, 10); }); showScroller.addEventListener("click", function() { if (document.querySelector(".watch9[scroller-visible='false']") != null) { document.querySelector(".watch9").setAttribute("scroller-visible", "true"); } else { document.querySelector(".watch9").setAttribute("scroller-visible", "false"); } }); showScroller2.addEventListener("click", function() { if (document.querySelector(".watch9[scroller-visible='false']") != null) { document.querySelector(".watch9").setAttribute("scroller-visible", "true"); } else { document.querySelector(".watch9").setAttribute("scroller-visible", "false"); } }); setTimeout(checkIfShowOwner, 200); window.addEventListener("resize", checkIfShowOwner); function checkIfShowOwner() { setTimeout(check, 200); function check() { if (document.querySelector(".watch video") != null) { var playerHeight = document.querySelector("video").style.height; //console.log(playerHeight); if (STS.expWatch9NoOwner == false) { if (playerHeight == "360px") { document.querySelector(".section-items.watch9").setAttribute("show-owner", "false"); } else { document.querySelector(".section-items.watch9").setAttribute("show-owner", "true"); if (document.querySelector("#creator.sidebar-item.active") != null) { vidInfoClicked(); } } } else { document.querySelector(".section-items.watch9").setAttribute("show-owner", "false"); } } if ( document.querySelector(".appbar-flexwatch-mini") == null && $(".section-items.watch9") ) { document.querySelector(".section-items.watch9").setAttribute("show-owner", "false"); } } } if (STS.expWatch9NoOwner == false) { requestData(); } function requestData() { const location = window.location; var vidLink = location.href; var cutString1 = vidLink.split('v='); var vidLink2 = cutString1[1]; if (vidLink2.includes('&')) { var cutString2 = vidLink2.split('&'); var vidId = cutString2[0]; } else { var vidId = vidLink2; } //console.log(vidId); setTimeout(doData, 1); function doData() { fetch("https://www.youtube.com/youtubei/v1/next?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8", { "headers": { "accept": "application/json, text/plain, /", "accept-language": "en-US,en;q=0.9", "Content-type": "application/json", "sec-ch-ua-mobile": "?0", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "x-goog-authuser": "0", "x-origin": "https://www.youtube.com/" }, "referrer": "https://www.youtube.com/", "referrerPolicy": "strict-origin-when-cross-origin", "body": JSON.stringify({ "context": { "client": { "clientName": "WEB", "clientVersion": "2.20230301.00.00", "hl": "en", "gl": "US" } }, "videoId": vidId }), "method": "POST", "mode": "cors", "credentials": "include" }).then(response => response.json()).then(data => { var dataFromAPI = data; //console.log(dataFromAPI); doChannelDataPrep(); function doChannelDataPrep() { if (dataFromAPI.contents.twoColumnWatchNextResults.results.results.contents[0].videoPrimaryInfoRenderer != null) { var channelUrl = dataFromAPI.contents.twoColumnWatchNextResults.results.results.contents[1].videoSecondaryInfoRenderer.owner.videoOwnerRenderer.navigationEndpoint.browseEndpoint.browseId; } else if (dataFromAPI.contents.twoColumnWatchNextResults.results.results.contents[1].videoPrimaryInfoRenderer != null) { var channelUrl = dataFromAPI.contents.twoColumnWatchNextResults.results.results.contents[2].videoSecondaryInfoRenderer.owner.videoOwnerRenderer.navigationEndpoint.browseEndpoint.browseId; } setTimeout(doChannelData, 1); function doChannelData() { fetch("https://www.youtube.com/youtubei/v1/browse?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8", { "headers": { "accept": "application/json, text/plain, /", "accept-language": "en-US,en;q=0.9", "Content-type": "application/json", "sec-ch-ua-mobile": "?0", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "x-goog-authuser": "0", "x-origin": "https://www.youtube.com/" }, "referrer": "https://www.youtube.com/", "referrerPolicy": "strict-origin-when-cross-origin", "body": JSON.stringify({ "context": { "client": { "clientName": "WEB", "clientVersion": "2.20230301.00.00", "hl": "en", "gl": "US" } }, "browseId": channelUrl, "params": "EgZ2aWRlb3PyBgQKAjoA" }), "method": "POST", "mode": "cors", "credentials": "include" }).then(response => response.json()).then(data => { var dataFromAPI2 = data; //console.log(dataFromAPI2); if (dataFromAPI2.header != null) { if (dataFromAPI2.header.c4TabbedHeaderRenderer != null) { if (dataFromAPI2.header.c4TabbedHeaderRenderer.videosCountText != null) { var videoCount = dataFromAPI2.header.c4TabbedHeaderRenderer.videosCountText.runs[0].text; //console.log(videoCount); if (dataFromAPI2.header.c4TabbedHeaderRenderer.videosCountText.runs[1] != null) { var videoCountString = dataFromAPI2.header.c4TabbedHeaderRenderer.videosCountText.runs[1].text; document.querySelector(".owner-videos-scroller button span").textContent = videoCount + videoCountString; document.querySelector("#watch9-owner .owner-videos-scroller button span").textContent = videoCount + videoCountString; } else { document.querySelector(".owner-videos-scroller button span").textContent = videoCount; document.querySelector("#watch9-owner .owner-videos-scroller button span").textContent = videoCount; } if (document.querySelector(".owner-videos-scroller button[disabled]") != null) { document.querySelector(".owner-videos-scroller button").removeAttribute("disabled"); document.querySelector("#watch9-owner .owner-videos-scroller button").removeAttribute("disabled"); } } else { document.querySelector(".owner-videos-scroller button span").textContent = "No videos"; document.querySelector(".owner-videos-scroller button").setAttribute("disabled", ""); document.querySelector("#watch9-owner .owner-videos-scroller button span").textContent = "No videos"; document.querySelector("#watch9-owner .owner-videos-scroller button").setAttribute("disabled", ""); } var newChannelLink = dataFromAPI2.header.c4TabbedHeaderRenderer.channelId; if (dataFromAPI2.contents.twoColumnBrowseResultsRenderer.tabs[1] != null) { if (dataFromAPI2.contents.twoColumnBrowseResultsRenderer.tabs[1].tabRenderer.content != null) { var richGrid = dataFromAPI2.contents.twoColumnBrowseResultsRenderer.tabs[1].tabRenderer.content.richGridRenderer; var richItemNo = 0; richGridGet(); function richGridGet() { if (richGrid.contents[richItemNo].richItemRenderer != null) { var richItem = richGrid.contents[richItemNo].richItemRenderer.content.videoRenderer; var itemTitle = richItem.title.runs[0].text; var itemThumbnail = richItem.thumbnail.thumbnails[0].url; var itemLink = richItem.videoId; let container = document.querySelector('.scroller-inner'); var newElem = document.createElement("a"); newElem.classList.add("st-super-compact-video"); newElem.classList.add("spf-link"); newElem.innerHTML = `
???,??? views
`; container.insertBefore(newElem, container.children[richItemNo]); let container2 = document.querySelector('#watch9-owner .scroller-inner'); var newElem2 = document.createElement("a"); newElem2.classList.add("st-super-compact-video"); newElem2.classList.add("spf-link"); newElem2.innerHTML = `
???,??? views
`; container2.insertBefore(newElem2, container2.children[richItemNo]); var w9o = document.querySelector("#watch9-owner"); var w9os = document.querySelector("#watch9-owner-slider"); var theSCVid = w9o.querySelectorAll(".st-super-compact-video")[richItemNo]; theSCVid.querySelector(".title span").textContent = itemTitle; theSCVid.querySelector("img").src = itemThumbnail; theSCVid.setAttribute("href", "/watch?v=" + itemLink); theSCVid = w9os.querySelectorAll(".st-super-compact-video")[richItemNo]; theSCVid.querySelector(".title span").textContent = itemTitle; theSCVid.querySelector("img").src = itemThumbnail; theSCVid.setAttribute("href", "/watch?v=" + itemLink); richItemNo++; richGridGet(); } else { //console.log("All available rich items gotten."); } } } else { document.querySelector(".owner-videos-scroller button span").textContent = "No videos"; document.querySelector(".owner-videos-scroller button").setAttribute("disabled", ""); document.querySelector("#watch9-owner .owner-videos-scroller button span").textContent = "No videos"; document.querySelector("#watch9-owner .owner-videos-scroller button").setAttribute("disabled", ""); } } else { document.querySelector(".owner-videos-scroller button span").textContent = "No videos"; document.querySelector(".owner-videos-scroller button").setAttribute("disabled", ""); document.querySelector("#watch9-owner .owner-videos-scroller button span").textContent = "No videos"; document.querySelector("#watch9-owner .owner-videos-scroller button").setAttribute("disabled", ""); } } } else { document.querySelector(".owner-videos-scroller button span").textContent = "No videos"; document.querySelector(".owner-videos-scroller button").setAttribute("disabled", ""); document.querySelector("#watch9-owner .owner-videos-scroller button span").textContent = "No videos"; document.querySelector("#watch9-owner .owner-videos-scroller button").setAttribute("disabled", ""); } }); } } }); } } } } }); } function createWatch5(number, version) { let container = document.querySelector('#watch7-content.watch-content'); var newElem = document.createElement("div"); newElem.id = "watch5-container"; newElem.innerHTML = `
Uploaded by ???? on ??? ??, ???? by ????
`; container.insertBefore(newElem, container.children[number]); let container2 = document.querySelector('.watch'); var newElem2 = document.createElement("div"); newElem2.id = "watch5-above-container"; newElem2.innerHTML = `
`; container2.insertBefore(newElem2, container2.children[0]); var elm = ".watch5"; waitForElement500(elm).then(function(elm) { if (canGo != false) { if (document.querySelector("#watch5-addto #action-panel-addto") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(3)").click(); } if (document.querySelector("#watch5-addto #action-panel-addto") == null) { var elm = ".playlist-items"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var theAddToBtn = document.querySelector("#action-panel-addto"); var newHome = document.querySelector('#watch5-addto .watch5-panel-inner'); newHome.appendChild(theAddToBtn); } }); } if (document.querySelector("#watch5-share #action-panel-share") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(2)").click(); } if (document.querySelector("#watch5-container #action-panel-share") == null) { setTimeout(() => { var theSharePanel = document.querySelector("#action-panel-share"); var newHome5 = document.querySelector('#watch5-share .watch5-panel-inner'); newHome5.insertBefore(theSharePanel, newHome5.children[1]); }, "1000"); } if (document.querySelector("#watch5-stats #action-panel-stats") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(5)").click(); } if (document.querySelector("#watch5-stats #action-panel-stats") == null) { var elm = ".metric-label"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var theAddToBtn = document.querySelector("#action-panel-stats"); var newHome = document.querySelector('#watch5-stats .watch5-panel-inner'); newHome.appendChild(theAddToBtn); } }); } if (document.querySelector("#watch7-secondary-actions .hid.yt-uix-button:nth-child(4)") == null) { if (document.querySelector("#watch5-stats #action-panel-transcript") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(4)").click(); } if (document.querySelector("#watch5-transcript #action-panel-transcript") == null) { var elm = ".watch-transcript"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var theAddToBtn = document.querySelector("#action-panel-transcript"); var newHome = document.querySelector('#watch5-transcript .watch5-panel-inner'); newHome.appendChild(theAddToBtn); } }); } } else { document.querySelector("#watch5-transcript-button").classList.add("hid"); $(".watch5").setAttribute("no-transcript",""); } if (document.querySelector("#watch7-views-info") != null) { var viewCount = document.querySelector("#watch7-views-info .watch-view-count").textContent; document.querySelector("#watch5-views .watch-view-count").textContent = viewCount; } if (document.querySelector("#watch-uploader-info") != null) { var uploadDateRaw = document.querySelector("#watch-uploader-info").textContent; let notNeedNewString = uploadDateRaw.includes("Published"); if (notNeedNewString == true) { var cutString = uploadDateRaw.split('on '); var uploadDate = cutString[1]; document.querySelector("#first-part").style.display = "inline"; document.querySelector("#third-part").style.display = "none"; } else { var uploadDate = uploadDateRaw; document.querySelector("#first-part").style.display = "none"; document.querySelector("#third-part").style.display = "inline"; } document.querySelector("#watch5-upload-date .upload-date").textContent = uploadDate; } if (document.querySelector(".yt-user-name") != null) { var authorElem = document.querySelector("#watch7-user-header .yt-user-name"); var authorName = authorElem.textContent; var authorLink = document.querySelector(".yt-user-photo").getAttribute("href"); //var authorPfp = document.querySelector(".yt-user-photo img").getAttribute("data-thumb"); document.querySelector(".author-link").textContent = authorName; document.querySelector(".author-link").setAttribute("href", authorLink); document.querySelector("#third-part .author-link").textContent = authorName; document.querySelector("#third-part .author-link").setAttribute("href", authorLink); authorElem.classList.add("yt-uix-tooltip"); authorElem.setAttribute("data-tooltip-text", "View " + authorName + "'s channel"); } var theViewsInfo = document.querySelector("#watch7-views-info"); var newHome0 = document.querySelector("#watch5-views-info"); newHome0.insertBefore(theViewsInfo, newHome0.children[0]); var music = document.querySelector("#watch-headline-title"); var newHome1 = document.querySelector('#watch5-title'); newHome1.insertBefore(music, newHome1.children[0]); var theOwner = document.querySelector("#watch7-user-header"); var newHome2 = document.querySelector('#watch5-owner'); newHome2.insertBefore(theOwner, newHome2.children[0]); var theExtras = document.querySelector("#watch-description"); var newHome3 = document.querySelector('#watch5-description'); newHome3.insertBefore(theExtras, newHome3.children[0]); var theLtod = document.querySelector("#watch7-sentiment-actions"); var newHome4 = document.querySelector('#ltod'); newHome4.insertBefore(theLtod, newHome4.children[0]); var addTo = document.querySelector("#watch5-addto-button"); var share = document.querySelector("#watch5-share-button"); var stats = document.querySelector("#watch5-stats-button"); var transcript = document.querySelector("#watch5-transcript-button"); addTo.addEventListener("click", function() { if ($(".watch5[state='add-to']")) { document.querySelector("#watch5-container .watch5").setAttribute("state", "none"); if ($("#watch5-other-actions .yt-uix-button-toggled")) { document.querySelector("#watch5-other-actions .yt-uix-button-toggled").classList.remove("yt-uix-button-toggled"); } else if ($("#watch5-stats-button.yt-uix-button-toggled")) { document.querySelector("#watch5-stats-button").classList.remove("yt-uix-button-toggled"); } } else { document.querySelector("#watch5-container .watch5").setAttribute("state", "add-to"); if ($("#watch5-other-actions .yt-uix-button-toggled")) { document.querySelector("#watch5-other-actions .yt-uix-button-toggled").classList.remove("yt-uix-button-toggled"); } else if ($("#watch5-stats-button.yt-uix-button-toggled")) { document.querySelector("#watch5-stats-button").classList.remove("yt-uix-button-toggled"); } document.querySelector("#watch5-addto-button").classList.add("yt-uix-button-toggled"); } }); share.addEventListener("click", function() { if ($(".watch5[state='share']")) { document.querySelector("#watch5-container .watch5").setAttribute("state", "none"); if ($("#watch5-other-actions .yt-uix-button-toggled")) { document.querySelector("#watch5-other-actions .yt-uix-button-toggled").classList.remove("yt-uix-button-toggled"); } else if ($("#watch5-stats-button.yt-uix-button-toggled")) { document.querySelector("#watch5-stats-button").classList.remove("yt-uix-button-toggled"); } } else { document.querySelector("#watch5-container .watch5").setAttribute("state", "share"); if ($("#watch5-other-actions .yt-uix-button-toggled")) { document.querySelector("#watch5-other-actions .yt-uix-button-toggled").classList.remove("yt-uix-button-toggled"); } else if ($("#watch5-stats-button.yt-uix-button-toggled")) { document.querySelector("#watch5-stats-button").classList.remove("yt-uix-button-toggled"); } document.querySelector("#watch5-share-button").classList.add("yt-uix-button-toggled"); } }); stats.addEventListener("click", function() { if ($(".watch5[state='stats']")) { document.querySelector("#watch5-container .watch5").setAttribute("state", "none"); if ($("#watch5-other-actions .yt-uix-button-toggled")) { document.querySelector("#watch5-other-actions .yt-uix-button-toggled").classList.remove("yt-uix-button-toggled"); } else if ($("#watch5-stats-button.yt-uix-button-toggled")) { document.querySelector("#watch5-stats-button").classList.remove("yt-uix-button-toggled"); } } else { document.querySelector("#watch5-container .watch5").setAttribute("state", "stats"); if ($("#watch5-other-actions .yt-uix-button-toggled")) { document.querySelector("#watch5-other-actions .yt-uix-button-toggled").classList.remove("yt-uix-button-toggled"); } else if ($("#watch5-stats-button.yt-uix-button-toggled")) { document.querySelector("#watch5-stats-button").classList.remove("yt-uix-button-toggled"); } document.querySelector("#watch5-stats-button").classList.add("yt-uix-button-toggled"); } }); transcript.addEventListener("click", function() { if ($(".watch5[state='transcript']")) { document.querySelector("#watch5-container .watch5").setAttribute("state", "none"); if ($("#watch5-other-actions .yt-uix-button-toggled")) { document.querySelector("#watch5-other-actions .yt-uix-button-toggled").classList.remove("yt-uix-button-toggled"); } else if ($("#watch5-stats-button.yt-uix-button-toggled")) { document.querySelector("#watch5-stats-button").classList.remove("yt-uix-button-toggled"); } } else { document.querySelector("#watch5-container .watch5").setAttribute("state", "transcript"); if ($("#watch5-other-actions .yt-uix-button-toggled")) { document.querySelector("#watch5-other-actions .yt-uix-button-toggled").classList.remove("yt-uix-button-toggled"); } else if ($("#watch5-stats-button.yt-uix-button-toggled")) { document.querySelector("#watch5-stats-button").classList.remove("yt-uix-button-toggled"); } document.querySelector("#watch5-transcript-button").classList.add("yt-uix-button-toggled"); } }); let container3 = document.querySelector('#watch-description-toggle'); var newElem3 = document.createElement("div"); newElem3.id = "watch5-horizontal-rule"; newElem3.innerHTML = `
`; container3.insertBefore(newElem3, container3.children[0]); var elm = "#watch7-sidebar"; waitForElement10(elm).then(function(elm) { if (canGo != false) { let container4 = document.querySelector("#watch7-sidebar"); var newElem4 = document.createElement("div"); newElem4.id = "sidebar-panda-rules"; newElem4.innerHTML = ` `; container4.insertBefore(newElem4, container4.children[0]); } }); } }); } function createRelatedTabs(number) { if (document.querySelector("#related-tabs") != null) { document.querySelector("#related-tabs").remove(); } let container = document.querySelector('#watch7-sidebar-contents'); let newElem = document.createElement("div"); newElem.setAttribute("id", "related-tabs"); newElem.classList.add("watch-sidebar-section"); newElem.classList.add("new"); newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[number]); document.querySelector("#watch7-sidebar").setAttribute("state", "related"); if (STS.expRelatedTabsHoldsSubscribe == true) { var elm = "#watch7-subscription-container"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var elem = document.querySelector("#watch7-subscription-container"); var newHome = document.querySelector('.related-user-lower'); newHome.appendChild(elem); } }); } var theHref = document.querySelector("#watch7-user-header .yt-user-name").getAttribute("href"); var cutString1 = theHref.split('l/'); theHref = cutString1[1]; fetch("https://www.youtube.com/youtubei/v1/browse?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8", { "headers": { "accept": "application/json, text/plain, /", "accept-language": "en-US,en;q=0.9", "Content-type": "application/json", "sec-ch-ua-mobile": "?0", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "x-goog-authuser": "0", "x-origin": "https://www.youtube.com/" }, "referrer": "https://www.youtube.com/", "referrerPolicy": "strict-origin-when-cross-origin", "body": JSON.stringify({ "context": { "client": { "clientName": "WEB", "clientVersion": "2.20230301.00.00", "hl": "en", "gl": "US" } }, "browseId": theHref, "params": "EgZ2aWRlb3PyBgQKAjoA" }), "method": "POST", "credentials": "include" }).then(response => response.json()).then(data => { //console.log(data); if (data.header.c4TabbedHeaderRenderer) { if (data.header.c4TabbedHeaderRenderer.banner != null) { var banner = data.header.c4TabbedHeaderRenderer.banner.thumbnails[0].url; document.querySelector(".related-banner-bg img").src = banner; } else if (data.header.c4TabbedHeaderRenderer.banner == null) { document.querySelector(".related-banner").style.background = "url(https://s.ytimg.com/yts/img/channels/c4/default_banner-vfl7DRgTn.png)"; } var pfp = data.header.c4TabbedHeaderRenderer.avatar.thumbnails[2].url; //var name = data.header.c4TabbedHeaderRendereeeeer.title; var name = data.header.c4TabbedHeaderRenderer.title; } else if (data.header.pageHeaderRenderer) { if (data.header.pageHeaderRenderer.content.pageHeaderViewModel.banner != null) { var banner = data.header.pageHeaderRenderer.content.pageHeaderViewModel.banner.imageBannerViewModel.image.sources[0].url; document.querySelector(".related-banner-bg img").src = banner; } else if (data.header.pageHeaderRenderer.content.pageHeaderViewModel.banner == null) { document.querySelector(".related-banner").style.background = "url(https://s.ytimg.com/yts/img/channels/c4/default_banner-vfl7DRgTn.png)"; } var pfp = data.header.pageHeaderRenderer.content.pageHeaderViewModel.image.decoratedAvatarViewModel.avatar.avatarViewModel.image.sources[0].url; //var name = data.header.c4TabbedHeaderRendereeeeer.title; var name = data.header.pageHeaderRenderer.pageTitle; } var videoCount = document.querySelector(".yt-user-videos").textContent; var link = document.querySelector(".yt-user-name").getAttribute("href"); var link2 = document.querySelector(".yt-user-videos").getAttribute("href"); document.querySelector(".related-banner-pfp img").src = pfp; document.querySelector(".related-user .channel-name span").textContent = name; document.querySelector(".related-user .channel-video-count span").textContent = videoCount; document.querySelector(".related-user .channel-name").setAttribute("href", link); document.querySelector(".related-banner-pfp").setAttribute("href", link); document.querySelector(".related-user .channel-video-count").setAttribute("href", link2); document.querySelector("#related-channel-about span").textContent = "About " + name; createChannelVideos(data); createChannelAbout(data); document.querySelector("#related-related").addEventListener("click", function() { document.querySelector("#watch7-sidebar").setAttribute("state", "related"); document.querySelector(".related-tab[active]").removeAttribute("active"); document.querySelector("#related-related").setAttribute("active", ""); }); document.querySelector("#related-channel-videos").addEventListener("click", function() { document.querySelector("#watch7-sidebar").setAttribute("state", "channel-videos"); document.querySelector(".related-tab[active]").removeAttribute("active"); document.querySelector("#related-channel-videos").setAttribute("active", ""); }); document.querySelector("#related-channel-about").addEventListener("click", function() { document.querySelector("#watch7-sidebar").setAttribute("state", "channel-about"); document.querySelector(".related-tab[active]").removeAttribute("active"); document.querySelector("#related-channel-about").setAttribute("active", ""); }); }); } function createChannelVideos(data) { let container = document.querySelector('#watch7-sidebar-contents'); let newElem = document.createElement("div"); newElem.setAttribute("id", "related-channel-videos-page"); newElem.classList.add("watch-sidebar-section"); newElem.classList.add("new"); newElem.innerHTML = `

Uploads

`; container.insertBefore(newElem, container.children[3]); doChannelVidsTab("firstLoad", data, 0, 0, 0); } function doChannelVidsTab(purpose, data, apiItemNo, htmlItemNo, pageNo) { if (purpose == "firstLoad") { if (data.contents.twoColumnBrowseResultsRenderer.tabs[1] != null) { if (data.contents.twoColumnBrowseResultsRenderer.tabs[1].tabRenderer.content != null) { var itemContainer = data.contents.twoColumnBrowseResultsRenderer.tabs[1].tabRenderer.content.richGridRenderer.contents; if (itemContainer[apiItemNo] != null) { if (itemContainer[apiItemNo].richItemRenderer != null) { var item = itemContainer[apiItemNo].richItemRenderer.content; if (item.adSlotRenderer != null) { apiItemNo++; doChannelVidsTab(purpose, data, apiItemNo, htmlItemNo, pageNo); } else if (item.videoRenderer != null) { createCompactVideo(itemContainer, apiItemNo, htmlItemNo, pageNo); apiItemNo++; htmlItemNo++; doChannelVidsTab(purpose, data, apiItemNo, htmlItemNo, pageNo); } } else if (itemContainer[apiItemNo].continuationItemRenderer != null) { var token = itemContainer[apiItemNo].continuationItemRenderer.continuationEndpoint.continuationCommand.token; createLoadMoreButton(htmlItemNo, token); } else { apiItemNo++; doChannelVidsTab(purpose, data, apiItemNo, htmlItemNo, pageNo); } } else { //Done } } } } if (purpose == "continuation") { if (data.onResponseReceivedActions[0].appendContinuationItemsAction.continuationItems != null) { var itemContainer = data.onResponseReceivedActions[0].appendContinuationItemsAction.continuationItems; if (itemContainer[apiItemNo] != null) { if (itemContainer[apiItemNo].richItemRenderer != null) { var item = itemContainer[apiItemNo].richItemRenderer.content; if (item.adSlotRenderer != null) { apiItemNo++; doChannelVidsTab(purpose, data, apiItemNo, htmlItemNo, pageNo); } else if (item.videoRenderer != null) { createCompactVideo(itemContainer, apiItemNo, htmlItemNo, pageNo); apiItemNo++; htmlItemNo++; doChannelVidsTab(purpose, data, apiItemNo, htmlItemNo, pageNo); } } else if (itemContainer[apiItemNo].continuationItemRenderer != null) { var token = itemContainer[apiItemNo].continuationItemRenderer.continuationEndpoint.continuationCommand.token; createLoadMoreButton(htmlItemNo, token); } else { apiItemNo++; doChannelVidsTab(purpose, data, apiItemNo, htmlItemNo, pageNo); } } else { //Done } } } } function createLoadMoreButton(htmlItemNo, token) { var container = document.querySelector("#watch-channel-videos"); var newElem = document.createElement("span"); newElem.setAttribute("class", "continuation_item_wrapper"); newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[htmlItemNo]); newElem.addEventListener("click", function() { newElem.querySelector(".loading").classList.remove("hid"); newElem.querySelector(".run").classList.add("hid"); newElem.querySelector("button").setAttribute("disabled", "True"); var theHref = document.querySelector("#watch7-user-header .yt-user-name").getAttribute("href"); var cutString1 = theHref.split('l/'); theHref = cutString1[1]; fetch("https://www.youtube.com/youtubei/v1/browse?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8", { "headers": { "accept": "application/json, text/plain, /", "accept-language": "en-US,en;q=0.9", "Content-type": "application/json", "sec-ch-ua-mobile": "?0", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "x-goog-authuser": "0", "x-origin": "https://www.youtube.com/" }, "referrer": "https://www.youtube.com/", "referrerPolicy": "strict-origin-when-cross-origin", "body": JSON.stringify({ "context": { "client": { "clientName": "WEB", "clientVersion": "2.20230301.00.00", "hl": "en", "gl": "US" } }, "browseId": theHref, "params": "EgZ2aWRlb3PyBgQKAjoA", "continuation": token }), "method": "POST", "credentials": "include" }).then(response => response.json()).then(data => { //console.log(data); doChannelVidsTab("continuation", data, 0, htmlItemNo, 0); newElem.remove(); } ); }); } function createCompactVideo(itemContainer, apiItemNo, htmlItemNo, pageNo) { var container = document.querySelector("#watch-channel-videos"); var newElem = document.createElement("li"); newElem.setAttribute("class", "video-list-item related-list-item"); newElem.setAttribute("unpopulated", ""); newElem.innerHTML = ` Thumbnail `; container.insertBefore(newElem, container.children[htmlItemNo]); var htmlElem = document.querySelector(".video-list-item[unpopulated]"); var apiElem = itemContainer[apiItemNo].richItemRenderer.content.videoRenderer; var navigationEndpoint = itemContainer[apiItemNo].richItemRenderer.content.videoRenderer.navigationEndpoint; htmlElem.querySelector("a").data = { abstractVorElement: { navigationEndpoint: navigationEndpoint } } if (apiElem.thumbnail.thumbnails[3] != null) { var vidThumbnail = apiElem.thumbnail.thumbnails[3].url; } else if (apiElem.thumbnail.thumbnails[2] != null) { var vidThumbnail = apiElem.thumbnail.thumbnails[2].url; } else if (apiElem.thumbnail.thumbnails[1] != null) { var vidThumbnail = apiElem.thumbnail.thumbnails[1].url; } else { var vidThumbnail = apiElem.thumbnail.thumbnails[0].url; } if (apiElem.lengthText != null) { var vidTime = apiElem.lengthText.simpleText; } else { var vidTime = ""; } if (apiElem.title.runs != null) { var vidTitle = apiElem.title.runs[0].text; } else { var vidTitle = apiElem.title.simpleText; } if (apiElem.publishedTimeText != null) { var vidDate = apiElem.publishedTimeText.simpleText; } else { var vidDate = ""; } if (apiElem.viewCountText.runs != null) { if (apiElem.viewCountText.runs[1] != null) { var vidViewCount = apiElem.viewCountText.runs[0].text; var vidViewCountExtension = apiElem.viewCountText.runs[1].text; htmlElem.querySelector(".view-count .view-count").textContent = vidViewCount + " " + vidViewCountExtension; } } else if (apiElem.viewCountText.runs == null) { var vidViewCount = apiElem.viewCountText.simpleText; htmlElem.querySelector(".view-count .view-count").textContent = vidViewCount; } var vidId = apiElem.videoId; htmlElem.querySelector(".yt-thumb-clip-inner img").src = vidThumbnail; htmlElem.querySelector(".title").textContent = vidTitle; htmlElem.querySelector(".title").setAttribute("title", vidTitle); htmlElem.querySelector("a").setAttribute("href", "/watch?v=" + vidId); htmlElem.querySelector(".video-time").textContent = vidTime; htmlElem.querySelector(".extra").textContent = vidDate; htmlElem.removeAttribute("unpopulated"); } function createChannelAbout(data) { if (data.header.c4TabbedHeaderRenderer) { var continuation = data.header.c4TabbedHeaderRenderer.tagline.channelTaglineRenderer.moreEndpoint.showEngagementPanelEndpoint.engagementPanel.engagementPanelSectionListRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer.contents[0].continuationItemRenderer.continuationEndpoint.continuationCommand.token; } else { var continuation = data.header.pageHeaderRenderer.content.pageHeaderViewModel.description.descriptionPreviewViewModel.rendererContext.commandContext.onTap.innertubeCommand.showEngagementPanelEndpoint.engagementPanel.engagementPanelSectionListRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer.contents[0].continuationItemRenderer.continuationEndpoint.continuationCommand.token; } let container = document.querySelector('#watch7-sidebar-contents'); let newElem = document.createElement("div"); newElem.setAttribute("id", "related-channel-about-page"); newElem.classList.add("watch-sidebar-section"); newElem.classList.add("new"); newElem.innerHTML = `

About

subscribers
views
videos
`; container.insertBefore(newElem, container.children[3]); var theHref = document.querySelector("#watch7-user-header .yt-user-name").getAttribute("href"); var cutString1 = theHref.split('l/'); theHref = cutString1[1]; fetch("https://www.youtube.com/youtubei/v1/browse?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8", { "headers": { "accept": "application/json, text/plain, /", "accept-language": "en-US,en;q=0.9", "Content-type": "application/json", "sec-ch-ua-mobile": "?0", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "x-goog-authuser": "0", "x-origin": "https://www.youtube.com/" }, "referrer": "https://www.youtube.com/", "referrerPolicy": "strict-origin-when-cross-origin", "body": JSON.stringify({ "context": { "client": { "clientName": "WEB", "clientVersion": "2.20230301.00.00", "hl": "en", "gl": "US" } }, "browseId": theHref, "continuation": continuation }), "method": "POST", "credentials": "include" }).then(response => response.json()).then(data => { //console.log(data); let description = "No description available."; let subCount = "0"; let videoCount = "0"; let viewCount = "0"; let joinedDate = "Joined Feb 32, 1992 1"; let chanNavEnd = ""; let videosNavEnd = ""; if (data.onResponseReceivedEndpoints[0].appendContinuationItemsAction.continuationItems[0].aboutChannelRenderer.metadata.aboutChannelViewModel.description != null) { description = data.onResponseReceivedEndpoints[0].appendContinuationItemsAction.continuationItems[0].aboutChannelRenderer.metadata.aboutChannelViewModel.description; description = description.replace(/\n/g, "
"); } if (data.onResponseReceivedEndpoints[0].appendContinuationItemsAction.continuationItems[0].aboutChannelRenderer.metadata.aboutChannelViewModel.subscriberCountText != null) { subCount = data.onResponseReceivedEndpoints[0].appendContinuationItemsAction.continuationItems[0].aboutChannelRenderer.metadata.aboutChannelViewModel.subscriberCountText; } videoCount = data.onResponseReceivedEndpoints[0].appendContinuationItemsAction.continuationItems[0].aboutChannelRenderer.metadata.aboutChannelViewModel.videoCountText; viewCount = data.onResponseReceivedEndpoints[0].appendContinuationItemsAction.continuationItems[0].aboutChannelRenderer.metadata.aboutChannelViewModel.viewCountText; joinedDate = data.onResponseReceivedEndpoints[0].appendContinuationItemsAction.continuationItems[0].aboutChannelRenderer.metadata.aboutChannelViewModel.joinedDateText.content; subCount = subCount.split('s'); subCount = subCount[0]; videoCount = videoCount.split('v'); videoCount = videoCount[0]; viewCount = viewCount.split('v'); viewCount = viewCount[0]; document.querySelector("#watch-channel-about .about-description span").innerHTML = description; document.querySelector("#watch-channel-about #subs span").textContent = subCount; document.querySelector("#watch-channel-about #views span").textContent = viewCount; document.querySelector("#watch-channel-about #videos span").textContent = videoCount; document.querySelector("#watch-channel-about .joined-date span").textContent = joinedDate; if (STS.expWatch9 == true) { chanNavEnd = document.querySelectorAll("#watch7-user-header .yt-user-name")[1].data.abstractVorElement.navigationEndpoint; videosNavEnd = document.querySelectorAll("#watch7-user-header .yt-user-videos")[1].data.watchUserVideoCount.navigationEndpoint; } else { chanNavEnd = document.querySelector("#watch7-user-header .yt-user-name").data.abstractVorElement.navigationEndpoint; videosNavEnd = document.querySelector("#watch7-user-header .yt-user-videos").data.watchUserVideoCount.navigationEndpoint; } $("#related-tabs .channel-video-count").data = { abstractVorElement: { navigationEndpoint: videosNavEnd } } $("#related-tabs .channel-name").data = { abstractVorElement: { navigationEndpoint: chanNavEnd } } }); } function createApps() { let container = document.querySelector('#yt-masthead-user'); const newElem = document.createElement("div"); newElem.id = 'google-apps'; newElem.setAttribute("class", ""); newElem.innerHTML = `
`; container.insertBefore(newElem, container.children[0]); } let container = document.querySelector('html'); let newElem = document.createElement("div"); newElem.id = "style"; newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[0]); } function doBanner() { var elm = "#content.ytd-app"; waitForElement(elm).then(function(elm) { if (canGo != false) { var container = document.querySelector('#content.ytd-app'); var newElem = document.createElement("div"); newElem.id = "nebula-return-banner"; newElem.innerHTML = `
StarTube requires Vorapis 2013 (V3) to function.
Download V3
`; container.insertBefore(newElem, container.children[0]); newElem.querySelector("#nebula-return-banner-button").addEventListener("click", () => { window.location.reload(); }); newElem.querySelector("#nebula-return-banner-close-button").addEventListener("click", () => { document.querySelector("#nebula-return-banner").remove(); }); } }); } function downloadFile(file) { const link = document.createElement('a'); link.style.display = 'none'; link.href = URL.createObjectURL(file); link.download = file.name; document.body.appendChild(link); link.click(); setTimeout(() => { URL.revokeObjectURL(link.href); link.parentNode.removeChild(link); }, 0); } function createJSON() { const myFile = new File([` ${JSON.stringify(STS)} `], 'StarTubeSettings.json'); downloadFile(myFile); } async function actionFile(file) { const text = await file.text(); localStorage.setItem("ST_SETTINGS",text); window.location.reload(); } })();