`;
}
if(gdp.currChan.sidebar.country != null){
$("#c3-location").classList.remove("hid");
}
}
var aion = getSapisidhash();
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 EXaddListener(elm,event,action){
elm.addEventListener(event,function(){
action;
});
}
function doSubscribeIcons(){
var elm = ".yt-uix-subscription-button:not(.st-icon-sub):not(.st-listening)";
waitForElement10(elm).then(function(elm){
if(canGo != false){
document.querySelectorAll(".yt-uix-button-subscribe-branded:not(.st-icon-sub):not(.st-listening)").forEach(i=>{
let cont=i.querySelector(".yt-uix-button-icon-wrapper");
let nE=document.createElement("div");
nE.classList.add("st-svg");
nE.innerHTML=STH0.SVG;
cont.append(nE);
nE.querySelector(".filled-icon g").innerHTML=`
`;
nE.querySelector(".outline-icon path").setAttribute("d",svgDefs.sub.o);
i.classList.add("st-icon-sub");
i.querySelector("svg").setAttribute("viewBox","0 0 68 48");
if(!i.classList.contains("st-listening")){
EXaddListener(i,"click",setTimeout(doSubscribeIcons,2000));
i.classList.add("st-listening");
}
});
document.querySelectorAll(".yt-uix-button-subscribed-branded:not(.st-icon-sub):not(.st-listening)").forEach(i=>{
let cont=i.querySelector(".yt-uix-button-icon-wrapper");
let nE=document.createElement("div");
nE.classList.add("st-svg");
nE.innerHTML=STH0.SVG;
cont.append(nE);
nE.querySelector(".filled-icon path").setAttribute("d",svgDefs.subbed.f);
nE.querySelector(".outline-icon path").setAttribute("d",svgDefs.subbed.o);
i.classList.add("st-icon-sub");
i.querySelector("svg").setAttribute("viewbox","0 0 68 48");
if(!i.classList.contains("st-listening")){
EXaddListener(i,"click",setTimeout(doSubscribeIcons,2000));
i.classList.add("st-listening");
}
});
}
});
}
// EXfunct
function moveSortBtn(){
if($("#page.watch") || $("#page.all_comments")){
if($(".widget_bounds .yt-spinner-message") == null && $("#st-comment-sort") == null){
var elm = ".left-options > button";
waitForElement10(elm).then(function(elm){
if(canGo != false && $("#st-comment-sort") == null){
if($("#page.watch") || $("#page.all_comments")){
var newHome = $(".all-comments");
var toMove = $(".left-options > button");
newHome.appendChild(toMove);
$(".all-comments button").id = "st-comment-sort";
let cont = $("#st-comment-sort");
cont.classList.add("flex-bar");
cont.querySelector("span").textContent = "Sort by";
let nE = document.createElement("div");
nE.setAttribute("class","st-svg");
nE.innerHTML = `
`;
cont.insertBefore(nE,cont.children[0]);
}
}
});
}else if($("#st-comment-sort")){
$("#st-comment-sort").querySelector("span").textContent = "Sort by";
}
}
}
// EXfunct
function changeCommentPlaceholder(n){
if($("#page.watch") || $("#page.all_comments")){
if($(".widget_bounds .yt-spinner-message") == null && $(".share.focus_caller.startube") == null){
var elm = ".focus_caller";
waitForElement10(elm).then(function(elm){
if(canGo != false){
if($("#page.watch") || $("#page.all_comments")){
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");
}
}
});
}
}
}
// EXfunct
function changeCommentHeader(n){
if($("#page.watch") || $("#page.all_comments")){
if($(".distiller_yt_headline.startube") == null){
var elm = ".distiller_yt_headline";
waitForElement10(elm).then(function(elm){
if(canGo != false){
if($("#page.watch") || $("#page.all_comments")){
if($(".distiller_yt_headline.startube") == null){
CWD.commentCount = $(".distiller_yt_headline span:nth-child(2)").textContent.split("(")[1].split(")")[0];
$(".distiller_yt_headline").innerHTML = `
Comments • Comments
`;
$(".distiller_yt_headline .comment-count").textContent = CWD.commentCount;
$(".distiller_yt_headline").classList.add("startube");
let comment=$(".comment");
CWD.commentTeaserPfp=comment.querySelector(".distiller_yt-thread_avatar").src;
CWD.commentTeaserText=comment.querySelector(".text-content span").textContent;
}
if($(".st-teaser-comment-text")){
if(CWD.commentTeaserText!=null){
$(".st-teaser-comment-text").textContent=CWD.commentTeaserText;
$(".st-comment-teaser-pfp").src=CWD.commentTeaserPfp;
$(".st-comment-count").textContent=CWD.commentCount;
$(".st-comment-teaser").setAttribute("has-comment","");
}else{
$(".st-your-pfp").src=gdp.pfp;
}
}
}
}
});
}
}
}
function dupeDetect(){
if($("#StarTubeDuplicateDetector")==null){
// This is used for detecting whether or not the user has multiple versions of StarTube enabled, as that almost never goes well
// Each StarTube version has its own unique ID so StarTube versions can determine what other version of StarTube is running alongside them.
// Only supports StarTube stable and beta 2.3.1 and later.
let cont=$("body");
let nE=document.createElement("div");
nE.id="StarTubeDuplicateDetector";
nE.setAttribute("st-id",STUID);
nE.setAttribute("st-ver",currStarVer);
cont.insertBefore(nE,cont.children[0]);
}else{
let st_id=$("#StarTubeDuplicateDetector").getAttribute("st-id");
let ver=$("#StarTubeDuplicateDetector").getAttribute("st-ver");
if(ver==null){
ver="2.3.1 or earlier";
}
if(st_id==STUID){
}else{
alert("You have another version of StarTube installed: "+ver+" (the version of StarTube giving you this message is: "+currStarVer+"). Having multiple versions of StarTube installed is almost never a good idea. Please disable one of them.");
}
}
}
function doStarTube(){
document.addEventListener("V3_NAVITRONIC_STARTED", function(e){
//console.log(e.detail);
if(e.detail.isPopstateCached==true){
isPopstate=true;
//deleteTitleOnTop();
}else{
isPopstate=false;
//returnWatchElements();
//deleteTitleOnTop();
}
setTimeout(checkContentMargin, 500);
setTimeout(checkContentMargin, 1500);
});
document.addEventListener("V3_SERVERCONTRACT_FLUSH_DOCEL_ATTRIB", function(e){
everyLoad();
});
document.addEventListener("V3_NAVITRONIC_FINISHED", function(e){
refreshCheck = 0;
everyLoad("x");
checkPlayerSize();
checkContentMargin();
setTimeout(checkContentMargin, 500);
setTimeout(checkContentMargin, 1500);
setTimeout(checkContentMargin, 2500);
setTimeout(checkContentMargin, 3000);
altWatch9Resize();
setTimeout(altWatch9Resize,1000);
});
window.addEventListener("resize", function(){
checkContentMargin();
checkPlayerSize();
altWatch9Resize();
});
setTimeout(checkPlayerSize,500);
setTimeout(checkPlayerSize,2000);
setTimeout(checkPlayerSize,4000);
setTimeout(altWatch9Resize,1000);
setTimeout(altWatch9Resize,3000);
setTimeout(altWatch9Resize,5000);
function altWatch9Resize(){
if($("[wl^='aw9']")&&$(".st-watch-owner-column")){
if($("[pw='640']")){
if($(".st-watch-owner-column .st-handoff-item")){
let tM=$(".st-watch-owner-column .st-handoff-item");
let nH=$("#creator-slider .st-slider-inner");
nH.append(tM);
}
}else if($(".st-watch-owner-column .st-handoff-item")==null){
let tM=$("#creator-slider .st-handoff-item");
let nH=$(".st-watch-owner-column");
nH.append(tM);
if($("[trigger='creator'].active")){
$("#st-watch-below").setAttribute("state","video-info");
$("[trigger='creator']").classList.remove("active");
$("[trigger='video-info']").classList.add("active");
$("#creator-slider").classList.remove("active");
$("#video-info-slider").classList.add("active");
}
}
}
}
function checkPlayerSize(){
if($("#watch7-main")){
let width=$("#watch7-main > #watch7-content").offsetWidth;
$("body .v3").setAttribute("pw",width);
}
}
everyLoad("x");
setTimeout(createThirdColumn, 2000);
setTimeout(dupeDetect,STDELAY);
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");
}
floaterPosition();
}
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, 2000);
setTimeout(everyLoad, 4000);
setTimeout(everyLoad, 6000);
setTimeout(everyLoad, 8000);
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 gS0=document.querySelectorAll(".guide-section")[1];
var gS1=document.querySelectorAll(".guide-section")[0];
var gS2=document.querySelectorAll(".guide-section")[2];
var gS3=document.querySelectorAll(".guide-section")[3];
var nH=$('.guide-toplevel');
nH.appendChild(gS0);
nH.appendChild(gS1);
nH.appendChild(gS2);
nH.appendChild(gS3);
}
});
}
}
});
function createWelcomeAlert(){
let cont=$("#alerts");
let nE=document.createElement("div");
nE.id="st-welcome-alert";
nE.innerHTML=`
Welcome to the StarTube Beta! Note that stability is not guaranteed with this release, and things can break. If you want to use the regular version of StarTube, click here.
`;
cont.insertBefore(nE,cont.children[0]);
nE.querySelector(".close").addEventListener("click",function(){
nE.style.display="none";
closedWelcomeBanner=true;
STS.showWelcomeBanner=false;
applySettings();
});
}
function createEFYTAlert(){
let cont=$("#alerts");
let nE=document.createElement("div");
nE.id="st-efyt-alert";
nE.innerHTML=`
The Enhancer for YouTube extension is not supported and will cause issues.
`;
cont.insertBefore(nE,cont.children[0]);
nE.querySelector(".close").addEventListener("click",function(){
nE.style.display="none";
closedEFYTBanner=true;
});
switch(bannerNo){
case 1:
newElem.querySelector(".yt-alert").classList.add("yt-alert-info");
break;
case 2:
newElem.querySelector(".yt-alert").classList.add("yt-alert-warn");
break;
case 3:
newElem.querySelector(".yt-alert").classList.add("yt-alert-error");
break;
}
}
function removeLCDark(CW){
if(CW.document.querySelector("html[dark]")){
CW.document.querySelector("html").removeAttribute("dark");
CW.document.querySelector("yt-live-chat-app").removeAttribute("dark");
}
}
function replaceLC(){
let cont=$(".live_chat_box_iframe_holder");
let nE=document.createElement("iframe");
nE.src="https://www.youtube.com/live_chat?is_popout=1&v="+CWD.id;
nE.width="100%";
nE.height="100%";
nE.id="st-live-chat";
cont.innerHTML=``;
cont.insertBefore(nE,cont.children[0]);
let CW=nE.contentWindow;
if($("[dark]")){
CW.document.querySelector("html").setAttribute("dark","");
}else{
setTimeout(function(){
removeLCDark(CW);
},1000);
setTimeout(function(){
removeLCDark(CW);
},3000);
setTimeout(function(){
removeLCDark(CW);
},4000);
setTimeout(function(){
removeLCDark(CW);
},5000);
setTimeout(function(){
removeLCDark(CW);
},7000);
setTimeout(function(){
removeLCDark(CW);
},10000);
}
}
function createThirdColumn(){
if(
$("#page.home")&&
STS.expAozoraHome==true&&
!window.location.href.includes("/feed")
){
let theRecs="";
if($(".lohp-newspaper-shelf")){
theRecs=document.querySelectorAll(".feed-item-container")[1];
}else{
theRecs=$(".feed-item-container");
}
if(theRecs.querySelector(".lohp-newspaper-shelf")){
theRecs=document.querySelectorAll(".feed-item-container")[2];
}
let nH=$(".branded-page-v2-secondary-col .branded-page-box");
theRecs.style.display="block";
nH.appendChild(theRecs);
let cont=$(".branded-page-v2-secondary-col");
let nE=document.createElement("div");
nE.id="epic-panda-rules";
nE.innerHTML=`
`;
cont.insertBefore(nE,cont.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");
arrayShelves.forEach(i=>{
if(i){
i.classList.add("rule-added");
let nE2=document.createElement("div");
nE2.setAttribute("class","horizontal-rule");
nE2.innerHTML=`
`;
i.insertBefore(nE2,i.children[0]);
}
});
}
});
}
}
function createShelfIcons(){
if(
STS.expPolymerStyles==true&&
!window.location.href.includes("/feed")
){
if($(".home")||$(".channel")){
var elm=".yt-uix-shelfslider-next";
waitForElement500(elm).then(function(elm){
if(canGo!=false){
let arrayShelves=document.querySelectorAll(".compact-shelf");
arrayShelves.forEach(i=>{
if(i.querySelector(".yt-uix-shelfslider-next:not(.icon-added) .yt-uix-button-icon-wrapper")){
let next=i.querySelector(".yt-uix-shelfslider-next:not(.icon-added) .yt-uix-button-icon-wrapper");
next.parentNode.classList.add("icon-added");
next.parentNode.classList.add("st-shelf-btn");
let nE=document.createElement("div");
nE.setAttribute("class","st-svg");
nE.innerHTML=STH0.SVG;
next.insertBefore(nE,next.children[0]);
nE.querySelector(".filled-icon path").setAttribute("d",svgDefs.rChev.f);
nE.querySelector(".outline-icon path").setAttribute("d",svgDefs.rChev.o);
}
if(i.querySelector(".yt-uix-shelfslider-prev:not(.icon-added) .yt-uix-button-icon-wrapper")){
let prev=i.querySelector(".yt-uix-shelfslider-prev:not(.icon-added) .yt-uix-button-icon-wrapper");
prev.parentNode.classList.add("icon-added");
prev.parentNode.classList.add("st-shelf-btn");
let nE=document.createElement("div");
nE.setAttribute("class","st-svg");
nE.innerHTML=STH0.SVG;
prev.insertBefore(nE,prev.children[0]);
nE.querySelector(".filled-icon path").setAttribute("d",svgDefs.lChev.f);
nE.querySelector(".outline-icon path").setAttribute("d",svgDefs.lChev.o);
}
});
}
});
}
}
}
function createFeedText(){
if($(".epic-panda-header")==null){
var elm=".branded-page-v2-subnav-container";
waitForElement10(elm).then(function(elm){
if(canGo!=false){
let cont=$('.feed-item-container');
let nE=document.createElement("div");
nE.classList="epic-panda-header";
nE.innerHTML=`
From YouTube
`;
cont.insertBefore(nE,cont.children[0]);
}
});
}
}
if($("#st-settings-button")==null){
var elm="#footer";
waitForElement10(elm).then(function(elm){
if(canGo!=false){
if($(".oz-expand-debugger-icon")){
$(".oz-expand-debugger-icon").addEventListener("click",function(){
if($("#st-settings-button")==null){
createExpandedFooter();
}
});
}else if($("#upload-menu-account")){
$("#upload-menu-account:not(.yt-uix-button-menu-new-section-separator)").addEventListener("click",function(){
if($("#st-settings-button")==null){
createOOBEAccessBtn();
}
});
}
if($(".astro-settings")==null){
createSettingsMenu();
}
}
});
}
function deleteTitleOnTop(){
if($("#st-watch-above-container")){
$("#st-watch-above-container").remove();
}
}
function guideAlwaysPinned(){
if($(".guide-pinning-enabled")==null){
$("body").classList.add("guide-pinning-enabled");
}
if($(".guide-pinned")==null){
$("body").classList.add("guide-pinned");
}
if($(".guide-guide")==null){
$("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 createNewWatchPrep(){
if($("#watch7-content.watch-content .yt-uix-button")!=null){
if($("#st-watch-below-container")==null||$("#st-watch-above-container")==null){
if($("#watch7-creator-bar")!==null){
createNewWatch(1);
}else{
createNewWatch(0);
}
}
}else{
var elm="#watch7-content.watch-content .yt-uix-button";
waitForElement10(elm).then(function(elm){
if(canGo!=false){
if($("#st-watch-below-container")==null||$("#st-watch-above-container")==null){
if($("#watch7-creator-bar")!==null){
createNewWatch(1);
}else{
createNewWatch(0);
}
}
}
});
}
}
function moveCountsToButtons(){
var elm=".watch";
waitForElement10(elm).then(function(elm){
if(canGo!=false){
if($(".likes-count")!=null){
let lC=$(".likes-count").textContent;
let dC=$(".dislikes-count").textContent;
$("#watch-like .run").textContent=lC;
$("#watch-dislike .yt-uix-button-content").innerHTML=`
Dislike
`;
$("#watch-dislike .run").textContent=dC;
$("#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")){
$("#masthead-search-term").setAttribute("placeholder",lang[usedLang].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","st-svg thumb");
container.classList.add("startube-has-icon");
newElem.innerHTML = `
`;
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($("[chan-loc]")){
$("html").removeAttribute("chan-loc");
}
}
if($("#page.search")){
$("html").setAttribute("location","search");
}
let feedLink="/feed/what_to_watch/recommended";
if(SRS.logoLink.tValue=="feedGrid"){
feedLink="/feed/what_to_watch/recommended?flow=grid";
}
if($("#logo-container")){
if(SRS.logoLink.tValue=="feedList"||SRS.logoLink.tValue=="feedGrid"){
$("#logo-container").href=feedLink;
$("#logo-container").data={
abstractVorElement:{
navigationEndpoint:{
browseEndpoint:{
browseId:"FEwhat_to_watch",
canonicalBaseUrl:feedLink
},
commandMetadata:{
webCommandMetadata:{
url:feedLink
}
}
}
}
}
}
}
let subsLink = "/feed/subscriptions";
if(SRS.subsGrid.tValue=="grid"){
subsLink = "/feed/subscriptions?flow=grid";
}
if(SRS.logoLink.tValue=="feedGrid"){
var elm="#FEwhat_to_watch-guide-item";
waitForElement10(elm).then(function(elm){
if(canGo!=false){
$("#FEwhat_to_watch-guide-item a").href="/feed/what_to_watch/recommended?flow=grid";
$("#FEwhat_to_watch-guide-item a").data={
abstractVorElement:{
navigationEndpoint:{
browseEndpoint:{
browseId:"FEwhat_to_watch",
canonicalBaseUrl:"/feed/what_to_watch/recommended?flow=grid"
},
commandMetadata:{
webCommandMetadata:{
url:"/feed/what_to_watch/recommended?flow=grid"
}
}
}
}
}
}
});
}
if($("#logo-container")){
if(SRS.logoLink.tValue=="subs"){
$("#logo-container").href=subsLink;
$("#logo-container").data={
abstractVorElement:{
navigationEndpoint:{
browseEndpoint:{
browseId:"FEsubscriptions",
canonicalBaseUrl:subsLink
},
commandMetadata:{
webCommandMetadata:{
url:subsLink
}
}
}
}
}
}
}
if(SRS.subsGrid.tValue=="grid"&&$("#FEsubscriptions-guide-item")){
$("#FEsubscriptions-guide-item a").href=subsLink;
$("#FEsubscriptions-guide-item a").data={
abstractVorElement:{
navigationEndpoint:{
browseEndpoint:{
browseId:"FEsubscriptions",
canonicalBaseUrl:subsLink
},
commandMetadata:{
webCommandMetadata:{
url:subsLink
}
}
}
}
}
}
let theDelay=1;
if(isPopstate==true){
theDelay=300;
}
setTimeout(function(){
switch (SRS.relatedTabs.tValue){
case "onNoSub":
$(".spitfire-body-container").setAttribute("rel-tabs","on-no-sub");
break;
case "on":
$(".spitfire-body-container").setAttribute("rel-tabs","on");
break;
case "off":
$(".spitfire-body-container").setAttribute("rel-tabs","off");
break;
}
switch (SRS.watchLayout.tValue){
case "watch4b":
$(".spitfire-body-container").setAttribute("wl","w4b");
break;
case "watch4c":
$(".spitfire-body-container").setAttribute("wl","w4c");
break;
case "watch5a":
$(".spitfire-body-container").setAttribute("wl","w5a");
break;
case "watch5b":
$(".spitfire-body-container").setAttribute("wl","w5b");
break;
case "watch5c":
$(".spitfire-body-container").setAttribute("wl","w5c");
break;
case "watch5d":
$(".spitfire-body-container").setAttribute("wl","w5d");
break;
case "watch7beta":
$(".spitfire-body-container").setAttribute("wl","w7beta");
html.setAttribute("exp-epic-watch7","");
break;
case "watch7":
$(".spitfire-body-container").setAttribute("wl","w7");
break;
case "watch8":
$(".spitfire-body-container").setAttribute("wl","w8");
break;
case "watch9a":
$(".spitfire-body-container").setAttribute("wl","w9a");
break;
case "watch9b":
$(".spitfire-body-container").setAttribute("wl","w9b");
break;
case "watch9c":
$(".spitfire-body-container").setAttribute("wl","w9c");
break;
case "watch10beta":
$(".spitfire-body-container").setAttribute("wl","w10beta");
break;
case "watch10teaser":
$(".spitfire-body-container").setAttribute("wl","w10finalteaser");
break;
case "watch10":
$(".spitfire-body-container").setAttribute("wl","w10final");
break;
case "altWatch9":
$(".spitfire-body-container").setAttribute("wl","aw9");
break;
case "altWatch9Fancy":
$(".spitfire-body-container").setAttribute("wl","aw9f");
break;
default:
}
switch (SRS.searchText.tValue){
case "on":
createSearchText();
break;
case "off":
break;
}
switch (SRS.playerVersion.tValue){
case "modernV1":
doModernPlayer();
html.setAttribute("pl-ver","mv1");
break;
case "modernV2":
doModernPlayer();
html.setAttribute("pl-ver","mv2");
break;
case "modernV3":
doModernPlayer();
html.setAttribute("pl-ver","mv2-3");
break;
case "modernV4":
doModernPlayer();
html.setAttribute("pl-ver","mv2-34");
break;
}
$(".spitfire-body-container").setAttribute("search-text",SRS.searchText.tValue);
$(".spitfire-body-container").setAttribute("rel-size",SRS.relatedSize.tValue);
$(".spitfire-body-container").setAttribute("layout",SRS.layoutSelect.tValue);
createNewWatchPrep();
},theDelay);
var arraNum=0;
arra.forEach(i=>{
let name=i[0];
checkSetting(name).then(function(value){
if(value == true && name == "configNoCast"){
html.setAttribute("nocast","");
}else if(value == true && name == "configAccountMenuV3SettingsButton"){
html.setAttribute("config-account-menu-v3-settings-button","");
createMESettingsBtn();
}else if(value == true && name == "configPolymerMenuV3SettingsButton"){
html.setAttribute("config-polymer-menu-v3-settings-button","");
}else if(value == true && name == "configCreateMenuV3SettingsButton"){
html.setAttribute("config-create-menu-v3-settings-button","");
}else if(value == true && name == "configWatch7SidebarCardShadow"){
html.setAttribute("config-watch7-sidebar-card-shadow","");
}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 == "expWatch9SidebarBus"){
html.setAttribute("exp-watch9-sidebar-bus","");
}else if(value == true && name == "expWatch9StickyColumns"){
html.setAttribute("exp-watch9-sticky-columns","");
}else if(value == true && name == "expGuideAlwaysPinned"){
guideAlwaysPinned();
}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 == "expNeverShowCompactDate"){
html.setAttribute("exp-never-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 == "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("classic-sub","");
}else if(value == true && name == "expClassicStyles"){
html.setAttribute("classic-styles","");
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 == "expNoVideosLink"){
html.setAttribute("exp-no-videos-link","");
}else if(value == true && name == "expSkinnySubscribe"){
html.setAttribute("exp-skinny-subscribe","");
}else if(value == true && name == "expModernStyles"){
html.setAttribute("modern-styles","");
changeCommentPlaceholder(0);
changeCommentHeader(0);
}else if(value == true && name == "modernCards"){
html.setAttribute("modern-cards","");
}else if(value == true && name == "sbStyles"){
html.setAttribute("skybird","");
createSearchIcon();
createNotifIcon();
//doStuffForSkybird
}else if(value == true && name == "sbCardPhysics"){
html.setAttribute("skybird-cards","");
}else if(value == true && name == "expLightChannelBar"){
html.setAttribute("exp-light-channel-bar","");
}else if(value == true && name == "expModernNotifIcon"){
html.setAttribute("exp-modern-notif-icon","");
}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 == "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 == "expModernPlaylists"){
html.setAttribute("exp-modern-playlists","");
}else if(value == true && name == "expModernPlaylistThumbnails"){
html.setAttribute("exp-modern-playlist-thumbnails","");
}else if(value == true && name == "expPlaylistRedBorder"){
html.setAttribute("exp-playlist-red-border","");
}else if(value == true && name == "expPlaylistTimestamps"){
html.setAttribute("exp-playlist-timestamps","");
}else if(value == true && name == "expTrueScrollableGuide"){
html.setAttribute("exp-true-scrollable-guide","");
doScrollableGuide();
}else if(value == true && name == "materialSpinner"){
html.setAttribute("mtrl-spin","");
setTimeout(createMaterialSpinner, 100);
}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 == "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 == "expEpicFeeds"){
html.setAttribute("exp-epic-feeds","");
doCosmicFeedHeader();
}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 == "expCosmicBanners"){
html.setAttribute("exp-cosmic-banners","");
}else if(value == true && name == "expCosmicBannersV2"){
html.setAttribute("exp-cosmic-banners-v2","");
}else if(value == true && name == "expCosmicComments"){
html.setAttribute("exp-legacy-comments","");
html.setAttribute("exp-cosmic-comments","");
}else if(value == true && name == "expCosmicGuideLayout"){
html.setAttribute("exp-cosmic-guide-layout","");
createCosmicGuide();
}else if(value == true && name == "expCosmicGuideStyle"){
html.setAttribute("exp-cosmic-guide-style","");
}else if(value == true && name == "expCosmicFeedsV1"){
html.setAttribute("exp-cosmic-feeds-v1","");
doCosmicFeedHeader();
}else if(value == true && name == "expCosmicFeedsV2"){
html.setAttribute("exp-cosmic-feeds-v2","");
doCosmicFeedHeader();
}else if(value == true && name == "expCosmicFeedsV3"){
html.setAttribute("exp-cosmic-feeds-v3","");
doCosmicFeedHeader();
}else if(value == true && name == "expCosmicFeedsThirdColumn"){
html.setAttribute("exp-cosmic-feeds-third-column","");
doThirdColumnVideosPrep();
}else if(value == true && name == "expNotifSquare"){
html.setAttribute("notif-square","");
}else if(value == true && name == "expChannels3" && !window.location.href.includes("force-c4")){
html.setAttribute("exp-channels3","");
createChannels3Prep();
}else if(value == true && name == "expChannels3BGVerticalRepeat" && !window.location.href.includes("force-c4")){
html.setAttribute("exp-channels3-bg-vertical-repeat","");
}else if(value == true && name == "expChannels3BGHorizontalRepeat" && !window.location.href.includes("force-c4")){
html.setAttribute("exp-channels3-bg-horizontal-repeat","");
}else if(value == true && name == "expChannels3TimeVisible"){
html.setAttribute("exp-channels3-time-visible","");
}else if(value == true && name == "expChannels3DateVisible"){
html.setAttribute("exp-channels3-date-visible","");
}else if(value == true && name == "expChannels3DateHidden"){
html.setAttribute("exp-channels3-date-hidden","");
}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("aozora-home","");
html.setAttribute("exp-aozora-home","");
}else if(value == true && name == "expAozoraHeader"){
html.setAttribute("aozora-header","");
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("aozora-styles","");
html.setAttribute("exp-aozora-styles","");
}else if(value == true && name == "expAozoraComments"){
html.setAttribute("exp-legacy-comments","");
html.setAttribute("exp-aozora-comments","");
}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 == "expAozoraSearch"){
html.setAttribute("aozora-search","");
}else if(value == true && name == "expStargazerTabbedHeader"){
html.setAttribute("stargazer-header","tabbed");
stargazerHeader(0);
searchButtonLowercase();
}else if(value == true && name == "expStargazerBarHeader"){
html.setAttribute("stargazer-header","bar");
stargazerHeader(1);
searchButtonLowercase();
}else if(value == true && name == "expStargazerSimpleHeader"){
html.setAttribute("stargazer-header","simple");
stargazerHeader(2);
searchButtonLowercase();
}else if(value == true && name == "expStargazerSubscribe"){
html.setAttribute("stargazer-sub","");
}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 == "expPolymerAccountMenu"){
html.setAttribute("exp-account-menu","");
html.setAttribute("exp-polymer-account-menu","");
createAccountMenu();
}else if(value == true && name == "expPolymerShell"){
html.setAttribute("exp-polymer-shell","");
createSearchIcon();
createNotifIcon();
}else if(value == true && name == "expEarlyPolymerShell"){
html.setAttribute("exp-polymer-shell","");
html.setAttribute("exp-early-polymer-shell","");
createNotifIcon();
}else if(value == true && name == "expEarlyPolymerGuide"){
html.setAttribute("exp-early-polymer-guide","");
}else if(value == true && name == "expPolymerGen2Colors"){
html.setAttribute("poly-g2-colors","");
html.setAttribute("exp-polymer-gen2-colors","");
}else if(value == true && name == "polymerGen2Comments"){
html.setAttribute("poly-g2-comments","");
}else if(value == true && name == "simpleReply"){
html.setAttribute("simple-reply","");
}else if(value == true && name == "typographySpacing"){
html.setAttribute("typography-spacing","");
}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("poly-styles","");
html.setAttribute("exp-polymer-styles","");
changeCommentPlaceholder(1);
changeCommentHeader(1);
setTimeout(createShelfIcons,200);
}else if(value == true && name == "expBetaPolymerStyles"){
html.setAttribute("exp-beta-polymer-styles","");
}else if(value == true && name == "expPolymerChannels"){
html.setAttribute("exp-polymer-channels","");
}else if(value == true && name == "expColorfulChannels"){
html.setAttribute("exp-colorful-channels","");
}else if(value == true && name == "expPolymerComments"){
html.setAttribute("poly-comments","");
html.setAttribute("exp-polymer-comments","");
moveSortBtn();
}else if(value == true && name == "expPolymerTooltips"){
html.setAttribute("exp-polymer-tooltips","");
}else if(value == true && name == "expTopbarShadow"){
html.setAttribute("exp-topbar-shadow","");
}else if(value == true && name == "expMaterialSignIn"){
html.setAttribute("exp-material-sign-in","");
}else if(value == true && name == "expRichGridHome"){
html.setAttribute("exp-rich-grid-home","");
setTimeout(doRichGridHome,200);
}else if(value == true && name == "expCommentsTeaser"){
html.setAttribute("comment-teaser","");
}else if(value == true && name == "expSegmentedLtod"){
html.setAttribute("segmented-ltod","");
}else if(value == true && name == "expRoundedSubscribe"){
html.setAttribute("round-sub","");
}else if(value == true && name == "expBlackSubscribe"){
html.setAttribute("black-sub","");
}else if(value == true && name == "expRoundedThumbs"){
html.setAttribute("round-thumbs","");
}else if(value == true && name == "expRoundedPlayer"){
html.setAttribute("round-player","");
}else if(value == true && name == "expRoundedSearch"){
html.setAttribute("round-search","");
}else if(value == true && name == "expRoundedGuide"){
html.setAttribute("exp-rounded-guide","");
}else if(value == true && name == "expRoundedStyles"){
html.setAttribute("round-styles","");
}else if(value == true && name == "expFrostedGlass"){
html.setAttribute("frosted-glass","");
createFrostedGlass();
}else if(value == true && name == "expPolymerGen3Colors"){
html.setAttribute("poly-g3-colors","");
}else if(value == true && name == "expYTSansTitle"){
html.setAttribute("exp-yt-sans-title","");
}else if(value == true && name == "expWMRButtonsLowercase"){
html.setAttribute("exp-wmr-buttons-lowercase","");
}else if(value == true && name == "expWMRAddTo"){
html.setAttribute("exp-wmr-addto","");
}else if(value == true && name == "expWMRNoSaveText"){
html.setAttribute("exp-wmr-no-save-text","");
}else if(value == true && name == "expWMRNoShareText"){
html.setAttribute("exp-wmr-no-share-text","");
}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("upload-icon","");
createUploadIcon();
}else if(value == true && name == "expCreateIcon"){
html.setAttribute("create-icon","");
createCreateIcon();
}else if(value == true && name == "expYouTubeApps"){
html.setAttribute("exp-youtube-apps","");
createYouTubeApps();
}else if(value == true && name == "expRingo2"){
html.setAttribute("ringo2","");
html.setAttribute("exp-ringo2","");
doGuideIcons("ringo2");
}else if(value == true && name == "expRingo2Gradients"){
html.setAttribute("ringo2-gradients","");
}else if(value == true && name == "favi24"){
replaceFavicon("2024");
}else if(value == true && name == "favi24O"){
replaceFavicon("2024_old");
}else if(value == true && name == "favi17"){
replaceFavicon("2017");
}else if(value == true && name == "favi15"){
replaceFavicon("2015");
}else if(value == true && name == "favi12"){
replaceFavicon("2012");
}else if(value == true && name == "favi10"){
replaceFavicon("2010");
}else if(value == true && name == "favi05"){
replaceFavicon("2005");
}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(
$("#st-nsp") === null &&
STS.show2point4 == true
){
let container76=$('.spitfire-body-container.v3');
let newElem76=document.createElement("div");
newElem76.id="st-nsp";
newElem76.innerHTML=`
What's new in StarTube 2.4.0
Watch Layout HTML Rewrite
The watch layout HTML (page structure) has been rewritten. While mostly an under-the-hood improvement, some improvements have been made to the user experience because of it. The rewrite isn't 100% done, and some things might be changed/fixed in the future.
Stargazer watch layout
One of the Stargazer watch layouts, Watch4B has been added thanks to the HTML rewrite.
Advanced options are being phased out
Several advanced options have been removed, and were replaced with easier to understand regular options.
New layout options
2023 Layout, Early 2017 Layout, Early 2014 Layout (Prototype), and Late 2013 Layout (Prototype) have been added, and are all variations of existing layouts.
Free as a Skybird
An entirely custom layout has been added to StarTube: Skybird. It aims to be an alternate universe 2016/2017 layout.
Toggle Dark Mode from the account menu
In the Polymer layouts, you can now toggle dark mode from the account menu.
`;
container.insertBefore(newElem, container.children[4]);
$("#st-settings-button").addEventListener("click", showHideSettings);
}
function createExpandedFooter(){
let container = document.querySelector('.smartadd.selected .smartadd_content .internal-config');
//let container = document.querySelector('#yt-masthead-content');
var newElem = document.createElement("div");
newElem.id = "startube-astro-settings";
newElem.innerHTML = `
`;
container.insertBefore(newElem, container.children[0]);
$("#st-settings-button").addEventListener("click", showHideSettings);
}
function createSettingsMenu(){
let cont=$('.spitfire-body-container.v3');
let nE=document.createElement("div");
nE.id="startube-settings-window-entity";
nE.classList="hid astronomical-settings-refresh astro-settings flex-bar";
nE.innerHTML=`
StarTube SettingsVersion ${currStarVer}
Your changes were automatically saved. Refresh the page for them to apply.
Misc
Config
Site
Layout
Misc
Topbar
Guide
Player
Watch page
Channel page
Advanced
Config
General site layout options.
Config overview
Config is from StarTube version ${STS.importantInfo.startubeVersion}
Config is from the ${STS.importantInfo.startubeChannel} channel
Reset config
Turn off all StarTube options (will not affect locked settings)
Layout
General site layout options.
Layout mode
Manual
Adaptive
Adaptive layout is on. Switch to manual layout mode to choose your layout.
Layout select
Custom (don't enforce any specific layout, ideal for making use of V3's config options)
Amsterdam
2024 (Custom ver)
2023
Polymer
2022
2021
2020
2019
2018
2017
Early 2017
2016 (prototype layout)
Skybird (Custom layout)
2016 (alternate universe version)
Unfinished
Hitchhiker
2024 (unofficial legacy layout, uses the pinkish Ringo2 rebrand)
2018-2020 (legacy layout)
2017 (legacy layout)
Early 2017
Late 2016
Mid 2016
Early 2016
2015
Early 2015
2014
Early 2014 (Prototype centered layout)
Late 2013 (Prototype centered layout)
Late 2013
Mid 2013
Early 2013
Epic Panda (prototype layout)
Mid-Late 2012 (prototype layout)
Mid-Late 2012 (prototype layout, custom ver)
Cosmic Panda
Late 2012
Mid 2012
Early 2012
Aozora
2011
Stargazer
Late 2009
Early 2009
2008
Misc
General site layout options.
Favicon select
Choose which little icon appears on the tabs. Note that these don't work 100% of the time.
Auto
2024
2024 (Old)
2017-2024
2015-2017
2012-2015 (V3 default)
2010-2011
2005-2010
Outline Icons
Auto
On for 2021 and later layouts
On for Polymer and Amsterdam layouts
Off
Homepage (https://www.youtube.com/) Redirect
Choose which page the YouTube homepage redirects to. That is to say, this lets you select which version of the homepage to see on YouTube's first load.
Auto
Off (do not redirect)
Grid Feed (used for 2020-present)
List Feed (used for 2012)
Topbar
General site layout options.
Gbar version
Use the modern Gbar on all layouts.
Use the classic Gbar on all layouts.
Use the material Gbar on all layouts.
Always off
None of the above; do not allow StarTube to change V3's Gbar settings (will not undo previous changes made by StarTube)
Logo Link
Choose which page the YouTube logo links to.
Auto
Normal home [V3 Default]
Grid Feed (used for 2020-present)
List Feed (used for 2012)
Subscriptions
"Search" text on searchbar
Auto
On (Mid 2016-Present)
Off (Until 2016)
Account menu
Auto
Masthead Expanded (2014 and earlier)
Hitchhiker Menu (2015 onwards Hitchhiker layouts)
Polymer Menu (2017-present)
Guide
Guide (left sidebar) options.
Guide item link
Choose whether channel links on the guide (left sidebar) take you to their channel, or their feed. [This setting just changes the existing V3 setting GUIDE_NAVIGATE_TO_CHANNEL_FEED.]
Auto
Channel
Feed (V3 default)
Guide always pinned
Keep the guide visible on all pages, including the watch page. Only affects layouts from 2014 and later.
On
Off
Subscriptions page
Choose whether to use List or Grid view for subscriptions by default.
Auto
Grid
List
Player
General site layout options.
Player version
Automatically decide based on layout
2021-Present
2020-2021
2016-2020
2015-2016
2013-2015 (V3 default)
Flash7
Embed Player (use this if the player isn't working)
None of the above; do not allow StarTube to change V3's player settings (will not undo previous changes made by StarTube)
Player loading icon
Auto
Classic will be used on layouts from before 2018.
Classic (Pre-2018)
Material (2018-Present)
Player size
Choose the set of player sizes to use across different resolutions.
Auto (stable)
Sticks to the basic V3 player sizes. If you don't want bugs, use this
Auto (high accuracy, less stable)
More accurate, but uses the custom player sizes, and therefore breaks theater mode on most layouts
Non-flexwatch [always 640x360]
Flexwatch Mini (V3 default)
Flexwatch Mini Version 2 (~2015 onwards) [Same player sizes, but they happen at different resoltions]
Breaks theater mode
Flexwatch Medium (Custom, bigger sizes) [640x360, 1024x576, 1600x900]
Breaks theater mode
Flexwatch Large (Custom, even bigger sizes, closer to modern YouTube) [854x480, 1280x720, 1920x1080]
Breaks theater mode
Watch page
General site layout options.
Watch layout select
Select the layout that the watch page uses. Note that not all combinations are tested, and some will work better than others (Watch4B will not work well on newer layouts for example)
Auto
Auto (use alt-watch9 for Hitchhiker layouts)
Watch4B (Early 2009)
Star ratings, title on top, description on right
Watch5C (2011)
Title on top
Watch5D (2012)
Title on top
Watch7 Beta (2012, Epic Panda)
Watch7 (2013-2014) [V3 default]
Watch8 (2015-2017, 2017-2020 [Legacy layout])
Watch9A (2016-2019)
Watch9B (2020-2022)
Watch10 Beta (2022)
Watch10 (With comment teaser, late 2022 experiment)
Watch10 (Late 2022-Present)
Alt-watch9 (works best on the hitchhiker layouts)
Alternate universe 2015-2017-ish layout
Fancy Alt-watch9 (works best on the hitchhiker layouts)
Your current layout/watch layout combination may not work as intended.
Related tabs
A component of alt-watch9 that can also be used in other layouts. If you disable this while using alt-watch9, you will get alt-watch9's original three-column layout.
Auto (only enabled when alt-watch9 is enabled)
On
On (don't move subscribe button)
Off
Related grid
On (only works with 2013 and later)
Off
Related video size
Auto
Smaller (2011 and below)
Small (2012-2016)
Medium (custom middleground)
Large (2016-present)
Huge (based on a Polymer experiment)
Show dates on related videos
Auto
Always show
Show on hover (V3 default)
Never show
Channel page
General site layout options.
Channel version
Auto
Channels4 (2013-present)
Channels3 (Late 2011-Early 2013)
Colorful channels
Makes the rest of the page use the colors of the channel banner. Only works with Channels4.
Auto (on for 2016 Polymer)
Auto (on for all Polymer layouts)
On
On (V3 implementation, doesn't change the guide or topbar)
Off
Advanced
Show all settings
Locked settings
Unlocked settings
Advanced configuration. If you change a setting here, you will most likely need to lock it, or else the setting will be overwritten.
`;
cont.insertBefore(nE,cont.children[1]);
let dump = $("#startube-microconfigs-dump");
let number = 1;
ScF.forEach(i => {
let settingElem = document.createElement("div");
settingElem.id = i[1].name;
settingElem.classList = "astro-setting astro-checkbox-setting";
settingElem.setAttribute("hide","false");
settingElem.innerHTML = `
`;
dump.insertBefore(settingElem,dump.children[number-1]);
settingElem.querySelector(".astro-setting-title span").textContent=i[1].name;
settingElem.querySelector(".astro-setting-desc span").innerHTML=i[1].desc;
settingElem.setAttribute("value",i[1].value);
settingElem.setAttribute("iron",i[1].locked);
if(i[1].locked==true){
settingElem.querySelector(".astro-lock").title="This setting is locked. Click to unlock it.";
}
number++;
});
$("#downloadJSON").addEventListener("click", function(){
createJSON();
});
$("#astro-v3-settings-access-btn").addEventListener("click", openV3Settings);
$("#cancelJSON").addEventListener("click", function(){
$("#startube-settings-window").setAttribute("loading-config","false");
});
$("#json-upload").addEventListener("cancel", () => {
$("#startube-settings-window").setAttribute("loading-config","false");
});
$("#json-upload").addEventListener("change", () => {
$("#startube-settings-window").setAttribute("loading-config","true");
});
$("#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.");
}
});
$("#RTD").addEventListener("click", function(){
localStorage.removeItem(theSets);
localStorage.removeItem("starTubeConfigCreated");
window.location.reload();
});
$("#DAO").addEventListener("click", function(){
var settingArray = document.querySelectorAll('.astro-checkbox-setting[value="true"][iron="false"] .astro-checkbox');
settingArray.forEach(item => {
item.click();
});
window.location.reload();
});
doRadioSettings();
$("#refreshPage").addEventListener("click", function(){
window.location.reload();
});
$("#exitSettings").addEventListener("click", showHideSettings);
$("#startube-settings-fence").addEventListener("click", showHideSettings);
$("#astro-micro-filter-button").addEventListener("click", showHideMicroFilter);
$("#astro-micro-filter-fence").addEventListener("click", showHideMicroFilter);
$("#astro-mc-all").addEventListener("click",function(){
$("#astro-micro-filter-button").setAttribute("state","all");
$("#astro-micro-filter-menu").setAttribute("state","all");
$("#startube-microconfigs-dump").setAttribute("filter","none");
showHideMicroFilter();
/*let resultCount = 0;
setTimeout(function(){
var arraySettings = document.querySelectorAll(".astro-checkbox-setting[hide='false']");
arraySettings.forEach(i => {
resultCount++;
});
$("#startube-result-count span").textContent = resultCount + " results";
$("#startube-settings-content").setAttribute("searching","true");
}, 10);*/
});
$("#astro-mc-locked").addEventListener("click",function(){
$("#astro-micro-filter-button").setAttribute("state","locked");
$("#astro-micro-filter-menu").setAttribute("state","locked");
$("#startube-microconfigs-dump").setAttribute("filter","locked");
showHideMicroFilter();
/*let resultCount = 0;
setTimeout(function(){
var arraySettings = document.querySelectorAll(".astro-checkbox-setting[hide='false'][iron='true']");
arraySettings.forEach(i => {
resultCount++;
});
$("#startube-result-count span").textContent = resultCount + " results";
$("#startube-settings-content").setAttribute("searching","true");
}, 10);*/
});
$("#astro-mc-unlocked").addEventListener("click",function(){
$("#astro-micro-filter-button").setAttribute("state","unlocked");
$("#astro-micro-filter-menu").setAttribute("state","unlocked");
$("#startube-microconfigs-dump").setAttribute("filter","unlocked");
showHideMicroFilter();
/*let resultCount = 0;
setTimeout(function(){
var arraySettings = document.querySelectorAll(".astro-checkbox-setting[hide='false'][iron='false']");
arraySettings.forEach(i => {
resultCount++;
});
$("#startube-result-count span").textContent = resultCount + " results";
$("#startube-settings-content").setAttribute("searching","true");
}, 10);*/
});
function showHideMicroFilter(){
if($("#astro-micro-filter-menu.hid") != null){
$("#astro-micro-filter-menu").classList.remove("hid");
$("#astro-micro-filter-fence").classList.remove("hid");
}else if($("#astro-micro-filter-menu.hid") == null){
$("#astro-micro-filter-menu").classList.add("hid");
$("#astro-micro-filter-fence").classList.add("hid");
}
}
document.querySelectorAll(".astro-sidebar-item").forEach(i => {
i.addEventListener("click", function(){
$("#startube-settings-content > div").setAttribute("state",i.getAttribute("p"));
$(".astro-sidebar-item.active").classList.remove("active");
i.classList.add("active");
});
});
$("#astro-searchbar input").addEventListener("keydown", function(){
let resultCount = 0;
let key = event.key;
let thisE = this;
setTimeout(function(){
let value = thisE.value;
if(value == "`"){
var arraySettings = document.querySelectorAll(".astro-checkbox-setting");
arraySettings.forEach(i => {
if(i){
resultCount++;
i.setAttribute("hide","false");
}
});
//$("#startube-result-count span").textContent = "In total, there are " + resultCount + " settings available (you are seeing this because you searched '`')";
$("#startube-settings-content").setAttribute("searching","true");
}else if(value !== ""){
var arraySettings = document.querySelectorAll(".astro-checkbox-setting");
arraySettings.forEach(i => {
if(i){
var item = i.getAttribute("id");
item = item.toUpperCase();
value = value.toUpperCase();
if(item.includes(value)){
resultCount++;
i.setAttribute("hide","false");
}else{
i.setAttribute("hide","true");
}
}
});
//$("#startube-result-count span").textContent = resultCount + " results";
$("#startube-settings-content").setAttribute("searching","true");
}else{
var arraySettings = document.querySelectorAll(".astro-checkbox-setting");
arraySettings.forEach(i => {
if(i){
i.setAttribute("hide","false");
$("#startube-settings-content").setAttribute("searching","false");
// $("#startube-result-count span").textContent = "All of the microconfigs that StarTube's presets and other options make use of. You can customize a lot here, but it can get confusing.";
}
});
}
}, 10);
});
var arraySettings = document.querySelectorAll(".astro-checkbox-setting");
arraySettings.forEach(i => {
if(i){
var item = i.getAttribute("id");
var itemV = STS[item];
if(itemV == true){
i.setAttribute("value","true");
}else{
i.setAttribute("value","false");
}
if(STS.ironSettings[item] != null){
i.setAttribute("iron", "true");
}
}
});
doListen();
function doListen(){
let i=0;
for (i = 0; i < document.querySelectorAll(".astro-checkbox").length; i++){
document.querySelectorAll(".astro-checkbox")[i].onclick = function(e)
{
e.preventDefault();
var iron = this.parentNode.parentNode.getAttribute("iron");
if(iron == "true"){
alert("You must unlock this setting before changing it. (Locking and unlocking settings is done by right clicking them)");
}else{
var thisElm = this.parentNode.parentNode;
changeSetting(thisElm);
}
applySettings();
};
}
for (i = 0; i < document.querySelectorAll(".astro-lock").length; i++){
document.querySelectorAll(".astro-lock")[i].onclick = function(e)
{
e.preventDefault();
var thisElm = this.parentNode.parentNode;
var iron = thisElm.getAttribute("iron");
let id = thisElm.id;
let value = thisElm.getAttribute("value");
if(value == "true"){
value = true;
}
if(value == "false"){
value = false;
}
if(value == null){
value = false;
}
if(STS.ironSettings[id] == null){
STS.ironSettings[id] = value;
thisElm.setAttribute("iron","true");
this.setAttribute("data-tooltip-text","This setting is locked. Click to unlock it.");
applySettings();
}else{
delete STS.ironSettings[id];
thisElm.setAttribute("iron","false");
this.setAttribute("data-tooltip-text","Lock setting");
applySettings();
}
applySettings();
};
}
}
}
function changeSetting(thisElm,a){
if(a!=="a"){
var theSetting=thisElm.getAttribute("id");
var checked=thisElm.getAttribute("value");
}else{
var theSetting=thisElm;
var checked=true;
}
if(theSetting=="RTD"){
localStorage.removeItem(theSets);
localStorage.removeItem("starTubeConfigCreated");
window.location.reload();
}else if(a!=="a"){
if(checked=="true"){
STS[theSetting]=false;
thisElm.setAttribute("value","false");
if(STS.ironSettings[theSetting]){
STS.ironSettings[theSetting]=false;
}
applySettings();
}else{
STS[theSetting]=true;
thisElm.setAttribute("value","true");
if(STS.ironSettings[theSetting]){
STS.ironSettings[theSetting]=true;
}
applySettings();
}
}
function doIronSettings(){
let irons=Object.entries(STS.ironSettings);
irons.forEach(i=>{
let name=i[0];
let value=i[1];
STS[name]=value;
});
}
}
function doRadioSettings(){
document.querySelectorAll(".astro-radio-setting").forEach(i=>{
if(i.hasAttribute("c")){
let c=i.getAttribute("c");
let xc="[p='"+c+"']";
let value=i.getAttribute("value");
if(value==STS.radioSettings[c].visValue){
i.setAttribute("checked","true");
$(".astro-settings").setAttribute(c,value);
}
i.addEventListener("click",function(){
document.querySelectorAll(".astro-radio-setting").forEach(i2=>{
if (i2.getAttribute("c")==c&&i2.getAttribute("checked")=="true"){
i2.removeAttribute("checked");
$(".astro-settings").setAttribute(c,value);
value==i.getAttribute("value");
i.setAttribute("checked","true");
STS.radioSettings[c].visValue=value;
executeRadios(c,value);
applySettings();
}
});
});
}
});
document.querySelectorAll(".astro-input-setting").forEach(i => {
if(i.hasAttribute("c")){
let c=i.getAttribute("c");
let xc="[p='"+c+"']";
let value=i.querySelector("input").value;
if(value==STS.inputSettings[c].visValue){
$(".astro-settings").setAttribute(c,value);
}
i.addEventListener("keydown",function(){
setTimeout(function(){
value=i.querySelector("input").value;
$(".astro-settings").setAttribute(c,value);
STS.inputSettings[c].visValue=value;
STS.inputSettings[c].tValue=value;
applySettings();
},10);
});
}
});
}
function handoffComments(dir){
let tM=$(".comments-iframe-container");
let nH=$("#comment-panel [js-destination]");
if(dir=="forward"){
html.setAttribute("comment-panel-open","true");
}
if(dir=="backward"){
nH=$("#watch-discussion");
html.setAttribute("comment-panel-open","false");
}
nH.insertBefore(tM,nH.children[0]);
}
//EXfunct
function addIcons(){
if($("#watch-like svg")==null){
var elm="#eow-description";
waitForElement10(elm).then(function(elm){
if(canGo!=false){
let cont=$("#watch-like .yt-uix-button-icon-wrapper");
let nE=document.createElement("div");
nE.setAttribute("class","st-svg");
cont.classList.add("startube-has-icon");
nE.innerHTML = `
`;
cont.insertBefore(nE,cont.children[0]);
}
});
}
if($("#watch-dislike svg")==null){
var elm="#eow-description";
waitForElement10(elm).then(function(elm){
if(canGo!=false){
let cont=$("#watch-dislike .yt-uix-button-icon-wrapper");
let nE=document.createElement("div");
nE.setAttribute("class","st-svg");
cont.classList.add("startube-has-icon");
nE.innerHTML = `
`;
cont.insertBefore(nE,cont.children[0]);
}
});
}
}
function createApps(){
let cont=$('#yt-masthead-user');
let nE=document.createElement("div");
nE.id='google-apps';
nE.innerHTML=`
`;
cont.insertBefore(nE,cont.children[0]);
}
let nE=document.createElement("div");
nE.id="startube-style";
nE.innerHTML=`
`;
html.insertBefore(nE,html.children[0]);
}
function doBanner(){
var elm="#content.ytd-app";
waitForElement(elm).then(function(elm){
if(canGo!=false){
let cont=$('#content.ytd-app');
let nE=document.createElement("div");
nE.id="nebula-return-banner";
nE.innerHTML=`