`;
if (gdp.currChan.sidebar.links) {
let linkNo = 0;
$("#c3-channel-links-slot").classList.remove("hid");
gdp.currChan.sidebar.links.forEach(i => {
let link = i.channelExternalLinkViewModel;
let container = $("#c3-channel-links-slot");
var newElem = document.createElement("div");
newElem.classList = "c3-channel-link-container";
newElem.innerHTML = `
`;
container.insertBefore(newElem, container.children[linkNo]);
linkNo++;
let title = link.title.content;
newElem.querySelector(".c3-channel-link-text span").textContent = title;
let url = link.link.content;
newElem.querySelector(".c3-channel-link").setAttribute("href","https://" + url);
let icon;
if (link.favicon) {
icon = link.favicon.sources[2].url;
newElem.querySelector(".c3-channel-link img").setAttribute("src",icon);
}
});
}
if (gdp.currChan.currPage == "videos") {
$("#c3-content-header").innerHTML = `
`;
}
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 doStarTube() {
document.addEventListener("V3_NAVITRONIC_FINISHED", function(e) {
refreshCheck = 0;
everyLoad("x");
checkContentMargin();
setTimeout(checkContentMargin, 500);
setTimeout(checkContentMargin, 1500);
setTimeout(checkContentMargin, 2500);
setTimeout(checkContentMargin, 3000);
});
document.addEventListener("V3_NAVITRONIC_STARTED", function(e) {
setTimeout(checkContentMargin, 500);
setTimeout(checkContentMargin, 1500);
deleteTitleOnTop();
});
window.addEventListener("resize", function() {
checkContentMargin();
});
everyLoad();
setTimeout(createThirdColumn, 2000);
checkContentMargin();
function checkContentMargin() {
if (
$("#content") &&
$("[static] #appbar-guide-menu")
) {
var rock = $("#content").getBoundingClientRect();
$("#appbar-guide-menu").style.left = rock.left + "px";
$("html").style.setProperty("--guide-left",rock.left + "px");
if ($("#masthead-positioner")) {
var stone = $("#masthead-positioner").getBoundingClientRect();
$("#appbar-guide-menu").style.top = stone.height + "px";
$("html").style.setProperty("--guide-top",stone.height + "px");
}
$("#appbar-guide-menu").style.height = rock.height - 20 + "px";
$("html").style.setProperty("--guide-height",rock.height - 20 + "px");
}
}
setTimeout(everyLoad, 1000); // sometimes 's attributes "reset" halfway through loading, causing some settings to not apply, this should correct that when it happens. Done twice until I find a better way to do it.
setTimeout(everyLoad, 3000);
setTimeout(everyLoad, 6000);
setTimeout(everyLoad, 10000);
setTimeout(everyLoad, 15000);
setTimeout(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.
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)
Polymer
2022
2021
2020
2019
2018
2017
2016 (prototype layout)
Hitchhiker
2024 (unofficial legacy layout, uses the experimental "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, custom ver)
Cosmic Panda
Late 2012
Mid 2012
Early 2012
Aozora
2011
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)
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)
Player
General site layout options.
Player version
Automatically decide based on layout
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 (experimental)
Choose the set of player sizes to use across different resolutions.
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
No preference
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
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
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 = `
`;
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].description;
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();
});
$("#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("ST_BLEEDING_EDGE_SETTINGS");
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(itemRoot => {
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(itemRoot => {
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(itemRoot => {
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 => {
if (i.id == "st-astro-config") {
i.addEventListener("click", function() {
$("#startube-settings-content > div").setAttribute("state","config");
$(".astro-sidebar-item.active").classList.remove("active");
$("#st-astro-config").classList.add("active");
});
} else if (i.id == "st-astro-layout") {
i.addEventListener("click", function() {
$("#startube-settings-content > div").setAttribute("state","layout");
$(".astro-sidebar-item.active").classList.remove("active");
$("#st-astro-layout").classList.add("active");
});
} else if (i.id == "st-astro-topbar") {
i.addEventListener("click", function() {
$("#startube-settings-content > div").setAttribute("state","topbar");
$(".astro-sidebar-item.active").classList.remove("active");
$("#st-astro-topbar").classList.add("active");
});
} else if (i.id == "st-astro-guide") {
i.addEventListener("click", function() {
$("#startube-settings-content > div").setAttribute("state","guide");
$(".astro-sidebar-item.active").classList.remove("active");
$("#st-astro-guide").classList.add("active");
});
} else if (i.id == "st-astro-player") {
i.addEventListener("click", function() {
$("#startube-settings-content > div").setAttribute("state","player");
$(".astro-sidebar-item.active").classList.remove("active");
$("#st-astro-player").classList.add("active");
});
} else if (i.id == "st-astro-watch") {
i.addEventListener("click", function() {
$("#startube-settings-content > div").setAttribute("state","watch");
$(".astro-sidebar-item.active").classList.remove("active");
$("#st-astro-watch").classList.add("active");
});
} else if (i.id == "st-astro-advanced") {
i.addEventListener("click", function() {
$("#startube-settings-content > div").setAttribute("state","advanced");
$(".astro-sidebar-item.active").classList.remove("active");
$("#st-astro-advanced").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(itemRoot => {
if (itemRoot) {
resultCount++;
itemRoot.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(itemRoot => {
if (itemRoot) {
var item = itemRoot.getAttribute("id");
item = item.toUpperCase();
value = value.toUpperCase();
if (item.includes(value)) {
resultCount++;
itemRoot.setAttribute("hide","false");
} else {
itemRoot.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(itemRoot => {
if (itemRoot) {
itemRoot.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(itemRoot => {
if (itemRoot) {
var item = itemRoot.getAttribute("id");
var itemV = STS[item];
if (itemV == true) {
itemRoot.setAttribute("value","true");
} else {
itemRoot.setAttribute("value","false");
}
if (STS.ironSettings[item] != null) {
itemRoot.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();
};
}
let list = document.querySelectorAll(".lb-setting");
list.forEach(item => {
/*
item.addEventListener("contextmenu", (e) => {
e.preventDefault();
item.classList.add("startube-iron-setting");
});*/
item.addEventListener("contextmenu",function() {
let id = this.id;
let value = this.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;
this.classList.add("startube-iron-setting");
applySettings();
} else {
delete STS.ironSettings[id];
this.classList.remove("startube-iron-setting");
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 == "presetRegularPlayer") {
STS.expModernPlayer = false;
STS.expModernPlayerV2 = false;
window.location.reload();
}
if (theSetting == "presetModernPlayer") {
STS.expModernPlayer = true;
STS.expModernPlayerV2 = false;
window.location.reload();
}
if (theSetting == "presetModernPlayerV2") {
STS.expModernPlayer = false;
STS.expModernPlayerV2 = true;
window.location.reload();
}
if (theSetting == "RTD") {
localStorage.removeItem("ST_BLEEDING_EDGE_SETTINGS");
localStorage.removeItem("starTubeConfigCreated");
window.location.reload();
} else if (a !== "a") {
if (checked == "true") {
STS[theSetting] = false;
//localStorage.setItem(theSetting,"false");
thisElm.setAttribute("value","false");
if (STS.ironSettings[theSetting]) {
STS.ironSettings[theSetting] = false;
}
applySettings();
} else {
STS[theSetting] = true;
//localStorage.setItem(theSetting,"true");
thisElm.setAttribute("value","true");
if (STS.ironSettings[theSetting]) {
STS.ironSettings[theSetting] = true;
}
applySettings();
}
}
function disableOtherPresets(preset) {
STS.presetAozora2011 = false;
STS.presetCosmicPanda = false;
STS.presetEpicPanda = false;
STS.presetHitchhiker2013_1 = false;
STS.presetHitchhiker2013_1Alt = false;
STS.presetHitchhiker2013_2 = false;
STS.presetHitchhiker2013_2Alt = false;
STS.presetHitchhiker2013_3 = false;
STS.presetHitchhiker2013_3Alt = false;
STS.presetHitchhiker2014 = false;
STS.presetHitchhiker2014Alt = false;
STS.presetHitchhiker2015 = false;
STS.presetHitchhiker2015Alt = false;
STS.presetHitchhiker2016 = false;
STS.presetHitchhiker2016Alt = false;
STS.presetHitchhiker2017 = false;
STS.presetHitchhiker2017Alt = false;
STS.presetHitchhiker2017Ultra = false;
STS.presetHitchhiker2018 = false;
STS.presetPolymer2016 = false;
STS.presetPolymer2019 = false;
STS.presetPolymer2020 = false;
STS.presetPolymer2021 = false;
STS.presetPolymer2022 = false;
STS.presetHitchhiker2015_Early = false;
STS.presetHitchhiker2017_Early = false;
STS[preset] = true;
}
if (theSetting == "STPresetsAlsoSetV3Settings") {
STPresetsAlsoSetV3Settings == checked;
window.location.reload();
}
if (theSetting == "presetWatch9") {
STS.expRelatedTabs = true;
STS.expRelatedTabsHoldsSubscribe = true;
STS.expWatch9 = true;
STS.expWatch9NoOwner = true;
STS.expWatch9TrueExpander = false;
STS.expVerticalWatch9 = false;
STS.expWatch9SidebarBus = false;
STS.expWatch9StickyColumns = false;
STS.expWatch9ReportTab = true;
STS.expRelatedGrid = false;
STS.expWatch8 = false;
STS.expWatch8NoMore = false;
STS.expMoveCountsToButtons = false;
STS.expSharrow = false;
STS.expWatch9A = false;
STS.expWatch9B = false;
STS.expWatch10Beta = false;
STS.expWMRButtonsLowercase = false;
}
if (theSetting == "presetWatch9ThreeColumns") {
STS.expRelatedTabs = false;
STS.expRelatedTabsHoldsSubscribe = false;
STS.expWatch9 = true;
STS.expWatch9NoOwner = false;
STS.expWatch9TrueExpander = false;
STS.expVerticalWatch9 = false;
STS.expWatch9SidebarBus = false;
STS.expWatch9StickyColumns = false;
STS.expWatch9ReportTab = true;
STS.expRelatedGrid = false;
STS.expWatch8 = false;
STS.expWatch8NoMore = false;
STS.expMoveCountsToButtons = false;
STS.expSharrow = false;
STS.expWatch9A = false;
STS.expWatch9B = false;
STS.expWatch10Beta = false;
STS.expWMRButtonsLowercase = false;
}
if (theSetting == "presetWatch9Fancy") {
STS.expRelatedTabs = true;
STS.expRelatedTabsHoldsSubscribe = true;
STS.expWatch9 = true;
STS.expWatch9NoOwner = true;
STS.expWatch9TrueExpander = false;
STS.expVerticalWatch9 = true;
STS.expWatch9SidebarBus = true;
STS.expWatch9StickyColumns = true;
STS.expWatch9ReportTab = true;
STS.expRelatedGrid = false;
STS.expWatch8 = false;
STS.expWatch8NoMore = false;
STS.expMoveCountsToButtons = false;
STS.expSharrow = false;
STS.expWatch9A = false;
STS.expWatch9B = false;
STS.expWatch10Beta = false;
STS.expWMRButtonsLowercase = false;
}
if (theSetting == "disableEverything") {
localStorage.setItem(theSetting,"true");
var settingArray = document.querySelectorAll('[state-id="all"] .lb-setting[checked="true"]');
settingArray.forEach(item => {
if (!item.classList.contains('startube-iron-setting')) {
item.click();
}
});
window.location.reload();
}
function presetSelected(theSetting) {
disableOtherPresets(theSetting);
doIronSettings();
applySettings();
window.location.reload();
}
if (
theSetting == "presetAozora2011"
) {
STCosmicPandaSettings();
STAozoraSettings();
presetSelected(theSetting);
}
if (
theSetting == "presetCosmicPanda"
) {
STCosmicPandaSettings();
presetSelected(theSetting);
}
if (
theSetting == "presetEpicPanda"
) {
STEpicPandaSettings();
presetSelected(theSetting);
}
if (
theSetting == "presetHitchhiker2013_1"
) {
STModernHitchhikerSettings();
ST2014Settings();
ST2013Settings();
STMid2013Settings();
STEarly2013Settings();
STWatch7();
presetSelected(theSetting);
}
if (
theSetting == "presetHitchhiker2013_1Alt"
) {
STModernHitchhikerSettings();
ST2014Settings();
ST2013Settings();
STMid2013Settings();
STEarly2013Settings();
STAltWatch9();
presetSelected(theSetting);
}
if (
theSetting == "presetHitchhiker2013_2"
) {
STModernHitchhikerSettings();
ST2014Settings();
ST2013Settings();
STMid2013Settings();
STWatch7();
presetSelected(theSetting);
}
if (
theSetting == "presetHitchhiker2013_2Alt"
) {
STModernHitchhikerSettings();
ST2014Settings();
ST2013Settings();
STMid2013Settings();
STAltWatch9();
presetSelected(theSetting);
}
if (
theSetting == "presetHitchhiker2013_3"
) {
STModernHitchhikerSettings();
ST2014Settings();
ST2013Settings();
STWatch7();
presetSelected(theSetting);
}
if (
theSetting == "presetHitchhiker2013_3Alt"
) {
STModernHitchhikerSettings();
ST2014Settings();
ST2013Settings();
STAltWatch9();
presetSelected(theSetting);
}
if (
theSetting == "presetHitchhiker2014"
) {
STModernHitchhikerSettings();
ST2014Settings();
STWatch7();
presetSelected(theSetting);
}
if (
theSetting == "presetHitchhiker2014Alt"
) {
STModernHitchhikerSettings();
ST2014Settings();
STAltWatch9();
presetSelected(theSetting);
}
if (
theSetting == "presetHitchhiker2015"
) {
STModernHitchhikerSettings();
presetSelected(theSetting);
}
if (
theSetting == "presetHitchhiker2015Alt"
) {
STModernHitchhikerSettings();
STAltWatch9();
presetSelected(theSetting);
}
if (
theSetting == "presetHitchhiker2015_Early"
) {
STModernHitchhikerSettings();
STEarly2015Settings();
presetSelected(theSetting);
}
if (
theSetting == "presetHitchhiker2016"
) {
STModernHitchhikerSettings();
ST2016Settings();
presetSelected(theSetting);
}
if (
theSetting == "presetHitchhiker2016Alt"
) {
STModernHitchhikerSettings();
ST2016Settings();
STAltWatch9();
presetSelected(theSetting);
}
if (
theSetting == "presetHitchhiker2016_Mid"
) {
STModernHitchhikerSettings();
ST2016Settings();
STMid2016Settings();
presetSelected(theSetting);
}
if (
theSetting == "presetHitchhiker2016_Early"
) {
STModernHitchhikerSettings();
STEarly2016Settings();
presetSelected(theSetting);
}
if (
theSetting == "presetHitchhiker2017_Early"
) {
STModernHitchhikerSettings();
ST2016Settings();
STEarly2017Settings();
presetSelected(theSetting);
}
if (
theSetting == "presetHitchhiker2017"
) {
STModernHitchhikerSettings();
ST2016Settings();
ST2017Settings();
presetSelected(theSetting);
}
if (
theSetting == "presetHitchhiker2017Alt"
) {
STModernHitchhikerSettings();
ST2016Settings();
ST2017Settings();
STAltWatch9();
presetSelected(theSetting);
}
if (
theSetting == "presetHitchhiker2017Ultra"
) {
STModernHitchhikerSettings();
ST2016Settings();
ST2017Settings();
STAltWatch9();
STIdealLayout();
presetSelected(theSetting);
}
if (
theSetting == "presetHitchhiker2018"
) {
STModernHitchhikerSettings();
ST2016Settings();
ST2017Settings();
ST2018Settings();
presetSelected(theSetting);
}
if (
theSetting == "presetPolymer2016"
) {
ST2018PolySettings();
ST2016PolySettings();
presetSelected(theSetting);
}
if (
theSetting == "presetPolymer2019"
) {
ST2018PolySettings();
presetSelected(theSetting);
}
if (
theSetting == "presetPolymer2020"
) {
ST2018PolySettings();
ST2020Settings();
presetSelected(theSetting);
}
if (
theSetting == "presetPolymer2021"
) {
ST2018PolySettings();
ST2020Settings();
ST2021Settings();
presetSelected(theSetting);
}
if (
theSetting == "presetPolymer2022"
) {
ST2018PolySettings();
ST2020Settings();
ST2021Settings();
ST2022Settings();
presetSelected(theSetting);
}
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(".layoutMode").forEach(i => {
let value = i.getAttribute("value");
if (value == STS.radioSettings.layoutMode) {
i.setAttribute("checked","true");
$(".astro-settings").setAttribute("layout-mode", value);
}
i.addEventListener("click",function() {
$(".layoutMode[checked]").removeAttribute("checked");
$(".astro-settings").setAttribute("layout-mode", value);
value == i.getAttribute("value");
i.setAttribute("checked","true");
STS.radioSettings.layoutMode = value;
executeRadios("layoutMode",value);
applySettings();
});
});
document.querySelectorAll(".layoutSelect").forEach(i => {
let value = i.getAttribute("value");
if (value == STS.radioSettings.layoutSelect) {
i.setAttribute("checked","true");
}
i.addEventListener("click",function() {
$(".layoutSelect[checked]").removeAttribute("checked");
value == i.getAttribute("value");
i.setAttribute("checked","true");
STS.radioSettings.layoutSelect = value;
executeRadios("layoutSelect",value);
let value2 = SRS.playerSizerules;
executeRadios("playerSizerules",value2);
applySettings();
});
});
document.querySelectorAll(".gbarVersion").forEach(i => {
let value = i.getAttribute("value");
if (value == STS.radioSettings.gbarVersion) {
i.setAttribute("checked","true");
}
i.addEventListener("click",function() {
$(".gbarVersion[checked]").removeAttribute("checked");
value == i.getAttribute("value");
i.setAttribute("checked","true");
STS.radioSettings.gbarVersion = value;
executeRadios("gbarVersion",value);
applySettings();
});
});
document.querySelectorAll(".playerVersion").forEach(i => {
let value = i.getAttribute("value");
if (value == STS.radioSettings.playerVersion) {
i.setAttribute("checked","true");
}
i.addEventListener("click",function() {
$(".playerVersion[checked]").removeAttribute("checked");
value == i.getAttribute("value");
i.setAttribute("checked","true");
STS.radioSettings.playerVersion = value;
executeRadios("playerVersion",value);
applySettings();
});
});
document.querySelectorAll(".playerSizerules").forEach(i => {
let value = i.getAttribute("value");
if (value == STS.radioSettings.playerSizerules) {
i.setAttribute("checked","true");
}
i.addEventListener("click",function() {
$(".playerSizerules[checked]").removeAttribute("checked");
value == i.getAttribute("value");
i.setAttribute("checked","true");
STS.radioSettings.playerSizerules = value;
executeRadios("playerSizerules",value);
applySettings();
});
});
document.querySelectorAll(".guideNavToFeed").forEach(i => {
let value = i.getAttribute("value");
if (value == STS.radioSettings.guideNavToFeed) {
i.setAttribute("checked","true");
}
i.addEventListener("click",function() {
$(".guideNavToFeed[checked]").removeAttribute("checked");
value == i.getAttribute("value");
i.setAttribute("checked","true");
STS.radioSettings.guideNavToFeed = value;
executeRadios("guideNavToFeed",value);
applySettings();
});
});
document.querySelectorAll(".watchLayout").forEach(i => {
let value = i.getAttribute("value");
if (value == STS.radioSettings.watchLayout) {
i.setAttribute("checked","true");
}
i.addEventListener("click",function() {
$(".watchLayout[checked]").removeAttribute("checked");
value == i.getAttribute("value");
i.setAttribute("checked","true");
STS.radioSettings.watchLayout = value;
executeRadios("watchLayout",value);
applySettings();
});
});
document.querySelectorAll(".relatedTabs").forEach(i => {
let value = i.getAttribute("value");
if (value == STS.radioSettings.relatedTabs) {
i.setAttribute("checked","true");
}
i.addEventListener("click",function() {
$(".relatedTabs[checked]").removeAttribute("checked");
value == i.getAttribute("value");
i.setAttribute("checked","true");
STS.radioSettings.relatedTabs = value;
executeRadios("relatedTabs",value);
applySettings();
});
});
document.querySelectorAll(".relatedGrid").forEach(i => {
let value = i.getAttribute("value");
if (value == STS.radioSettings.relatedGrid) {
i.setAttribute("checked","true");
}
i.addEventListener("click",function() {
$(".relatedGrid[checked]").removeAttribute("checked");
value == i.getAttribute("value");
i.setAttribute("checked","true");
STS.radioSettings.relatedGrid = value;
executeRadios("relatedGrid",value);
applySettings();
});
});
document.querySelectorAll(".relatedSize").forEach(i => {
let value = i.getAttribute("value");
if (value == STS.radioSettings.relatedSize) {
i.setAttribute("checked","true");
}
i.addEventListener("click",function() {
$(".relatedSize[checked]").removeAttribute("checked");
value == i.getAttribute("value");
i.setAttribute("checked","true");
STS.radioSettings.relatedSize = value;
executeRadios("relatedSize",value);
applySettings();
});
});
document.querySelectorAll(".compactDate").forEach(i => {
let value = i.getAttribute("value");
if (value == STS.radioSettings.compactDate) {
i.setAttribute("checked","true");
}
i.addEventListener("click",function() {
$(".compactDate[checked]").removeAttribute("checked");
value == i.getAttribute("value");
i.setAttribute("checked","true");
STS.radioSettings.compactDate = value;
executeRadios("compactDate",value);
applySettings();
});
});
}
function createWatch8(number) {
if (document.querySelector(".cardified-page.exp-individual-cards-watch") == null) {
number++;
}
let container = document.querySelector('#watch7-content.watch-content .yt-uix-button-panel');
var altWatch9 = document.createElement("div");
altWatch9.id = "watch8-container";
altWatch9.setAttribute("state","none");
altWatch9.innerHTML = `
Add to
Share
Statistics
Transcript
Report
More
Statistics
Transcript
Channel videos
`;
container.insertBefore(altWatch9, container.children[number]);
if (document.querySelector(".cardified-page") != null) {
document.querySelector("#watch8-desc").setAttribute("class","yt-card yt-card-no-padding");
document.querySelector("#watch8-share").setAttribute("class","yt-card yt-card-no-padding");
document.querySelector("#watch8-stats").setAttribute("class","yt-card yt-card-no-padding");
document.querySelector("#watch8-transcript").setAttribute("class","yt-card yt-card-no-padding");
document.querySelector("#watch8-actions-row").setAttribute("class","yt-card yt-card-no-padding");
}
var elm = "#watch8-container";
waitForElement(elm).then(function(elm) {
if (canGo != false) {
if (document.querySelector("#watch8-sentiment-actions #watch7-sentiment-actions") == null) {
var elm = "#eow-description";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector("#watch7-sentiment-actions");
var newHome5 = document.querySelector('#watch8-sentiment-actions');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
if (document.querySelector("#watch8-desc #action-panel-details") == null) {
var elm = "#eow-description";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector("#action-panel-details");
var newHome5 = document.querySelector('#watch8-desc');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
if (document.querySelector("#watch9-share #action-panel-share") == null) {
document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(2)").click();
}
if (document.querySelector("#watch8-desc #action-panel-share") == null) {
var elm = "#eow-description";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector("#action-panel-share");
var newHome5 = document.querySelector('#watch8-share');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
if (document.querySelector("#watch7-secondary-actions .hid.yt-uix-button:nth-child(4)") == null) {
if (document.querySelector("#watch9-share #action-panel-transcript") == null) {
document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(4)").click();
}
if (document.querySelector("#watch8-desc #action-panel-transcript") == null) {
var elm = ".watch-transcript";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector("#action-panel-transcript");
var newHome5 = document.querySelector('#watch8-transcript');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
}
if (document.querySelector("#watch9-share #action-panel-stats") == null) {
document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(5)").click();
}
if (document.querySelector("#watch8-desc #action-panel-stats") == null) {
var elm = ".metric-label";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector("#action-panel-stats");
var newHome5 = document.querySelector('#watch8-stats');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
if (document.querySelector("#watch9-addto #action-panel-addto") == null) {
document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(3)").click();
}
if (document.querySelector("#watch8-addto #action-panel-addto") == null) {
var elm = ".playlist-items";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector("#action-panel-addto");
var newHome5 = document.querySelector('#watch8-addto');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
var nonfloater = document.querySelector("#nonfloater");
var addTo = document.querySelector("#addto.watch8-action");
var share = document.querySelector("#share.watch8-action");
var stats = document.querySelector("#stats.watch8-menuitem");
var stats2 = document.querySelector("#stats.watch8-button");
var transcript = document.querySelector("#transcript.watch8-menuitem");
var transcript2 = document.querySelector("#transcript.watch8-button");
var moreActions = document.querySelector("#more-actions.watch8-action");
var showScroller = document.querySelector("#channel-videos.watch8-action");
var close = document.querySelector("#watch8-close button");
if (document.querySelector("#watch7-secondary-actions .hid.yt-uix-button:nth-child(4)") != null) {
document.querySelector("#transcript.watch8-button").classList.add("hid");
document.querySelector("#transcript.watch8-menuitem").setAttribute("visible","false");
}
nonfloater.addEventListener("click", function() {
document.querySelector("#watch8-addto").setAttribute("visible", "false");
document.querySelector("#watch8-more").setAttribute("visible", "false");
document.querySelector("#nonfloater").setAttribute("visible", "false");
document.querySelector("#watch8-container").setAttribute("addto-visible", "false");
document.querySelector("#watch8-container").setAttribute("more-visible", "false");
});
addTo.addEventListener("click", function() {
if (document.querySelector("#watch8-addto[visible='false']") != null) {
document.querySelector("#watch8-addto").setAttribute("visible", "true");
document.querySelector("#nonfloater").setAttribute("visible", "true");
document.querySelector("#watch8-container").setAttribute("addto-visible", "true");
} else {
document.querySelector("#watch8-addto").setAttribute("visible", "false");
document.querySelector("#nonfloater").setAttribute("visible", "false");
document.querySelector("#watch8-container").setAttribute("addto-visible", "false");
}
});
share.addEventListener("click", function() {
if (document.querySelector("#watch8-container[state='share']") != null) {
document.querySelector("#watch8-container").setAttribute("state", "none");
} else {
document.querySelector("#watch8-container").setAttribute("state", "share");
}
});
moreActions.addEventListener("click", function() {
if (document.querySelector("#watch8-more[visible='false']") != null) {
document.querySelector("#watch8-more").setAttribute("visible", "true");
document.querySelector("#nonfloater").setAttribute("visible", "true");
document.querySelector("#watch8-container").setAttribute("more-visible", "true");
} else {
document.querySelector("#watch8-more").setAttribute("visible", "false");
document.querySelector("#nonfloater").setAttribute("visible", "false");
document.querySelector("#watch8-container").setAttribute("more-visible", "false");
}
});
stats.addEventListener("click", function() {
document.querySelector("#watch8-more").setAttribute("visible", "false");
document.querySelector("#nonfloater").setAttribute("visible", "false");
document.querySelector("#watch8-container").setAttribute("more-visible", "false");
if (document.querySelector("#watch8-container[state='stats']") != null) {
document.querySelector("#watch8-container").setAttribute("state", "none");
} else {
document.querySelector("#watch8-container").setAttribute("state", "stats");
}
});
stats2.addEventListener("click", function() {
if (document.querySelector("#watch8-container[state='stats']") != null) {
document.querySelector("#watch8-container").setAttribute("state", "none");
} else {
document.querySelector("#watch8-container").setAttribute("state", "stats");
}
});
transcript.addEventListener("click", function() {
document.querySelector("#watch8-more").setAttribute("visible", "false");
document.querySelector("#nonfloater").setAttribute("visible", "false");
document.querySelector("#watch8-container").setAttribute("more-visible", "false");
if (document.querySelector("#watch8-container[state='transcript']") != null) {
document.querySelector("#watch8-container").setAttribute("state", "none");
} else {
document.querySelector("#watch8-container").setAttribute("state", "transcript");
}
});
transcript2.addEventListener("click", function() {
if (document.querySelector("#watch8-container[state='transcript']") != null) {
document.querySelector("#watch8-container").setAttribute("state", "none");
} else {
document.querySelector("#watch8-container").setAttribute("state", "transcript");
}
});
close.addEventListener("click", function() {
document.querySelector("#watch8-container").setAttribute("state", "none");
});
var elm = "#watch-uploader-info";
waitForElement(elm).then(function(elm) {
if (canGo != false) {
// applyMetadata();
}
});
function applyMetadata() {
}
}
});
}
function createPopups() {
if ($("#wmr-popups")) {
$("#wmr-popups").remove();
}
let container = $(".spitfire-body-container");
var newElem = document.createElement("div");
newElem.id = "wmr-popups";
newElem.innerHTML = `
`;
container.insertBefore(newElem, container.children[1]);
document.querySelector("html").setAttribute("addto-visible", "false");
document.querySelector("html").setAttribute("share-visible", "false");
document.querySelector("html").setAttribute("more-visible", "false");
document.querySelector("html").setAttribute("popup-visible", "false");
if (document.querySelector("#wmr-popups #action-panel-addto") == null) {
document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(3)").click();
}
if (document.querySelector("#wmr-popups #action-panel-addto") == null) {
var elm = ".playlist-items";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector("#action-panel-addto");
var newHome5 = document.querySelector('#wmr-addto-popup div');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
if (document.querySelector("#wmr-popups #action-panel-share") == null) {
document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(2)").click();
}
if (document.querySelector("#wmr-popups #action-panel-share") == null) {
var elm = "#eow-description";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector("#action-panel-share");
var newHome5 = document.querySelector('#wmr-share-popup div');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
var nonfloater = document.querySelector("#wmr-fence");
var addTo = document.querySelector("[js-addto]");
var share = document.querySelector("[js-share]");
/*var stats = document.querySelector("#stats.watch8-menuitem");
var stats2 = document.querySelector("#stats.watch8-button");
var transcript = document.querySelector("#transcript.watch8-menuitem");
var transcript2 = document.querySelector("#transcript.watch8-button");
var moreActions = document.querySelector("#more-actions.watch8-action");
var showScroller = document.querySelector("#channel-videos.watch8-action");
var close = document.querySelector("#watch8-close button");
if (document.querySelector("#watch7-secondary-actions .hid.yt-uix-button:nth-child(4)") != null) {
document.querySelector("#transcript.watch8-button").classList.add("hid");
document.querySelector("#transcript.watch8-menuitem").setAttribute("visible","false");
}*/
nonfloater.addEventListener("click", function() {
document.querySelector("#wmr-addto-popup").setAttribute("visible", "false");
document.querySelector("#wmr-share-popup").setAttribute("visible", "false");
document.querySelector("#wmr-fence").setAttribute("visible", "false");
document.querySelector("html").setAttribute("addto-visible", "false");
document.querySelector("html").setAttribute("share-visible", "false");
document.querySelector("html").setAttribute("more-visible", "false");
document.querySelector("html").setAttribute("popup-visible", "false");
});
addTo.addEventListener("click", function() {
if (document.querySelector("#wmr-addto-popup[visible='false']") != null) {
document.querySelector("#wmr-addto-popup").setAttribute("visible", "true");
document.querySelector("#wmr-fence").setAttribute("visible", "true");
document.querySelector("html").setAttribute("addto-visible", "true");
document.querySelector("html").setAttribute("popup-visible", "true");
} else {
document.querySelector("#wmr-addto-popup").setAttribute("visible", "false");
document.querySelector("#wmr-fence").setAttribute("visible", "false");
document.querySelector("html").setAttribute("addto-visible", "false");
document.querySelector("html").setAttribute("popup-visible", "false");
}
});
share.addEventListener("click", function() {
if (document.querySelector("#wmr-share-popup[visible='false']") != null) {
document.querySelector("#wmr-share-popup").setAttribute("visible", "true");
document.querySelector("#wmr-fence").setAttribute("visible", "true");
document.querySelector("html").setAttribute("share-visible", "true");
document.querySelector("html").setAttribute("popup-visible", "true");
} else {
document.querySelector("#wmr-share-popup").setAttribute("visible", "false");
document.querySelector("#wmr-fence").setAttribute("visible", "false");
document.querySelector("html").setAttribute("share-visible", "false");
document.querySelector("html").setAttribute("popup-visible", "false");
}
});
}
function createRealWatch9(number) {
if (document.querySelector(".cardified-page.exp-individual-cards-watch") == null) {
//number++;
}
let container = document.querySelector('#watch7-content.watch-content .yt-uix-button-panel');
container = $("#watch7-content.watch-content");
var altWatch9 = document.createElement("div");
altWatch9.id = "watch9-container";
altWatch9.innerHTML = `
`;
container.insertBefore(altWatch9, container.children[number]);
$("#wmr-actions-container").innerHTML = STH.WMR_ACTIONS;
createPopups();
var elm = "#watch9-container";
waitForElement(elm).then(function(elm) {
if (canGo != false) {
addIcons();
if (document.querySelector("#watch9-sentiment-actions #watch7-sentiment-actions") == null) {
var elm = "#eow-description";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector("#watch7-sentiment-actions");
var newHome5 = document.querySelector('#watch9-sentiment-actions');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
if (document.querySelector("#watch9-desc #watch-description") == null) {
var elm = "#eow-description";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector("#watch-description");
var newHome5 = document.querySelector('#watch9-desc');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
if (document.querySelector("#watch9-owner #watch7-subscription-container") == null) {
var elm = "#eow-description";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector("#watch7-subscription-container");
var newHome5 = document.querySelector('#watch9-subscribe');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
if (document.querySelector("#watch9-container .video-extras-sparkbars") == null) {
var elm = "#eow-description";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector(".video-extras-sparkbars");
var newHome5 = document.querySelector('#watch7-sentiment-actions');
newHome5.insertBefore(thePanel, newHome5.children[1]);
}
});
}
if (document.querySelector("#watch9-container .watch-view-count") == null) {
var elm = "#eow-description";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector(".watch-view-count");
var newHome5 = document.querySelector('#watch9-view-count');
newHome5.insertBefore(thePanel, newHome5.children[1]);
}
});
}
if (document.querySelector("#watch9-container .watch-title") == null) {
var elm = "#eow-description";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector(".watch-title");
var newHome5 = document.querySelector('#watch9-title');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
if (document.querySelector("#watch9-container .yt-user-photo") == null) {
var elm = "#eow-description";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector(".yt-user-photo");
var newHome5 = document.querySelector('#watch9-pfp');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
if (document.querySelector("#watch9-container .yt-user-name") == null) {
var elm = "#eow-description";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector("#watch7-user-header");
var newHome5 = document.querySelector('#watch9-channel-name');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
if (document.querySelector("#watch9-container #watch9-subtitle #watch-uploader-info") == null) {
var elm = "#eow-description";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
var thePanel = document.querySelector("#watch-uploader-info");
var newHome5 = document.querySelector('#watch9-publish-date');
newHome5.insertBefore(thePanel, newHome5.children[0]);
}
});
}
var elm = "#watch-uploader-info";
waitForElement(elm).then(function(elm) {
if (canGo != false) {
applyMetadata();
}
});
function applyMetadata() {
if (document.querySelector(".yt-subscription-button-subscriber-count-branded-horizontal") != null) {
var subCount = document.querySelector(".yt-subscription-button-subscriber-count-branded-horizontal").textContent;
document.querySelector("#watch9-sub-count").textContent = subCount + " subscribers";
}
if (document.querySelector("#watch-uploader-info") != null) {
var date = document.querySelector("#watch-uploader-info").textContent;
date = date.split("on ")[1];
document.querySelector("#watch9-upload-date span").textContent = date;
}
}
}
});
}
function createWatch10(number) {
if (document.querySelector(".cardified-page.exp-individual-cards-watch") == null) {
//number++;
}
let container = document.querySelector('#watch7-content.watch-content .yt-uix-button-panel');
container = $("#watch7-content.watch-content");
var altWatch9 = document.createElement("div");
altWatch9.id = "watch10-container";
altWatch9.innerHTML = `