// ==UserScript==
// @name StarTube
// @namespace http://tampermonkey.net/
// @version 2.1.0
// @description Adds a bunch of customization options to V3
// @author lightbeam24
// @match *://*.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// @license MIT
// @downloadURL none
// ==/UserScript==
(function() {
'use strict';
let currStarVer = "2.1.0";
let starTubeConfigCreated = localStorage.getItem("starTubeConfigCreated");
if (starTubeConfigCreated == null) {
starTubeConfigCreated = currStarVer;
}
var $ = a => document.querySelector(a);
var STH = {
WMR_ACTIONS: `
Share
Save
`
};
let forceC4 = false;
let globalDataPoints = {
dummy: ""
};
window.globalDataPoints = globalDataPoints;
let bannerNo = getRndInteger(1,4);
let closedEFYTBanner = false;
let closedWelcomeBanner = false;
let gdp = globalDataPoints;
var V3_SETTINGS = localStorage.getItem("v3_local_db");
V3_SETTINGS = JSON.parse(V3_SETTINGS);
var V3_SETTINGS_CONF = V3_SETTINGS.config.db.yt;
var STS = localStorage.getItem("ST_SETTINGS");
var defaultConfigs = {
"expAdaptiveLayout": false,
"expAdaptiveLayout2017Cap": false,
"polymerWarningBanner": true,
"showWelcomeBanner": false,
"expRelatedThumbsSizeMedium": true,
"expRelatedThumbsSizeLarge": false,
"expRelatedThumbsSizeStupid": false,
"expAlwaysShowCompactDate": true,
"expMoveGuideMainSectionToTop": false,
"expMoreTooltips": true,
"expMoveGuideButtonToTopbar": false,
"expRelatedTabs": true,
"expRelatedTabsHoldsSubscribe": true,
"expWatch9": true,
"expWatch9NoOwner": true,
"expWatch9TrueExpander": false,
"expVerticalWatch9": false,
"expWatch9SidebarBus": false,
"expWatch9StickyColumns": false,
"expWatch9ReportTab": true,
"expRelatedGrid": false,
"expWatch8": false,
"expWatch8NoMore": false,
"expMoveCountsToButtons": false,
"expSharrow": false,
"expGuideAlwaysPinned": false,
"expWatch7AboutTabRename": false,
"expWatch7AboutTabRename2": false,
"expTwoColumnSearchResults": false,
"configNoTabTopBorder": true,
"configWatch7SidebarCardShadow": true,
"expFlatLogo": false,
"expInvertLogo": false,
"expGlossyLogo": false,
"expClassicTitle": false,
"expClassicGuide": false,
"expClassicSubscribe": false,
"expClassicStyles": false,
"expClassicLtod": false,
"expClassicButtons": false,
"expBigSearchThumbs": false,
"expBiggerSearchThumbs": false,
"expNoVideosLink": false,
"expModernStyles": false,
"expModernNotifIcon": false,
"expModernTopbar": false,
"expModernUpload": false,
"expModernGuideButton": false,
"expModernSearchIcon": false,
"expSearchText": false,
"expModernTitle": false,
"expModernGuide": false,
"expModernHome": false,
"expModernPlaylists": false,
"expModernPlaylistThumbnails": false,
"expPlaylistRedBorder": false,
"expPlaylistTimestamps": true,
"expTrueScrollableGuide": false,
"expModernPlayer": false,
"expModernPlayerV2": false,
"expViewsString": true,
"expGoogleApps": false,
"expCommentsFullWidth": true,
"expNoByText": false,
"expAccountMenu": false,
"expStaticSite": false,
"expHideAppbar": false,
"expEpicWatch7": false,
"expEpicWatch7Flat": false,
"expEpicHeader": false,
"expEpicStyling": false,
"expEpicFeeds": false,
"expCosmicHeader": false,
"expCosmicBG": false,
"expCosmicButtons": false,
"expCosmicStyles": false,
"expCosmicBanners": false,
"expCosmicBannersV2": false,
"expCosmicComments": false,
"expCosmicGuideStyle": false,
"expCosmicGuideLayout": false,
"expCosmicFeedsV1": false,
"expCosmicFeedsThirdColumn": false,
"expWatch5D": false,
"expChannels3": false,
"expChannels3BGVerticalRepeat": false,
"expChannels3BGHorizontalRepeat": false,
"expNoGuide": false,
"expGuideOnFeedsOnly": false,
"expAozoraHome": false,
"expAozoraHeader": false,
"expAozoraBG": false,
"expAozoraStyles": false,
"expAozoraSubscribe": false,
"expAozoraTopbarLinks": false,
"expWatch5C": false,
"expHomeTab": false,
"expRoboto": false,
"expCenteredSearch": false,
"expBigSearch": false,
"expSecondarySearchIcon": false,
"expMaterialSearch": false,
"expPolymerShell": false,
"expEarlyPolymerShell": false,
"expEarlyPolymerGuide": false,
"expPolymerGen2Colors": false,
"expPolymerSubscribe": false,
"expPolymerGen2Subscribe": false,
"expPolymerStyles": false,
"expPolymerChannels": false,
"expPolymerComments": false,
"expPolymerTooltips": false,
"expMaterialSignIn": false,
"expWatch9A": false,
"expWatch9B": false,
"expWatch10Beta": false,
"expWMRButtonsLowercase": false,
"expOutlineIcons": false,
"expRichGridHome": false,
"expRoundedTopbarPfp": false,
"expUploadIcon": false,
"presetAozora2011": false,
"presetEpicPanda": false,
"presetCosmicPanda": false,
"presetHitchhiker2013_1": false,
"presetHitchhiker2013_1Alt": false,
"presetHitchhiker2013_2": false,
"presetHitchhiker2013_2Alt": false,
"presetHitchhiker2013_3": false,
"presetHitchhiker2013_3Alt": false,
"presetHitchhiker2014": false,
"presetHitchhiker2014Alt": false,
"presetHitchhiker2015": false,
"presetHitchhiker2015Alt": false,
"presetHitchhiker2016": false,
"presetHitchhiker2016Alt": false,
"presetHitchhiker2017": false,
"presetHitchhiker2017Alt": false,
"presetHitchhiker2017Ultra": false,
"presetPolymer2016": false,
"presetPolymer2019": false,
"presetPolymer2020": false,
"presetPolymer2021": false,
"presetPolymer2022": false,
"presetHitchhiker2015_Early": false,
"presetHitchhiker2016_Early": false,
"presetHitchhiker2016_Mid": false,
"presetHitchhiker2017_Early": false,
"STPresetsAlsoSetV3Settings": true,
"expHomepageRedirectsToFeed": false,
"expLogoLinksToFeed": false,
"expLogoLinksToSubs": false,
"show2point1": true,
"expHideYoodles": false,
"expFixedShareIcons": true,
"expFixedXIcon": true,
"expMaterialGbar": false,
"ironSettings": {}
};
if (STS == null) {
STS = defaultConfigs;
} else {
try {
STS = JSON.parse(STS);
applyNewSettings();
}
catch(err) {
console.log("It looks like you had a bad config. Your settings have been reset.");
STS = defaultConfigs;
applySettings();
}
}
function applySettings() {
localStorage.setItem("ST_SETTINGS",JSON.stringify(STS));
}
function applyNewSettings() {
if (STS.show2point1 == null) {
STS.show2point1 = true;
}
if (STS.ironSettings == null) {
STS.ironSettings = {};
}
if (STS.showWelcomeBanner == null) {
STS.showWelcomeBanner = false;
}
if (STS.expNoVideosLink == null) {
STS.expNoVideosLink = false;
if (STS.show2point1 == false) {
STS.show2point1 = true;
}
}
if (STS.expModernPlaylists == null) {
STS.expModernPlaylists = false;
if (presetHitchhiker2014 == true || presetHitchhiker2015 == true || presetHitchhiker2016 == true || presetHitchhiker2017 == true) {
STS.expModernPlaylists = true;
}
}
if (STS.expModernPlaylistThumbnails == null) {
STS.expModernPlaylistThumbnails = false;
if (presetHitchhiker2015 == true || presetHitchhiker2016 == true || presetHitchhiker2017 == true) {
STS.eexpModernPlaylistThumbnails = true;
}
}
if (STS.expPlaylistRedBorder == null) {
STS.expPlaylistRedBorder = false;
if (presetHitchhiker2014 == true || presetHitchhiker2015 == true) {
STS.expPlaylistRedBorder = true;
}
}
if (STS.expPlaylistTimestamps == null) {
STS.expPlaylistTimestamps = true;
}
if (STS.expAdaptiveLayout == null) {
STS.expAdaptiveLayout = false;
}
if (STS.expAdaptiveLayout2017Cap == null) {
STS.expAdaptiveLayout2017Cap = false;
}
if (STS.expMateralSignIn == null) {
STS.expMateralSignIn = false;
}
if (STS.expModernNotifIcon == null) {
STS.expModernNotifIcon = false;
if (presetHitchhiker2016 == true || presetHitchhiker2017 == true) {
STS.expModernNotifIcon = true;
}
}
if (STS.expEpicFeeds == null) {
STS.expEpicFeeds = false;
if (STS.presetEpicPanda == true) {
STS.expEpicFeeds = true;
}
}
if (STS.expCosmicBanners == null) {
STS.expCosmicBanners = false;
STS.expCosmicBannersV2 = false;
if (STS.presetCosmicPanda == true) {
STS.expCosmicBanners = true;
STS.expCosmicBannersV2 = true;
applySettings();
}
}
if (STS.expCosmicFeedsThirdColumn == null) {
STS.expCosmicFeedsThirdColumn = false;
if (STS.presetCosmicPanda == true) {
STS.expCosmicFeedsThirdColumn = true;
applySettings();
}
}
if (STS.presetHitchhiker2015_Early == null) {
STS.presetHitchhiker2015_Early = false;
}
if (STS.presetHitchhiker2016_Early == null) {
STS.presetHitchhiker2016_Early = false;
}
if (STS.presetHitchhiker2016_Mid == null) {
STS.presetHitchhiker2016_Mid = false;
}
if (STS.presetHitchhiker2017_Early == null) {
STS.presetHitchhiker2017_Early = false;
}
if (STS.presetHitchhiker2017Ultra == null) {
STS.presetHitchhiker2017Ultra = false;
}
if (STS.expChannels3 == null) {
STS.expChannels3 = false;
STS.expChannels3BGVerticalRepeat = false;
STS.expChannels3BGHorizontalRepeat = false;
if (STS.presetCosmicPanda == true || STS.presetEpicPanda == true || STS.presetHitchhiker2013_1 == true || STS.presetHitchhiker2013_1Alt == true) {
STS.expChannels3 = true;
applySettings();
}
}
}
getIronSettings();
function getIronSettings() {
let irons = Object.entries(STS.ironSettings);
irons.forEach(i => {
let name = i[0];
let value = i[1];
STS[name] = value;
});
}
let arra = Object.entries(STS);
async function checkSetting(settingName) {
let value = STS[settingName];
return value;
}
if (window.location.href == "https://www.youtube.com/" && STS.expHomepageRedirectsToFeed == true) {
window.location = "https://www.youtube.com/feed/what_to_watch/recommended";
}
function getRndInteger(min, max) {
return Math.floor(Math.random() * (max - min)) + min;
}
var canGo = false;
var html = document.querySelector('html');
function timeout(durationMs) {
return new Promise((resolve, reject) => {
setTimeout(function() {
resolve();
}, durationMs);
});
}
async function waitForElement500(elm) {
while (null == document.querySelector(elm)) {
await new Promise(r => requestAnimationFrame(r));
}
await timeout(500).then(function() {
canGo = true;
return document.querySelector(elm);
});
}
async function waitForElement(elm) {
while (null == document.querySelector(elm)) {
await new Promise(r => requestAnimationFrame(r));
}
await timeout(50).then(function() {
canGo = true;
return document.querySelector(elm);
});
}
async function waitForElement10(elm) {
while (null == document.querySelector(elm)) {
await new Promise(r => requestAnimationFrame(r));
}
await timeout(10).then(function() {
canGo = true;
return document.querySelector(elm);
});
}
function grabData() {
if ($("#yt-masthead-user")) {
gdp.lowPfp = $("#yt-masthead-user .yt-thumb-27 img").src;
gdp.pfp = $("#yt-masthead-user .yt-thumb-27 img").src;
gdp.pfp = gdp.pfp.split("=s")[0] + "=s108";
}
if ($("#yt-masthead-signin")) {
gdp.loggedIn = false;
} else {
gdp.loggedIn = true;
}
//console.log(globalDataPoints);
}
function getSapisidhash()
{
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* SHA-1 (FIPS 180-4) implementation in JavaScript (c) Chris Veness 2002-2019 */
/* MIT Licence */
/* www.movable-type.co.uk/scripts/sha1.html */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/**
* SHA-1 hash function reference implementation.
*
* This is an annotated direct implementation of FIPS 180-4, without any optimisations. It is
* intended to aid understanding of the algorithm rather than for production use.
*
* While it could be used where performance is not critical, I would recommend using the ‘Web
* Cryptography API’ (developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest) for the browser,
* or the ‘crypto’ library (nodejs.org/api/crypto.html#crypto_class_hash) in Node.js.
*
* See csrc.nist.gov/groups/ST/toolkit/secure_hashing.html
* csrc.nist.gov/groups/ST/toolkit/examples.html
*/
class Sha1 {
/**
* Generates SHA-1 hash of string.
*
* @param {string} msg - (Unicode) string to be hashed.
* @param {Object} [options]
* @param {string} [options.msgFormat=string] - Message format: 'string' for JavaScript string
* (gets converted to UTF-8 for hashing); 'hex-bytes' for string of hex bytes ('616263' ≡ 'abc') .
* @param {string} [options.outFormat=hex] - Output format: 'hex' for string of contiguous
* hex bytes; 'hex-w' for grouping hex bytes into groups of (4 byte / 8 character) words.
* @returns {string} Hash of msg as hex character string.
*
* @example
* import Sha1 from './sha1.js';
* const hash = Sha1.hash('abc'); // 'a9993e364706816aba3e25717850c26c9cd0d89d'
*/
static hash(msg, options) {
const defaults = { msgFormat: 'string', outFormat: 'hex' };
const opt = Object.assign(defaults, options);
switch (opt.msgFormat) {
default: // default is to convert string to UTF-8, as SHA only deals with byte-streams
case 'string': msg = utf8Encode(msg); break;
case 'hex-bytes':msg = hexBytesToString(msg); break; // mostly for running tests
}
// constants [§4.2.1]
const K = [ 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6 ];
// initial hash value [§5.3.1]
const H = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ];
// PREPROCESSING [§6.1.1]
msg += String.fromCharCode(0x80); // add trailing '1' bit (+ 0's padding) to string [§5.1.1]
// convert string msg into 512-bit/16-integer blocks arrays of ints [§5.2.1]
const l = msg.length/4 + 2; // length (in 32-bit integers) of msg + ‘1’ + appended length
const N = Math.ceil(l/16); // number of 16-integer-blocks required to hold 'l' ints
const M = new Array(N);
for (let i=0; i>> 32, but since JS converts
// bitwise-op args to 32 bits, we need to simulate this by arithmetic operators
M[N-1][14] = ((msg.length-1)*8) / Math.pow(2, 32); M[N-1][14] = Math.floor(M[N-1][14]);
M[N-1][15] = ((msg.length-1)*8) & 0xffffffff;
// HASH COMPUTATION [§6.1.2]
for (let i=0; i>> 0' to emulate UInt32 variables)
for (let t=0; t<80; t++) {
const s = Math.floor(t/20); // seq for blocks of 'f' functions and 'K' constants
const T = (Sha1.ROTL(a, 5) + Sha1.f(s, b, c, d) + e + K[s] + W[t]) >>> 0;
e = d;
d = c;
c = Sha1.ROTL(b, 30) >>> 0;
b = a;
a = T;
}
// 4 - compute the new intermediate hash value (note 'addition modulo 2^32' – JavaScript
// '>>> 0' coerces to unsigned UInt32 which achieves modulo 2^32 addition)
H[0] = (H[0]+a) >>> 0;
H[1] = (H[1]+b) >>> 0;
H[2] = (H[2]+c) >>> 0;
H[3] = (H[3]+d) >>> 0;
H[4] = (H[4]+e) >>> 0;
}
// convert H0..H4 to hex strings (with leading zeros)
for (let h=0; h prev + String.fromCharCode(curr), '');
} catch (e) { // no TextEncoder available?
return unescape(encodeURIComponent(str)); // monsur.hossa.in/2012/07/20/utf-8-in-javascript.html
}
}
function hexBytesToString(hexStr) { // convert string of hex numbers to a string of chars (eg '616263' -> 'abc').
const str = hexStr.replace(' ', ''); // allow space-separated groups
return str=='' ? '' : str.match(/.{2}/g).map(byte => String.fromCharCode(parseInt(byte, 16))).join('');
}
}
/**
* Function 'f' [§4.1.1].
* @private
*/
static f(s, x, y, z) {
switch (s) {
case 0: return (x & y) ^ (~x & z); // Ch()
case 1: return x ^ y ^ z; // Parity()
case 2: return (x & y) ^ (x & z) ^ (y & z); // Maj()
case 3: return x ^ y ^ z; // Parity()
}
}
/**
* Rotates left (circular left shift) value x by n positions [§3.2.5].
* @private
*/
static ROTL(x, n) {
return (x<>>(32-n));
}
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
function gethash()
{
function getCookie(cname)
{
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i '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.
`;
}
if (gdp.currChan.sidebar.country != null) {
$("#c3-location").classList.remove("hid");
}
}
function reconstructPlaylist() {
if (STS.expModernPlaylists == true) {
if ($("#watch7-playlist-data") && $(".watch7-playlist-bar-right .watch7-playlist-bar-left") == null) {
var move = document.querySelector(".watch7-playlist-bar-left");
var newHome = document.querySelector('.watch7-playlist-bar-right');
newHome.insertBefore(move, newHome.children[0]);
}
}
if (STS.expPlaylistTimestamps == true) {
if ($(".yt-uix-scroller-scroll-unit:not(.startube-time-patched)") != null) {
document.querySelectorAll(".yt-uix-scroller-scroll-unit:not(.startube-time-patched)").forEach(item => {
let length = item.data.playlistPanelVideoRenderer.lengthText.simpleText;
let container = item.querySelector("a");
if (container.querySelector(".playlist-time") == null) {
let newElem = document.createElement("span");
newElem.classList = "stat time playlist-time";
newElem.innerHTML = `
`;
container.insertBefore(newElem,container.children[4]);
newElem.querySelector("span span").textContent = length;
container.parentNode.classList.add("startube-time-patched");
}
});
}
}
}
function checkPlaylistThumbnails() {
document.querySelectorAll(".yt-pl-thumb:not(.yt-mix-thumb)").forEach(item => {
if (item.textContent.includes("50+")) {
item.classList.add("yt-mix-thumb");
}
});
}
function everyLoad(x) {
checkPlaylistThumbnails();
if ($("#page.watch") && STS.expAdaptiveLayout) {
let date = $("#watch-description-content").data.watchDescription.clip.videoDate.simpleText;
if (
date.includes("2022") ||
date.includes("2023") ||
date.includes("2024")
) {
if (STS.expAdaptiveLayout2017Cap == true) {
if (STS.presetHitchhiker2017 == false) {
changeSetting("presetHitchhiker2017", "a");
}
}
else if (STS.presetPolymer2022 == false) {
changeSetting("presetPolymer2022", "a");
}
}
if (
date.includes("2021")
) {
if (STS.expAdaptiveLayout2017Cap == true) {
if (STS.presetHitchhiker2017 == false) {
changeSetting("presetHitchhiker2017", "a");
}
}
else if (STS.presetPolymer2021 == false) {
changeSetting("presetPolymer2021", "a");
}
}
if (
date.includes("2020")
) {
if (STS.expAdaptiveLayout2017Cap == true) {
if (STS.presetHitchhiker2017 == false) {
changeSetting("presetHitchhiker2017", "a");
}
}
else if (STS.presetPolymer2020 == false) {
changeSetting("presetPolymer2020", "a");
}
}
if (
date.includes("2019")
) {
if (STS.expAdaptiveLayout2017Cap == true) {
if (STS.presetHitchhiker2017 == false) {
changeSetting("presetHitchhiker2017", "a");
}
}
else if (STS.presetPolymer2019 == false) {
changeSetting("presetPolymer2019", "a");
}
}
if (
date.includes("2018")
) {
if (STS.presetHitchhiker2017 == false) {
changeSetting("presetHitchhiker2017", "a");
}
}
if (
date.includes("2017")
) {
if (
date.includes("Jan") ||
date.includes("Feb") ||
date.includes("Mar") ||
date.includes("Apr") ||
date.includes("May") ||
date.includes("Jun") ||
date.includes("Jul") ||
date.includes("Aug")
) {
if (STS.presetHitchhiker2017_Early == false) {
changeSetting("presetHitchhiker2017_Early", "a");
}
} else {
if (STS.presetHitchhiker2017 == false) {
changeSetting("presetHitchhiker2017", "a");
}
}
}
if (
date.includes("2016")
) {
if (
date.includes("Jan") ||
date.includes("Feb") ||
date.includes("Mar") ||
date.includes("Apr")
) {
if (STS.presetHitchhiker2016_Early == false) {
changeSetting("presetHitchhiker2016_Early", "a");
}
} else if (
date.includes("May") ||
date.includes("Jun") ||
date.includes("Jul") ||
date.includes("Aug")
) {
if (STS.presetHitchhiker2016_Mid == false) {
changeSetting("presetHitchhiker2016_Mid", "a");
}
} else {
if (STS.presetHitchhiker2016 == false) {
changeSetting("presetHitchhiker2016", "a");
}
}
}
if (
date.includes("2015")
) {
if (
date.includes("Jan") ||
date.includes("Feb") ||
date.includes("Mar") ||
date.includes("Apr") ||
date.includes("May") ||
date.includes("Jun") ||
date.includes("Jul") ||
date.includes("Aug")
) {
if (STS.presetHitchhiker2015_Early == false) {
changeSetting("presetHitchhiker2015_Early", "a");
}
} else if (
date.includes("Dec")
) {
if (STS.presetHitchhiker2016_Early == false) {
changeSetting("presetHitchhiker2016_Early", "a");
}
} else {
if (STS.presetHitchhiker2015 == false) {
changeSetting("presetHitchhiker2015", "a");
}
}
}
if (
date.includes("2014")
) {
if (
date.includes("Jan") ||
date.includes("Feb")
) {
if (STS.presetHitchhiker2013_3 == false) {
changeSetting("presetHitchhiker2013_3", "a");
}
} else if (
date.includes("Sep") ||
date.includes("Oct") ||
date.includes("Nov") ||
date.includes("Dec")
) {
if (STS.presetHitchhiker2015_Early == false) {
changeSetting("presetHitchhiker2015_Early", "a");
}
} else {
if (STS.presetHitchhiker2014 == false) {
changeSetting("presetHitchhiker2014", "a");
}
}
}
if (
date.includes("2013")
) {
if (
date.includes("Jan") ||
date.includes("Feb") ||
date.includes("Mar") ||
date.includes("Apr") ||
date.includes("May") ||
date.includes("Jun")
) {
if (STS.presetHitchhiker2013_1 == false) {
changeSetting("presetHitchhiker2013_1", "a");
}
} else if (
date.includes("Jul") ||
date.includes("Aug") ||
date.includes("Sep") ||
date.includes("Oct")
) {
if (STS.presetHitchhiker2013_2 == false) {
changeSetting("presetHitchhiker2013_2", "a");
}
} else {
if (STS.presetHitchhiker2013_3 == false) {
changeSetting("presetHitchhiker2013_3", "a");
}
}
}
if (
date.includes("2012")
) {
if (
date.includes("Dec")
) {
if (STS.presetHitchhiker2013_1 == false) {
changeSetting("presetHitchhiker2013_1", "a");
}
} else {
if (STS.presetCosmicPanda == false) {
changeSetting("presetCosmicPanda", "a");
}
}
}
if (
date.includes("2005") ||
date.includes("2006") ||
date.includes("2007") ||
date.includes("2008") ||
date.includes("2009") ||
date.includes("2010")
) {
if (STS.presetAozora2011 == false) {
changeSetting("presetAozora2011", "a");
}
}
if (
date.includes("2011")
) {
if (
date.includes("Dec")
) {
if (STS.presetCosmicPanda == false) {
changeSetting("presetCosmicPanda", "a");
}
} else {
if (STS.presetAozora2011 == false) {
changeSetting("presetAozora2011", "a");
}
}
}
}
if ($("#efyt-background") && ($("#st-efyt-alert") == null) && ($("#alerts")) && closedEFYTBanner == false) {
createEFYTAlert();
}
if (($("#st-welcome-alert") == null) && ($("#alerts")) && closedWelcomeBanner == false && STS.showWelcomeBanner == true) {
createWelcomeAlert();
}
if (window.location.href.includes("force-c4") && STS.expChannels3 == true) {
forceC4 = true;
$("html").setAttribute("exp-channels3","");
$("html").removeAttribute("exp-channels3");
} else if (x === "x" && STS.expChannels3 == true && !window.location.href.includes("/post/")) {
forceC4 = false;
$("html").setAttribute("exp-channels3","");
}
grabData();
$("html").setAttribute("startube","");
createMenus();
createSpace();
if ($("#st-menus-container") && x === "x") {
$("#st-menus-container").classList.remove("menu-visible");
}
if ($("[comment-panel-open]") && x === "x") {
$("html").setAttribute("comment-panel-open","false");
}
if ($(".gaiabar")) {
$("html").setAttribute("v3-has-gbar","");
}
if (
x === "x" &&
$("#watch5-above-container")
) {
$("#watch5-above-container").remove();
}
if ($("#page.home")) {
var elm = ".feed-item-container:nth-child(5) img";
if (
x === "x" &&
STS.expAozoraHome == true
) {
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
createThirdColumn();
}
});
}
$("html").setAttribute("location","home");
}
if (window.location.href.includes("feed/UC")) {
$("html").setAttribute("location","feed-inline-channel");
}
if (window.location.href.includes("feed")) {
$("html").setAttribute("location","feed");
/*if (document.querySelector(".epic-panda-header") == null) {
createFeedText(refreshCheck);
}*/
}
if (window.location.href.includes("/playlist") && !window.location.href.includes("/channel")) {
$("html").setAttribute("location","playlist");
if ($("#content")) {
grabPlaylistData(x);
} else {
var elm = "#content";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
grabPlaylistData(x);
}
});
}
}
if (window.location.href.includes("feed/guide")) {
$("html").setAttribute("location","feed-guide-builder");
}
if (window.location.href.includes("/subscriptions")) {
$("html").setAttribute("location","feed-subs");
}
if (window.location.href.includes("recommended_for_you")) {
$("html").setAttribute("location","feed-recs");
}
if (window.location.href.includes("/what_to_watch/recommended")) {
$("html").setAttribute("location","feed-recs");
var elm = "#page";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
$("#page").classList = "feed clearfix";
}
});
var elm2 = "#FEwhat_to_watch-guide-item";
waitForElement10(elm2).then(function(elm2) {
if (canGo != false) {
if ($("#FEwhat_to_watch-guide-item a.guide-item-selected")) {
$("#FEwhat_to_watch-guide-item a").classList.remove("guide-item-selected");
}
}
});
}
if ($("#page.search")) {
$("html").setAttribute("location","search");
}
if ($("#page.all_comments")) {
$("html").setAttribute("location","comments");
}
if ($("#page.watch")) {
$("html").setAttribute("location","watch");
if (window.location.href.includes("&list")) {
var elm = "#watch7-playlist-data";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
reconstructPlaylist();
}
});
}
}
if ($("#page.channel")) {
$("html").setAttribute("location","channel");
$("html").setAttribute("channel-location","home");
if (window.location.href.includes("/feed")) {
$("html").setAttribute("channel-location","feed");
}
if (window.location.href.includes("/videos")) {
$("html").setAttribute("channel-location","videos");
}
if (window.location.href.includes("/playlists")) {
$("html").setAttribute("channel-location","playlists");
}
if (window.location.href.includes("/community")) {
$("html").setAttribute("channel-location","backstage");
}
if (window.location.href.includes("/about")) {
$("html").setAttribute("channel-location","about");
}
if (window.location.href.includes("/search")) {
$("html").setAttribute("channel-location","search");
}
grabChannelData(x);
if (STS.expPolymerChannels == true) {
if ($(".channel-header-profile-image-container")) {
var theBtn = document.querySelector(".channel-header-profile-image-container");
var newHome = document.querySelector('#c4-primary-header-contents');
newHome.insertBefore(theBtn, newHome.children[2]);
} else {
var elm = ".channel-header-profile-image-container";
waitForElement10(elm).then(function(elm) {
if (canGo != false && $("#page.channel")) {
var theBtn = document.querySelector(".channel-header-profile-image-container");
var newHome = document.querySelector('#c4-primary-header-contents');
newHome.insertBefore(theBtn, newHome.children[2]);
}
});
}
}
if (STS.expPolymerChannels == true) {
if ($(".yt-subscription-button-subscriber-count-branded-horizontal") && $(".startube-poly-sub-count") == null) {
var theBtn = document.querySelector(".yt-subscription-button-subscriber-count-branded-horizontal");
theBtn.textContent = theBtn.textContent + " subscribers";
var newHome = document.querySelector('.branded-page-header-title');
newHome.insertBefore(theBtn, newHome.children[0]);
theBtn.classList.add("startube-poly-sub-count");
} else {
var elm = ".yt-subscription-button-subscriber-count-branded-horizontal";
waitForElement10(elm).then(function(elm) {
if (canGo != false && $(".startube-poly-sub-count") == null && $("#page.channel")) {
var theBtn = document.querySelector(".yt-subscription-button-subscriber-count-branded-horizontal");
theBtn.textContent = theBtn.textContent + " subscribers";
var newHome = document.querySelector('.branded-page-header-title');
newHome.insertBefore(theBtn, newHome.children[0]);
theBtn.classList.add("startube-poly-sub-count");
}
});
}
}
if (STS.expHomeTab == true) {
setTimeout(function() {
if ($(".startube-tab") == null) {
if ($(".epic-nav-item-empty.selected")) {
$(".epic-nav-item-empty.selected").parentNode.id = "channel-main-tab";
let container = $("#channel-navigation-menu");
let newElem = document.createElement("li");
newElem.setAttribute("class","startube-tab");
newElem.innerHTML = `
Home
`;
container.insertBefore(newElem, container.children[0]);
} else if ($("#channel-navigation-menu .epic-nav-item-empty.selected") == null) {
var elm = "#channel-navigation-menu li:nth-child(1) a";
waitForElement10(elm).then(function(elm) {
if (canGo != false) {
if ($("#channel-navigation-menu .epic-nav-item-empty.selected") == null) {
let navData = $("#channel-navigation-menu li a").data;
let navUrl = $("#channel-navigation-menu li a").getAttribute("href");
let container = $("#channel-navigation-menu");
let newElem = document.createElement("li");
newElem.setAttribute("class","startube-tab");
newElem.innerHTML = `
Home
`;
container.insertBefore(newElem, container.children[0]);
newElem.data = navData;
}
}
});
}
}
}, 250);
}
} else {
if ($("[channel-location]")) {
$("html").removeAttribute("channel-location");
}
}
if ($("#page.search")) {
$("html").setAttribute("location","search");
}
if (STS.expLogoLinksToFeed == true && $("#logo-container")) {
$("#logo-container").href = "/feed/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"
}
}
}
}
}
}
if (STS.expLogoLinksToSubs == true && $("#logo-container")) {
$("#logo-container").href = "/feed/subscriptions";
$("#logo-container").data = {
abstractVorElement: {
navigationEndpoint: {
browseEndpoint: {
browseId: "FEsubscriptions",
canonicalBaseUrl: "/feed/subscriptions"
},
commandMetadata: {
webCommandMetadata: {
url: "/feed/subscriptions"
}
}
}
}
}
}
var arraNum = 0;
arra.forEach(itemRoot => {
let name = itemRoot[0];
checkSetting(name).then(function(value) {
if (value == true && name == "expAdaptiveLayout") {
$("html").setAttribute("exp-adaptive-layout", "");
} 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 == "configNoTabTopBorder") {
$("html").setAttribute("config-no-tab-top-border", "");
} else if (value == true && name == "configWatch7SidebarCardShadow") {
$("html").setAttribute("config-watch7-sidebar-card-shadow", "");
} else if (value == true && name == "expRelatedTabs") {
$("html").setAttribute("exp-related-tabs", "");
createRelatedTabsPrep();
} else if (value == true && name == "expRelatedTabsHoldsSubscribe") {
$("html").setAttribute("exp-related-tabs-holds-subscribe", "");
} else if (value == true && name == "expWatch9") {
$("html").setAttribute("exp-watch9", "");
createWatch9Prep();
} else if (value == true && name == "expWatch9NoOwner") {
$("html").setAttribute("exp-watch9-no-owner", "");
} else if (value == true && name == "expWatch9TrueExpander") {
$("html").setAttribute("exp-watch9-true-expander", "");
} else if (value == true && name == "expVerticalWatch9") {
$("html").setAttribute("exp-vertical-watch9", "");
} else if (value == true && name == "expWatch9SidebarBus") {
$("html").setAttribute("exp-watch9-sidebar-bus", "");
} else if (value == true && name == "expWatch9StickyColumns") {
$("html").setAttribute("exp-watch9-sticky-columns", "");
} else if (value == true && name == "expWatch9ReportTab") {
$("html").setAttribute("exp-watch9-report-tab", "");
} else if (value == true && name == "expGuideAlwaysPinned") {
guideAlwaysPinned();
} else if (value == true && name == "expWatch8") {
$("html").setAttribute("exp-watch8", "");
createWatch8Prep();
} else if (value == true && name == "expWatch8NoMore") {
$("html").setAttribute("exp-watch8-no-more", "");
} else if (value == true && name == "expSharrow") {
$("html").setAttribute("exp-sharrow", "");
} else if (value == true && name == "expAlwaysShowCompactDate") {
$("html").setAttribute("exp-always-show-compact-date", "");
} else if (value == true && name == "expTwoColumnSearchResults") {
$("html").setAttribute("exp-two-column-search-results", "");
} else if (value == true && name == "expRelatedGrid") {
$("html").setAttribute("exp-related-grid", "");
} else if (value == true && name == "expMoveGuideButtonToTopbar") {
$("html").setAttribute("exp-move-guide-button-to-topbar", "");
moveGuideButtonToTopbar();
} else if (value == true && name == "expMoveCountsToButtons") {
$("html").setAttribute("exp-move-counts-to-buttons", "");
moveCountsToButtons();
} else if (value == true && name == "expMoreTooltips") {
$("html").setAttribute("exp-more-tooltips", "");
createMoreTooltips();
} else if (value == true && name == "expFlatLogo") {
$("html").setAttribute("exp-flat-logo", "");
} else if (value == true && name == "expInvertLogo") {
$("html").setAttribute("exp-invert-logo", "");
} else if (value == true && name == "expGlossyLogo") {
$("html").setAttribute("exp-glossy-title", "");
} else if (value == true && name == "expClassicTitle") {
$("html").setAttribute("exp-classic-title", "");
} else if (value == true && name == "expClassicGuide") {
$("html").setAttribute("exp-classic-guide", "");
} else if (value == true && name == "expClassicSubscribe") {
$("html").setAttribute("exp-classic-subscribe", "");
} else if (value == true && name == "expClassicStyles") {
$("html").setAttribute("exp-classic-styles", "");
} else if (value == true && name == "expClassicLtod") {
$("html").setAttribute("exp-classic-ltod", "");
} else if (value == true && name == "expClassicButtons") {
$("html").setAttribute("exp-classic-buttons", "");
} else if (value == true && name == "expBigSearchThumbs") {
$("html").setAttribute("exp-big-search-thumbs", "");
} else if (value == true && name == "expBiggerSearchThumbs") {
$("html").setAttribute("exp-bigger-search-thumbs", "");
} else if (value == true && name == "expNoVideosLink") {
$("html").setAttribute("exp-no-videos-link", "");
} else if (value == true && name == "expModernStyles") {
$("html").setAttribute("exp-modern-styles", "");
changeCommentPlaceholder(0);
changeCommentHeader(0);
} 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 == "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 == "expCosmicGuideStyle") {
$("html").setAttribute("exp-cosmic-guide-style", "");
} else if (value == true && name == "expCosmicGuideLayout") {
$("html").setAttribute("exp-cosmic-guide-layout", "");
createCosmicGuide();
} else if (value == true && name == "expCosmicFeedsV1") {
$("html").setAttribute("exp-cosmic-feeds-v1", "");
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 == "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 == "expNoGuide") {
$("html").setAttribute("guide", "no");
} else if (value == true && name == "expGuideOnFeedsOnly") {
$("html").setAttribute("guide", "feeds");
} else if (value == true && name == "expAozoraHome") {
$("html").setAttribute("exp-aozora-home", "");
} else if (value == true && name == "expAozoraHeader") {
$("html").setAttribute("exp-aozora-header", "");
searchButtonLowercase();
} else if (value == true && name == "expAozoraBG") {
$("html").setAttribute("exp-aozora-bg", "");
} else if (value == true && name == "expAozoraStyles") {
$("html").setAttribute("exp-aozora-styles", "");
} else if (value == true && name == "expAozoraSubscribe") {
$("html").setAttribute("exp-aozora-subscribe", "");
} else if (value == true && name == "expAozoraTopbarLinks") {
$("html").setAttribute("exp-aozora-topbar-links", "");
createAozoraTopbarLinks();
} else if (value == true && name == "expWatch5C") {
$("html").setAttribute("exp-watch5d", "");
$("html").setAttribute("exp-watch5c", "");
createWatch5Prep();
} else if (value == true && name == "expHomeTab") {
$("html").setAttribute("exp-home-tab", "");
} else if (value == true && name == "expRoboto") {
$("html").setAttribute("exp-roboto", "");
} else if (value == true && name == "expCenteredSearch") {
$("html").setAttribute("exp-centered-search", "");
} else if (value == true && name == "expBigSearch") {
$("html").setAttribute("exp-big-search", "");
} else if (value == true && name == "expSecondarySearchIcon") {
$("html").setAttribute("exp-secondary-search-icon", "");
createSearchTumor();
} else if (value == true && name == "expMaterialSearch") {
$("html").setAttribute("exp-material-search", "");
createSearchIcon();
} else if (value == true && name == "expPolymerShell") {
$("html").setAttribute("exp-polymer-shell", "");
createSearchIcon();
} else if (value == true && name == "expEarlyPolymerShell") {
$("html").setAttribute("exp-polymer-shell", "");
$("html").setAttribute("exp-early-polymer-shell", "");
} else if (value == true && name == "expEarlyPolymerGuide") {
$("html").setAttribute("exp-early-polymer-guide", "");
} else if (value == true && name == "expPolymerGen2Colors") {
$("html").setAttribute("exp-polymer-gen2-colors", "");
} else if (value == true && name == "expPolymerSubscribe") {
$("html").setAttribute("exp-polymer-subscribe", "");
} else if (value == true && name == "expPolymerGen2Subscribe") {
$("html").setAttribute("exp-polymer-subscribe", "");
$("html").setAttribute("exp-polymer-gen2-subscribe", "");
} else if (value == true && name == "expPolymerStyles") {
$("html").setAttribute("exp-polymer-styles", "");
changeCommentPlaceholder(1);
changeCommentHeader(1);
} else if (value == true && name == "expPolymerChannels") {
$("html").setAttribute("exp-polymer-channels", "");
} else if (value == true && name == "expPolymerComments") {
$("html").setAttribute("exp-polymer-comments", "");
} else if (value == true && name == "expPolymerTooltips") {
$("html").setAttribute("exp-polymer-tooltips", "");
} else if (value == true && name == "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 == "expWMRButtonsLowercase") {
$("html").setAttribute("exp-wmr-buttons-lowercase", "");
} else if (value == true && name == "expOutlineIcons") {
$("html").setAttribute("exp-outline-icons", "");
} else if (value == true && name == "expRoundedTopbarPfp") {
$("html").setAttribute("exp-rounded-topbar-pfp", "");
} else if (value == true && name == "expUploadIcon") {
$("html").setAttribute("exp-upload-icon", "");
createUploadIcon();
} else if (value == true && name == "expHideYoodles") {
$("html").setAttribute("exp-hide-yoodles", "");
hideYoodles();
} else if (value == true && name == "expFixedShareIcons") {
$("html").setAttribute("exp-fixed-share-icons", "");
} else if (value == true && name == "expFixedXIcon") {
$("html").setAttribute("exp-fixed-x-icon", "");
} else if (value == true && name == "expMaterialGbar") {
$("html").setAttribute("exp-material-gbar", "");
}
});
});
refreshCheck++;
if (
$("#startube-new-settings-popup") === null &&
STS.show2point1 == true
) {
let container76 = document.querySelector('.spitfire-body-container.v3');
let newElem76 = document.createElement("div");
newElem76.id = "startube-new-settings-popup";
newElem76.innerHTML = `
What's new in StarTube 2.1.0
Cosmic Panda channels
Channels3, the channel layout used in Cosmic Panda, has been added, and is used on all layouts from Early 2013 and earlier.
Lockable settings
Right click on settings to lock them. This will prevent them from being changed by presets.
Adaptive layout
When expAdaptiveLayout is enabled, watching a video will cause the site to change to the layout that existed when that video was made (or the closest thing available). For example, a 2015 video will give you the 2015 layout.
Note: These presets will override ALMOST ALL your StarTube settings! You may need to enter this config window again to change some things after enabling a preset.
STPresetsAlsoSetV3Settings
If you don't want StarTube to change your V3 config, uncheck this. (The page will reload after changing this setting)
Use default V3 player (2014)
Use 2015-2016 player
Use 2016-2020 player
Use Aozora 2011
Use Cosmic Panda
Use Epic Panda
Use Early 2013
Use Early 2013 Alt
With alt-watch9
Use Mid 2013
Use Mid 2013 Alt
With alt-watch9
Use Late 2013
Use Late 2013 Alt
With alt-watch9
Use 2014
Use 2014 Alt
With alt-watch9
Use 2015
Use 2015 Alt
With alt-watch9
Use 2016
Use 2016 Alt
With alt-watch9
Use 2017
Use 2017 Alt
With alt-watch9
Use 2017 alt 2 (experimental)
With related grid, always pinned guide, and more
Use Polymer 2016
Very unfinished
Use Polymer 2019
Use Polymer 2020
Use Polymer 2021
Use Polymer 2022
All
expAdaptiveLayout
When you go to watch a video, the layout will change to the layout that existed when the video was made (or the closest thing available). This setting will overwrite all of your StarTube options every time the layout adapts.
expAdaptiveLayout2017Cap
Makes 2017 Hitchhiker the newest possible layout selected by expAdaptiveLayout. For example, a video uploaded in 2024 will give you the 2017 layout.
show2point1
Show the 2.1.0 update card.
polymerWarningBanner
If V3 is disabled or not installed, StarTube will display a banner urging the user to install it.
expHomepageRedirectsToFeed
On the inital page load only, if the current URL is https://www.youtube.com, it will redirect to https://www.youtube.com/feed/recommended_for_you, which is useful for the Cosmic Panda layout.
expLogoLinksToFeed
The YouTube logo will link to https://www.youtube.com/feed/recommended_for_you
expLogoLinksToSubs
The YouTube logo will link to https://www.youtube.com/feed/subscriptions
expRelatedThumbsSizeMedium
CustomTube medium related videos size option
expRelatedThumbsSizeLarge
Late 2016-Present
expRelatedThumbsSizeStupid
Based off the "watch feed big thumbs" experiment in Kevlar. Added as a joke, don't use this
expAlwaysShowCompactDate
Display dates on related videos without having to hover over them.
expMoveGuideMainSectionToTop
Only meant to be used with v3's regular 2013 guide.
expMoreTooltips
Adds more tooltip; Increases the amount of tooltips; Enables the tooltip tribe to be more plentiful in the site, compared to without the option enabled
expMoveGuideButtonToTopbar
Only works with the appbar enabled.
expRelatedTabs
Creates the related tabs.
expRelatedTabsHoldsSubscribe
Move the subscribe button to the related tabs area.
expWatch9
Enables the alternate universe watch9 layout (alt-watch9). Currently a little buggy without "expWatch9NoOwner". DO NOT USE WITH expWatch8.
expWatch9NoOwner
Removes the owner column from alt-watch9. Recommended if using "expRelatedTabs".
expWatch9TrueExpander
Not recommended. Makes the description work more like it does in watch7, and removes the Description tab.
expVerticalWatch9
Makes alt-watch9's panels scroll vertically instead of horizontally.
expWatch9SidebarBus
Makes alt-watch9's sidebar item selection move. Glitchy on some zoom levels.
expWatch9StickyColumns
When on the description tab, the sidebar and owner column will stay on screen while you scroll.
expWatch9ReportTab
Rename Alt-watch9's "More actions" tab to "Report".
expRelatedGrid
*Now works with the centered layout.* Use grid view for related videos. Intended to be used with expRelatedThumbsSizeLarge.
expWatch8
Enables watch8. DO NOT USE WITH expWatch9.
expWatch8NoMore
Remove the "More" button in favor of showing all buttons at once. NOTE: V3's built-in Watch8 option would best be disabled.
expMoveCountsToButtons
Moves like and dislike counts to the buttons.
expSharrow
Use Late 2015-Onwards share icon in watch8
expGuideAlwaysPinned
Always have guide pinned. Untested with 2013 guide.
expWatch7AboutTabRename
Change "About" to "Video info" on regular watch7.
expWatch7AboutTabRename2
Change "About" to "Details" on regular watch7.
expTwoColumnSearchResults
*Currently does not work with the centered layout.* Makes search results 2 columns, instead of 1. Works best on 1920x1080 screens or better.
configNoTabTopBorder
remove blue borders on watch7 tabs
configWatch7SidebarCardShadow
Add a box shadow to the related videos section if indiviual cards watch is on
expFlatLogo
Use the 2015-2017 logo
expInvertLogo
Use the Ringo (2017-Present) logo. Also makes many UI elements a brighter red.
expGlossyLogo
Use the pre-2012 logo
expClassicTitle
Early 2013 video title
expClassicGuide
Early 2013 guide styling
expClassicSubscribe
Early 2013 subscribe button
expClassicStyles
General early 2013 styling
expClassicLtod
Early 2013 like to dislike bar and icons
expClassicButtons
Early 2013 uix button styling
expBigSearchThumbs
Use the slightly bigger search thumbnails from around 2017-2019. Pfps also become centered if this is enabled.
expBiggerSearchThumbs
Use the much bigger search thumbnails from around 2020-2022. Pfps also become centered if this is enabled.
expNoVideosLink
Removes the videos link on watch7, watch8, and the related tabs.
expModernStyles
Enable ~2015 styling
expModernNotifIcon
Change notification preference icon to a bell
expModernTopbar
Makes the topbar in general look more like 2015 onwards
expModernUpload
Remove the icon on the upload button (intended to be used without promintent upload button)
expModernGuideButton
Enable late 2015-Present guide button
expModernSearchIcon
Enable late 2015-Present search icon
expSearchText
Enable "Search" text placeholder on searchbar
expModernTitle
Enable smaller title text from 2016-onwards
expModernGuide
Make the guide look like it did in late 2015 onwards, also changes stuff like What to Watch to Home
expModernHome
Removes recommended channels and fixes thumbnail sizes on home
expModernPlaylists
Modern Hitchhiker playlist styling
expModernPlaylistThumbnails
Modern Hitchhiker playlist thumbnail styling
expPlaylistRedBorder
Red border around currently playing video. From 2014-2015 ish.
expPlaylistTimestamps
Add timestamps to playlist videos on the watch page, which mimicks CustomTube's playlist styling/span>
expTrueScrollableGuide
Make the guide act like it did in 2015 onwards, removing the flyouts. Requires APPBAR_GUIDE_SCROLL to be disabled.
expModernPlayer
Make the player look like it did from 2015-2016
expModernPlayerV2
Make the player look like it did in 2016-2020
expViewsString
Always show the "views" text on the view count.
expGoogleApps
Use apps button from 2015 Google
expCommentsFullWidth
Make comments take up the full width of the section, rather than being limited 640px
expNoByText
Removes the "by" text on video elements.
expAccountMenu
Replace the expanded masthead with the account dropdown menu.
expStaticSite
Forces the site to have a consistent width of 970 pixels. Center alignment required.
expHideAppbar
The appbar can be problematic on some configurations, but the appbar guide cannot be used without the appbar. This option will hide the appbar, without disabling the appbar guide.
expEpicWatch7
Makes watch7 use epic panda styling.
expEpicWatch7Flat
Removes the shadow on epic watch7.
expEpicHeader
Use the scrapped Epic Panda topbar
expEpicStyling
Recommended for Epic Panda layout
expEpicFeeds
Epic Panda feed header
expCosmicHeader
Use the Cosmic Panda topbar
expCosmicBG
Makes the site use the Cosmic Panda background image
expCosmicButtons
Makes the site use Cosmic Panda styled buttons
expCosmicStyles
Makes the site use Cosmic Panda styling in general.
expCosmicBanners
Makes the site use the early 2012 alert banner styling.
expCosmicBannersV2
Makes the site use the mid-late 2012 alert banner styling.
expCosmicComments
Styles the comments to look like they did in 2012.
expCosmicGuideStyle
Makes the site use the Cosmic Panda black guide.
expCosmicGuideLayout
Makes the guide's structure similar to the Cosmic Panda one, with the browse channels button being on top for example.
expCosmicFeedsV1
Makes feed video renderers use the late 2011-early 2012 style.
expCosmicFeedsThirdColumn
Adds a trending column to the feed pages.
expWatch5D
Use the Cosmic Panda watch layout
expChannels3
Use Channels3, the Cosmic Panda channel page.
expChannels3BGVerticalRepeat
The channel background will repeat vertically. Use with expChannels3BGHorizontalRepeat to make it repeat in all directions.
expChannels3BGHorizontalRepeat
The channel background will repeat horizontally. Use with expChannels3BGVericalRepeat to make it repeat in all directions.
expNoGuide
Removes the guide (center alignment required)
expGuideOnFeedsOnly
Makes the guide only appear on feeds (such as subscriptions page) (center alignment required)
expAozoraHome
Arranges the homepage like the 2011 layout.
expAozoraHeader
Makes the topbar look like the 2011 layout.
expAozoraBG
Pure white site background.
expAozoraStyles
Styles many things to look like the Aozora (2010-2011) layout.
expAozoraSubscribe
White subscribe button
expAozoraTopbarLinks
Adds the browse, movies, and upload links to the topbar. Hides the default upload button
expWatch5C
Use the mid-late 2011 watch layout.
expHomeTab
Gives the channel page a regular home tab, instead of the icon tab.
expRoboto
Makes the site use the Roboto font.
expCenteredSearch
Centers the searchbar. Intended to be used with the Polymer layout recreation.
expBigSearch
Taller search bar from certain eras of Polymer.
expSecondarySearchIcon
Adds that weird redundant search icon that appears on the left side of the search bar when it is focused, which was added in 2022 and still exists today.
expMaterialSearch
Material search bar from 2016 Polymer, and some Hitchhiker experiements.
expPolymerShell
Changes the topbar, guide, and some other things to look like they did in Polymer Gen 1 (2017-2019).
expEarlyPolymerShell
Changes the topbar, guide, and some other things to look like they did in the Polymer Beta/Polymer Gen 0 (2016-2017).
expEarlyPolymerGuide
Makes the guide items 48px tall.
expPolymerGen2Colors
Makes the site use the colors it did in Polymer Gen 2 (2020-2022).
expPolymerSubscribe
Makes the subscribe button use the Polymer Gen 1 style (sub count inside the button)
expPolymerGen2Subscribe
Makes the subscribe button use the Polymer Gen 2 style (sub count not inside the button)
expPolymerStyles
Makes video renderers and other things look like Polymer.
expPolymerChannels
2017 onwards channels.
expPolymerComments
Polymer comments.
expPolymerTooltips
Polymer tooltips.
expMaterialSignIn
Red Material sign in button.
expRichGridHome
Makes the homepage videos really big.
expWatch9A
Enables the watch layout used from 2016-2019 in Polymer. Not the same as expWatch9.
expWatch9B
Enables the watch layout used from 2020-2022 in Polymer. Not the same as expWatch9.
expWatch10Beta
Use the weird mid 2022 Watch Metadata Refresh layout.
expWMRButtonsLowercase
Makes the Polymer watch layouts use lowercase buttons.
expOutlineIcons
Use the outline icons that were introduced in 2021.
expRoundedTopbarPfp
Makes the topbar pfp round like it was in 2016 onwards.
expUploadIcon
Replace the upload button with the upload icon from 2016-2018-ish.
expHideYoodles
Hide YouTube Doodles because they break the styling of the logo on some layouts.
The following options are not affected by any of the layout presets.
expFixedShareIcons
Some share options incorrectly appear as Facebook. This option fixes some of them.
expFixedXIcon
Makes the X share option use the modern icon, as opposed to the pre-2023 icon.
expMaterialGbar
Gives the modern gbar a Material-ish skin. Requires V3's MODERN_GBAR_DELEGATION to be enabled.