`;
container.insertBefore(newElem,container.children[0]);
/*let featuredList = Bdata.horizontalListRenderer.items;
let newNumber = 0;
featuredList.forEach(i => {
if(i.gridVideoRenderer){
buildFeaturedContent(i.gridVideoRenderer, "bigListVideo", umber);
}
newNumber++;
});*/
let newNumber = 0;
Bdata.forEach(i => {
if(i.richItemRenderer){
createRenderer(i.richItemRenderer.content.videoRenderer, "bigListVideo", newNumber, Bdata.length);
}
newNumber++;
});
}
}
function buildFeaturedChannels(Bdata, number){
if($(".c3-featured-channels") == null){
let title = Bdata.title.runs[0].text;
let list = Bdata.content.horizontalListRenderer.items;
let container = $("#c3-featured-channels-slot");
let newElem = document.createElement("div");
newElem.classList = "c3-featured-channels";
newElem.innerHTML = `
${title}
`;
container.insertBefore(newElem,container.children[0]);
let newNumber = 0;
list.forEach(i => {
if(i.gridChannelRenderer){
createRenderer(i.gridChannelRenderer, "featuredChannel", newNumber);
}
newNumber++;
});
}
}
function buildFeaturedPlaylists(Bdata, number){
if($(".c3-featured-playlists") == null){
let title = Bdata.title.runs[0].text;
let list = Bdata.content.horizontalListRenderer.items;
let container = $("#c3-featured-playlists-slot");
let newElem = document.createElement("div");
newElem.classList = "c3-featured-playlists";
newElem.innerHTML = `
${title}
`;
container.insertBefore(newElem,container.children[0]);
let newNumber = 0;
list.forEach(i => {
if(i.gridPlaylistRenderer){
createRenderer(i.gridPlaylistRenderer, "featuredPlaylist", newNumber);
}
newNumber++;
});
}
}
function createRenderer(Bdata, renderer, number, length, extra, extra2){
if(number == null){
number = 0;
}
let i = Bdata;
if(renderer == "superCompactVideo"){
let pageVid = extra;
let currPage = extra2;
let container = $("#videos-dd-content");
let newElem = document.createElement("a");
newElem.classList = "super-compact-video sc-video";
newElem.setAttribute("page",currPage);
newElem.setAttribute("page-video",pageVid);
newElem.innerHTML = `
`;
container.insertBefore(newElem,container.children[number]);
let video = i.richItemRenderer.content.videoRenderer;
let title = video.title.runs[0].text;
let time = video.lengthText.simpleText;
let views = video.viewCountText.simpleText;
let date = video.publishedTimeText.simpleText;
let thumbl = video.thumbnail.thumbnails.length;
let thumb = video.thumbnail.thumbnails[thumbl - 1].url;
let nav = video.navigationEndpoint;
let href = "/watch?v=" + video.videoId;
newElem.href = href;
newElem.querySelector(".sc-video-title span").textContent = title;
newElem.querySelector(".sc-video-title").title = title;
newElem.querySelector(".sc-video-time span").textContent = time;
newElem.querySelector(".sc-video-view-count span").textContent = views;
newElem.querySelector(".sc-video-date span").textContent = date;
newElem.querySelector(".sc-video-thumbnail img").src = thumb;
newElem.data = {
abstractVorElement: {
navigationEndpoint: nav
}
}
}
if(renderer == "altWatch9SCVid"){
let id = i.navigationEndpoint.watchEndpoint.videoId;
let href = "/watch?v=" + id;
let date = i.publishedTimeText.simpleText;
let viewCount = i.viewCountText.simpleText;
let container = $("#watch9-owner-slider .scroller-inner");
let title = i.title.runs[0].text;
let time = i.lengthText.simpleText;
let thumbnail = i.thumbnail.thumbnails[2].url;
let newElem = document.createElement("li");
newElem.classList = "st-super-compact-video";
newElem.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")){
gdp.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 = gdp.commentCount;
$(".distiller_yt_headline").classList.add("startube");
}
}
});
}
}
}
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("x");
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(everyLoad, 20000);
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 createWelcomeAlert(){
let container = document.querySelector("#alerts");
var newElem = document.createElement("div");
newElem.id = "st-welcome-alert";
newElem.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.
`;
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");
}
if(STS.expLogoLinksToFeed == true && $("#logo-container")){
$("#logo-container").href = "/feed/what_to_watch/recommended";
$("#logo-container").data = {
abstractVorElement: {
navigationEndpoint: {
browseEndpoint: {
browseId: "FEwhat_to_watch",
canonicalBaseUrl: "/feed/what_to_watch/recommended"
},
commandMetadata: {
webCommandMetadata: {
url: "/feed/what_to_watch/recommended"
}
}
}
}
}
}
let subsLink = "/feed/subscriptions";
if(STS.expLinkToGridSubs == true){
subsLink = "/feed/subscriptions?flow=grid";
}
if(STS.expLogoLinksToSubs == true && $("#logo-container")){
$("#logo-container").href = subsLink;
$("#logo-container").data = {
abstractVorElement: {
navigationEndpoint: {
browseEndpoint: {
browseId: "FEsubscriptions",
canonicalBaseUrl: subsLink
},
commandMetadata: {
webCommandMetadata: {
url: subsLink
}
}
}
}
}
}
if(STS.expLinkToGridSubs == true && $("#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
}
}
}
}
}
}
var arraNum = 0;
arra.forEach(itemRoot => {
let name = itemRoot[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 == "expAdaptiveLayout"){
html.setAttribute("exp-adaptive-layout","");
}else if(value == true && name == "expRelatedThumbsSizeSmaller"){
html.setAttribute("exp-related-thumbs-size-smaller","");
}else 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 == "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 == "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 == "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 == "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 == "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 == "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 == "expModernPlayerV3"){
html.setAttribute("exp-modern-player","");
html.setAttribute("exp-modern-player-v2","");
html.setAttribute("exp-modern-player-v3","");
doModernPlayer();
}else if(value == true && name == "expModernPlayerV4"){
html.setAttribute("exp-modern-player","");
html.setAttribute("exp-modern-player-v2","");
html.setAttribute("exp-modern-player-v3","");
html.setAttribute("exp-modern-player-v4","");
doModernPlayer();
}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 == "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 == "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 == "expWatch5D"){
html.setAttribute("exp-watch5d","");
createWatch5Prep();
}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 == "expWatch5C"){
html.setAttribute("exp-watch5d","");
html.setAttribute("exp-watch5c","");
createWatch5Prep();
}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","");
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 == "expWatch10"){
html.setAttribute("exp-watch10","");
createWatch10Prep();
}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","");
}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.show2point3 == true
){
let container76=$('.spitfire-body-container.v3');
let newElem76=document.createElement("div");
newElem76.id="st-nsp";
newElem76.innerHTML=`
What's new in StarTube 2.3.0
Quality of life improvements
Many QoL improvements have been made, such as a more accurate 2014 layout, the videos dropdown on the 2011 & 2012 layouts, more accurate right click menu on the 2016-2020 player, as well as most layouts being more accurate overall.
New layout options
Unfinished versions of the Stargazer layouts have been added, as well as a more accurate version of Epic Panda, and a custom version of the 2024 layout.
Improved Dark Mode
Layouts from Mid 2013 or later work better with Dark Mode now.
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)
Polymer
2022
2021
2020
2019
2018
2017
2016 (prototype layout)
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
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
Very unfinished
Early 2009
Very unfinished
2008
Very unfinished
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
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)
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
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 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
Auto
Auto (use alt-watch9 for Hitchhiker layouts)
Alt-watch9 (works best on the hitchhiker layouts)
Fancy Alt-watch9 (works best on the hitchhiker layouts)
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.
`;
container.insertBefore(newElem, container.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 = `