// ==UserScript== // @name StarTube Beta // @namespace http://tampermonkey.net/ // @version 2.3.0.2 // @description More layouts and customization options for V3 // @author lightbeam24 // @match *://*.youtube.com/* // @icon https://www.youtube.com/s/desktop/71ca99b3/img/logos/favicon.ico // @icon64 https://www.youtube.com/s/desktop/daa4e47c/img/logos/favicon_96x96.png // @grant GM_getValue // @grant GM_setValue // @grant GM_deleteValue // @grant GM_registerMenuCommand // @license MIT // @downloadURL none // ==/UserScript== var globalDataPoints = { "currWatchData":{} }; window.globalDataPoints = globalDataPoints; document.globalDataPoints = globalDataPoints; var $ = a => document.querySelector(a); let theSets = "ST_BLEEDING_EDGE_SETTINGS"; function showHideSettings() { if ($("#startube-settings-window-entity.hid") != null) { $("#startube-settings-window-entity").classList.remove("hid"); } else if ($("#startube-settings-window.hid") == null) { $("#startube-settings-window-entity").classList.add("hid"); } if ($(".jfk-dialog-background.hid") == null) { $(".jfk-dialog-background").click(); } } function openV3Settings() { $("#upload-menu-account:not(.yt-uix-button-menu-new-section-separator)").click(); if ($("#startube-settings-window.hid") == null) { $("#startube-settings-window-entity").classList.add("hid"); } } function resetSettings() { if ($("#st-reset-settings-container")) { $("#st-reset-settings-container").remove(); } let container = $("html"); let newElem = document.createElement("div"); newElem.id = "st-reset-settings-container" newElem.classList = "flex-bar"; newElem.innerHTML = `
Are you sure you want to reset all your StarTube settings?
`; container.insertBefore(newElem,container.children[0]); function hideResetWindow() { $("#st-reset-settings-container").remove(); } $("#st-reset-settings-fence").addEventListener("click",hideResetWindow); $("#st-reset-cancel").addEventListener("click",hideResetWindow); $("#st-reset-ok").addEventListener("click", function() { localStorage.removeItem(theSets); window.location.reload(); }); window.addEventListener("keydown", function() { let resultCount = 0; let key = event.key; if (key == "Escape") { hideResetWindow(); } }); } GM_registerMenuCommand("Open StarTube settings", showHideSettings); GM_registerMenuCommand("Reset StarTube settings", resetSettings); (function() { 'use strict'; let currStarVer = "2.3.0.2"; let currStarChan = "beta" let starTubeConfigCreated = localStorage.getItem("starTubeConfigCreated"); if (starTubeConfigCreated == null) { starTubeConfigCreated = currStarVer; } function getRndInteger(min, max) { return Math.floor(Math.random() * (max - min)) + min; } let forceC4 = false; let bannerNo = getRndInteger(1,4); let closedEFYTBanner = false; let closedWelcomeBanner = false; let gdp = globalDataPoints; grabData(); // EXfunct function TheEXFetch(condition, type, endpoint, avar, id, modifier, modContent, modifier2, mod2Content) { if (type == "nomod") { //if (endpoint == "browse") { fetch("https://www.youtube.com/youtubei/v1/" + endpoint + "?key=AIzaSyDCU8hByM-4DrUqRUYnGn-3llEO78bcxq8", { "headers": { "accept": "application/json, text/plain, /", "accept-language": "en-US,en;q=0.9", "Content-type": "application/json", "sec-ch-ua-mobile": "?0", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "x-goog-authuser": "0", "x-origin": "https://www.youtube.com/" }, "referrer": "https://www.youtube.com/", "referrerPolicy": "strict-origin-when-cross-origin", "body": JSON.stringify({ "context": { "client": { "clientName": "TVHTML5", "clientVersion": "7.20240701.16.00", "hl": "en", "gl": "US" } }, [avar]: id }), "method": "POST", "mode": "cors", "credentials": "include" }).then(response => response.json()).then(data => { doChannelBanner(data); }); } } function EXFetch(condition, type, endpoint, avar, id, modifier, modContent, modifier2, mod2Content) { return new Promise((resolve, reject) => { if (condition) { if (type == "nomod") { //if (endpoint == "browse") { fetch("https://www.youtube.com/youtubei/v1/" + endpoint + "?key=AIzaSyDCU8hByM-4DrUqRUYnGn-3llEO78bcxq8", { "headers": { "accept": "application/json, text/plain, /", "accept-language": "en-US,en;q=0.9", "Content-type": "application/json", "sec-ch-ua-mobile": "?0", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "x-goog-authuser": "0", "x-origin": "https://www.youtube.com/" }, "referrer": "https://www.youtube.com/", "referrerPolicy": "strict-origin-when-cross-origin", "body": JSON.stringify({ "context": { "client": { "clientName": "TVHTML5", "clientVersion": "2.20240726.00.00", "hl": "en", "gl": "US" } }, [avar]: id }), "method": "POST", "mode": "cors", "credentials": "include" }).then(response => response.json()).then(data => { resolve(data); }); } if (type == "single") { //if (endpoint == "browse") { fetch("https://www.youtube.com/youtubei/v1/" + endpoint + "?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8", { "headers": { "accept": "application/json, text/plain, /", "accept-language": "en-US,en;q=0.9", "Content-type": "application/json", "sec-ch-ua-mobile": "?0", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "x-goog-authuser": "0", "x-origin": "https://www.youtube.com/" }, "referrer": "https://www.youtube.com/", "referrerPolicy": "strict-origin-when-cross-origin", "body": JSON.stringify({ "context": { "client": { "clientName": "WEB", "clientVersion": "2.20240726.00.00", "hl": "en", "gl": "US" } }, [avar]: id, [modifier]: modContent }), "method": "POST", "mode": "cors", "credentials": "include" }).then(response => response.json()).then(data => { resolve(data); }); } if (type == "double") { //if (endpoint == "browse") { fetch("https://www.youtube.com/youtubei/v1/" + endpoint + "?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8", { "headers": { "accept": "application/json, text/plain, /", "accept-language": "en-US,en;q=0.9", "Content-type": "application/json", "sec-ch-ua-mobile": "?0", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "x-goog-authuser": "0" }, "referrer": "https://www.youtube.com/", "referrerPolicy": "strict-origin-when-cross-origin", "body": JSON.stringify({ "context": { "client": { "clientName": "WEB", "clientVersion": "2.20240726.00.00", "hl": "en", "gl": "US" } }, [modifier]: modContent, [modifier2]: mod2Content }), "method": "POST", "mode": "cors", "credentials": "include" }).then(response => response.json()).then(data => { resolve(data); }); } if (type == "doubleLoggedIn") { //if (endpoint == "browse") { fetch("https://www.youtube.com/youtubei/v1/" + endpoint + "?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8", { "headers": { "accept": "application/json, text/plain, /", "accept-language": "en-US,en;q=0.9", "authorization": aion, "Content-type": "application/json", "sec-ch-ua-mobile": "?0", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "x-goog-authuser": "0" }, "referrer": "https://www.youtube.com/", "referrerPolicy": "strict-origin-when-cross-origin", "body": JSON.stringify({ "context": { "client": { "clientName": "WEB", "clientVersion": "2.20240726.00.00", "hl": "en", "gl": "US" } }, [modifier]: modContent, [modifier2]: mod2Content }), "method": "POST", "mode": "cors", "credentials": "include" }).then(response => response.json()).then(data => { resolve(data); }); } // } } }); } var STH = { WMR_ACTIONS: `
Share
Save Add to
` }; 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(theSets); window.addEventListener("resize",getVideoSize); var defaultConfigs = { "newConfig": true, "configNoCast": true, "configAccountMenuV3SettingsButton": true, "configPolymerMenuV3SettingsButton": true, "configCreateMenuV3SettingsButton": true, "expAdaptiveLayout": false, "expAdaptiveLayout2017Cap": false, "expAdaptiveLayout2018Cap": false, "expAdaptiveLayout2024HH": false, "polymerWarningBanner": true, "showWelcomeBanner": true, "expRelatedThumbsSizeSmaller": false, "expRelatedThumbsSizeMedium": true, "expRelatedThumbsSizeLarge": false, "expRelatedThumbsSizeStupid": false, "expAlwaysShowCompactDate": true, "expNeverShowCompactDate": false, "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, "expSkinnySubscribe": true, "expModernStyles": false, "expModernCards": false, "expLightChannelBar": 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, "expStaticSiteForcesSmallPlayer": true, "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, "expCosmicFeedsV2": false, "expCosmicFeedsV3": false, "expCosmicFeedsThirdColumn": false, "expWatch5D": false, "expNotifSquare": false, "expChannels3": false, "expChannels3BGVerticalRepeat": false, "expChannels3BGHorizontalRepeat": false, "expChannels3TimeVisible": false, "expChannels3DateVisible": false, "expChannels3DateHidden": false, "expNoGuide": false, "expGuideOnFeedsOnly": false, "expAozoraHome": false, "expAozoraHeader": false, "expAozoraBG": false, "expAozoraStyles": false, "expAozoraComments": false, "expAozoraSubscribe": false, "expAozoraTopbarLinks": false, "expAozoraSearch":false, "expWatch5C": false, "expStargazerTabbedHeader": false, "expStargazerBarHeader": false, "expStargazerSimpleHeader": false, "expStargazerSubscribe": false, "expHomeTab": false, "expRoboto": false, "expCenteredSearch": false, "expBigSearch": false, "expSecondarySearchIcon": false, "expMaterialSearch": false, "expPolymerAccountMenu": false, "expPolymerShell": false, "expEarlyPolymerShell": false, "expEarlyPolymerGuide": false, "expPolymerGen2Colors": false, "expPolymerSubscribe": false, "expPolymerGen2Subscribe": false, "expPolymerStyles": false, "expBetaPolymerStyles": false, "expPolymerChannels": false, "expColorfulChannels": false, "expPolymerComments": false, "expPolymerTooltips": false, "expTopbarShadow": false, "expMaterialSignIn": false, "expWatch9A": false, "expWatch9B": false, "expWatch10Beta": false, "expWatch10": false, "expCommentsTeaser": false, "expSegmentedLtod": false, "expRoundedSubscribe": false, "expBlackSubscribe": false, "expRoundedThumbs": false, "expRoundedPlayer": false, "expRoundedSearch": false, "expRoundedGuide": false, "expRoundedStyles": false, "expFrostedGlass": false, "expPolymerGen3Colors": false, "expYTSansTitle": false, "expWMRButtonsLowercase": false, "expWMRAddTo": false, "expWMRNoSaveText": false, "expWMRNoShareText": false, "expOutlineIcons": false, "expRichGridHome": false, "expRoundedTopbarPfp": false, "expUploadIcon": false, "expCreateIcon": false, "expYouTubeApps": false, "expRingo2": true, "exp2024Favicon": false, "exp2024FaviconOld": false, "exp2017Favicon": false, "exp2015Favicon": false, "exp2012Favicon": false, "exp2010Favicon": false, "exp2005Favicon": 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, "presetHitchhiker2018": 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, "expLinkToGridSubs": true, "show2point3": true, "expHideYoodles": false, "expFixedShareIcons": true, "expFixedXIcon": true, "expMaterialGbar": false, "ironSettings": {}, "radioSettings": { layoutMode: "manual", layoutSelect: "hh2024", faviconSelect: "auto", gbarVersion: "off", accountMenu:"auto", playerVersion: "auto", watchLayout: "auto", relatedTabs: "auto", relatedGrid: "off", relatedSize: "auto", compactDate: "on", playerSizerules: "passive", guideNavToFeed: "auto", guideAlwaysPinned: "off", channelVersion: "auto", colorfulChannels: "auto" }, "importantInfo": { startubeVersion: currStarVer, startubeChannel: currStarChan } }; 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(); } } let SRS = STS.radioSettings; function applySettings(n) { if (n !== 0) { setChangedState(); } localStorage.setItem(theSets,JSON.stringify(STS)); } function setChangedState() { if ($("[changes-made='true']") == null && $("#startube-settings-window")) { $("#startube-settings-window").setAttribute("changes-made","true"); } } function applyNewSettings() { STS.STPresetsAlsoSetV3Settings = true; if (STS.configAccountMenuV3SettingsButton == null) { STS.configAccountMenuV3SettingsButton = true; STS.configCreateMenuV3SettingsButton = true; STS.configPolymerMenuV3SettingsButton = true; } if (STS.importantInfo == null && STS.radioSettings == null) { STS.importantInfo = { startubeVersion: "2.1.0 or earlier", startubeChannel: "unknown" } } if (STS.importantInfo != null && STS.radioSettings != null) { STS.importantInfo = { startubeVersion: currStarVer, startubeChannel: currStarChan } } if (STS.configNoCast == null) { STS.configNoCast = true; } if (STS.show2point3 == null) { STS.show2point3 = true; } if (STS.radioSettings == null) { STS.radioSettings = { layoutMode: "manual", layoutSelect: "passive", faviconSelect: "auto", gbarVersion: "off", accountMenu:"auto", playerVersion: "auto", watchLayout: "auto", relatedTabs: "auto", relatedGrid: "off", relatedSize: "auto", compactDate: "on", playerSizerules: "passive", guideNavToFeed: "auto", guideAlwaysPinned: "off", channelVersion: "auto", colorfulChannels: "auto" } } if (STS.radioSettings.accountMenu == null) { STS.radioSettings.accountMenu = "auto"; } } getIronSettings(); function getIronSettings() { if (STS.ironSettings) { let irons = Object.entries(STS.ironSettings); irons.forEach(i => { let name = i[0]; let value = i[1]; STS[name] = value; }); } else { STS.ironSettings = {}; 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); let ScFa = { "configNoCast": { name: "configNoCast", description: "Remove the 'play on TV' button that appears in Chromium based browsers.", value: false, locked: false, index: 0 }, "configAccountMenuV3SettingsButton": { name: "configAccountMenuV3SettingsButton", description: "Show the V3 settings and StarTube settings buttons on the account menu.", value: false, locked: false, index: 0 }, "configPolymerMenuV3SettingsButton": { name: "configPolymerMenuV3SettingsButton", description: "Show the V3 settings and StarTube settings buttons on the Polymer account menu.", value: false, locked: false, index: 0 }, "configCreateMenuV3SettingsButton": { name: "configCreateMenuV3SettingsButton", description: "Show the V3 settings button on the create menu.", value: false, locked: false, index: 0 }, "expAdaptiveLayout": { name: "expAdaptiveLayout", description: "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.", value: false, locked: false, index: 0 }, "expAdaptiveLayout2017Cap": { name: "expAdaptiveLayout2017Cap", description: "Makes 2017 Hitchhiker the newest possible layout selected by expAdaptiveLayout. For example, a video uploaded in 2024 will give you the 2017 layout.", value: false, locked: false, index: 1 }, "expAdaptiveLayout2018Cap": { name: "expAdaptiveLayout2018Cap", description: "Makes 2018-2020 Hitchhiker the newest possible layout selected by expAdaptiveLayout. For example, a video uploaded in 2024 will give you the 2018 layout.", value: false, locked: false, index: 1 }, "expAdaptiveLayout2024HH": { name: "expAdaptiveLayout2024HH", description: "(For expAdaptiveLayout) Use 2024 Hitchhiker for videos uploaded in 2024.", value: false, locked: false, index: 1 }, "show2point3": { name: "show2point3", description: "Show the 2.3.0 update card.", value: false, locked: false, index: 2 }, "showWelcomeBanner": { name: "showWelcomeBanner", description: "Show the welcome to StarTube Beta banner.", value: false, locked: false, index: 3 }, "polymerWarningBanner": { name: "polymerWarningBanner", description: "If V3 is disabled or not installed, StarTube will display a banner urging the user to install it.", value: false, locked: false, index: 4 }, "expHomepageRedirectsToFeed": { name: "expHomepageRedirectsToFeed", description: "On the inital page load only, if the current URL is https://www.youtube.com, it will redirect to https://www.youtube.com/feed/what_to_watch/recommended, which is useful for the Cosmic Panda layout.", value: false, locked: false, index: 5 }, "expLogoLinksToFeed": { name: "expLogoLinksToFeed", description: "The YouTube logo will link to https://www.youtube.com/feed/what_to_watch/recommended", value: false, locked: false, index: 6 }, "expLogoLinksToSubs": { name: "expLogoLinksToSubs", description: "The YouTube logo will link to https://www.youtube.com/feed/subscriptions", value: false, locked: false, index: 7 }, "expLinkToGridSubs": { name: "expLinkToGridSubs", description: "Make the subscriptions guide item link to the grid version of subscriptions.", value: false, locked: false, index: 7 }, "expRelatedThumbsSizeSmaller": { name: "expRelatedThumbsSizeSmaller", description: "2011 and earlier. Makes related videos 106x64.", value: false, locked: false, index: 8 }, "expRelatedThumbsSizeMedium": { name: "expRelatedThumbsSizeMedium", description: "CustomTube medium related videos size option. Makes related videos 144x80.", value: false, locked: false, index: 8 }, "expRelatedThumbsSizeLarge": { name: "expRelatedThumbsSizeLarge", description: "Late 2016-Present. Makes related videos 168x94.", value: false, locked: false, index: 9 }, "expRelatedThumbsSizeStupid": { name: "expRelatedThumbsSizeStupid", description: "Based off the 'watch feed big thumbs' experiment in Kevlar. Added as a joke, don't use this", value: false, locked: false, index: 10 }, "expAlwaysShowCompactDate": { name: "expAlwaysShowCompactDate", description: "Display dates on related videos without having to hover over them.", value: false, locked: false, index: 11 }, "expNeverShowCompactDate": { name: "expNeverShowCompactDate", description: "Never display dates on related videos, even when hovering over them.", value: false, locked: false, }, "expMoveGuideMainSectionToTop": { name: "expMoveGuideMainSectionToTop", description: "Only meant to be used with v3's regular 2013 guide.", value: false, locked: false, index: 12 }, "expMoreTooltips": { name: "expMoreTooltips", description: "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", value: false, locked: false, index: 13 }, "expMoveGuideButtonToTopbar": { name: "expMoveGuideButtonToTopbar", description: "Only works with the appbar enabled.", value: false, locked: false, deprecated: true, index: 14 }, "expRelatedTabs": { name: "expRelatedTabs", description: "Creates the related tabs.", value: false, locked: false, index: 15 }, "expRelatedTabsHoldsSubscribe": { name: "expRelatedTabsHoldsSubscribe", description: "Move the subscribe button to the related tabs area.", value: false, locked: false, index: 16 }, "expWatch9": { name: "expWatch9", description: 'Enables the alternate universe watch9 layout (alt-watch9). Currently a little buggy without "expWatch9NoOwner". DO NOT USE WITH expWatch8.', value: false, locked: false, index: 17 }, "expWatch9NoOwner": { name: "expWatch9NoOwner", description: 'Removes the owner column from alt-watch9. Recommended if using "expRelatedTabs".', value: false, locked: false, index: 18 }, "expWatch9TrueExpander": { name: "expWatch9TrueExpander", description: "Not recommended. Makes the description work more like it does in watch7, and removes the Description tab.", value: false, locked: false, index: 19 }, "expVerticalWatch9": { name: "expVerticalWatch9", description: "Makes alt-watch9's panels scroll vertically instead of horizontally.", value: false, locked: false, index: 20 }, "expWatch9SidebarBus": { name: "expWatch9SidebarBus", description: "Makes alt-watch9's sidebar item selection move. Glitchy on some zoom levels.", value: false, locked: false, index: 21 }, "expWatch9StickyColumns": { name: "expWatch9StickyColumns", description: "When on the description tab, the sidebar and owner column will stay on screen while you scroll.", value: false, locked: false, index: 22 }, "expWatch9ReportTab": { name: "expWatch9ReportTab", description: "Rename Alt-watch9's 'More actions' tab to 'Report'.", value: false, locked: false, index: 23 }, "expRelatedGrid": { name: "expRelatedGrid", description: "*Now works with the centered layout.* Use grid view for related videos. Intended to be used with expRelatedThumbsSizeLarge.", value: false, locked: false, index: 24 }, "expWatch8": { name: "expWatch8", description: "Enables watch8. DO NOT USE WITH expWatch9.", value: false, locked: false, index: 25 }, "expWatch8NoMore": { name: "expWatch8NoMore", description: "Remove the 'More' button in favor of showing all buttons at once. NOTE: V3's built-in Watch8 option would best be disabled.", value: false, locked: false, index: 26 }, "expMoveCountsToButtons": { name: "expMoveCountsToButtons", description: "Moves like and dislike counts to the buttons.", value: false, locked: false, index: 27 }, "expSharrow": { name: "expSharrow", description: "Use Late 2015-Onwards share icon in watch8", value: false, locked: false, index: 28 }, "expGuideAlwaysPinned": { name: "expGuideAlwaysPinned", description: "Always have guide pinned. Untested with 2013 guide.", value: false, locked: false, index: 29 }, "expWatch7AboutTabRename": { name: "expWatch7AboutTabRename", description: 'Change "About" to "Video info" on regular watch7.', value: false, locked: false, index: 30 }, "expWatch7AboutTabRename2": { name: "expWatch7AboutTabRename2", description: 'Change "About" to "Details" on regular watch7.', value: false, locked: false, index: 31 }, "expTwoColumnSearchResults": { name: "expTwoColumnSearchResults", description: "*Currently does not work with the centered layout.* Makes search results 2 columns, instead of 1. Works best on 1920x1080 screens or better.", value: false, locked: false, index: 32 }, "configWatch7SidebarCardShadow": { name: "configWatch7SidebarCardShadow", description: "Add a box shadow to the related videos section if indiviual cards watch is on", value: false, locked: false, index: 33 }, "expFlatLogo": { name: "expFlatLogo", description: "Use the 2015-2017 logo.", value: false, locked: false, index: 34 }, "expInvertLogo": { name: "expInvertLogo", description: "Use the Ringo (2017-Present) logo. Also makes many UI elements a brighter red.", value: false, locked: false, index: 35 }, "expGlossyLogo": { name: "expGlossyLogo", description: "Use the pre-2012 logo. Designed for the Hitchhiker layouts only.", value: false, locked: false }, "expClassicTitle": { name: "expClassicTitle", description: "Early 2013 video title", value: false, locked: false }, "expClassicGuide": { name: "expClassicGuide", description: "Early 2013 guide styling", value: false, locked: false }, "expClassicSubscribe": { name: "expClassicSubscribe", description: "Early 2013 subscribe button", value: false, locked: false }, "expClassicStyles": { name: "expClassicStyles", description: "General early 2013 styling", value: false, locked: false }, "expClassicLtod": { name: "expClassicLtod", description: "Early 2013 like to dislike bar and icons", value: false, locked: false }, "expClassicButtons": { name: "expClassicButtons", description: "Early 2013 uix button styling", value: false, locked: false }, "expBigSearchThumbs": { name: "expBigSearchThumbs", description: "Use the slightly bigger search thumbnails from around 2017-2019. Pfps also become centered if this is enabled.", value: false, locked: false }, "expBiggerSearchThumbs": { name: "expBiggerSearchThumbs", description: "Use the much bigger search thumbnails from around 2020-2022. Pfps also become centered if this is enabled.", value: false, locked: false }, "expNoVideosLink": { name: "expNoVideosLink", description: "Removes the videos link on watch7, watch8, and the related tabs.", value: false, locked: false }, "expSkinnySubscribe": { name: "expSkinnySubscribe", description: "Use the skinnier subscribe button. (V3 by default uses a wider variant)", value: false, locked: false }, "expModernStyles": { name: "expModernStyles", description: "Enable ~2015 styling", value: false, locked: false }, "expModernCards": { name: "expModernCards", description: "Enable modern cardification padding and margins used from 2014 onwards. expModernStyles overrides some of this.", value: false, locked: false }, "expLightChannelBar": { name: "expLightChannelBar", description: "Enable the modern light bar that appears on your own channel", value: false, locked: false }, "expModernNotifIcon": { name: "expModernNotifIcon", description: "Change notification preference icon to a bell", value: false, locked: false }, "expModernTopbar": { name: "expModernTopbar", description: "Makes the topbar in general look more like 2015 onwards", value: false, locked: false }, "expModernUpload": { name: "expModernUpload", description: "Remove the icon on the upload button (intended to be used without promintent upload button)", value: false, locked: false }, "expModernGuideButton": { name: "expModernGuideButton", description: "Enable late 2015-Present guide button", value: false, locked: false }, "expModernSearchIcon": { name: "expModernSearchIcon", description: "Enable late 2015-Present search icon", value: false, locked: false }, "expSearchText": { name: "expSearchText", description: 'Enable "Search" text placeholder on searchbar', value: false, locked: false }, "expModernTitle": { name: "expModernTitle", description: "Enable smaller title text from 2016-onwards", value: false, locked: false }, "expModernGuide": { name: "expModernGuide", description: "Make the guide look like it did in late 2015 onwards, also changes stuff like What to Watch to Home", value: false, locked: false }, "expModernHome": { name: "expModernHome", description: "Removes recommended channels and fixes thumbnail sizes on home", value: false, locked: false }, "expModernPlaylists": { name: "expModernPlaylists", description: "Modern Hitchhiker playlist styling", value: false, locked: false }, "expModernPlaylistThumbnails": { name: "expModernPlaylistThumbnails", description: "Modern Hitchhiker playlist thumbnail styling", value: false, locked: false }, "expPlaylistRedBorder": { name: "expPlaylistRedBorder", description: "Red border around currently playing video. From 2014-2015 ish.", value: false, locked: false }, "expPlaylistTimestamps": { name: "expPlaylistTimestamps", description: "Add timestamps to playlist videos on the watch page, which mimicks CustomTube's playlist styling", value: false, locked: false }, "expTrueScrollableGuide": { name: "expTrueScrollableGuide", description: "Make the guide act like it did in 2015 onwards, removing the flyouts. Requires APPBAR_GUIDE_SCROLL to be disabled.", value: false, locked: false }, "expModernPlayer": { name: "expModernPlayer", description: "Make the player look like it did from 2015-2016", value: false, locked: false }, "expModernPlayerV2": { name: "expModernPlayerV2", description: "Make the player look like it did in 2016-2020", value: false, locked: false }, "expViewsString": { name: "expViewsString", description: 'Always show the "views" text on the view count.', value: false, locked: false }, "expGoogleApps": { name: "expGoogleApps", description: "Use apps button from 2015 Google. This was also briefly tested on YouTube around 2013-2014.", value: false, locked: false }, "expCommentsFullWidth": { name: "expCommentsFullWidth", description: "Make comments take up the full width of the section, rather than being limited 640px", value: false, locked: false }, "expNoByText": { name: "expNoByText", description: 'Removes the "by" text on video elements.', value: false, locked: false }, "expAccountMenu": { name: "expAccountMenu", description: "Replace the expanded masthead with the account dropdown menu.", value: false, locked: false }, "expStaticSite": { name: "expStaticSite", description: "Forces the site to have a consistent width of 970 pixels. Center alignment required.", value: false, locked: false }, "expStaticSiteForcesSmallPlayer": { name: "expStaticSiteForcesSmallPlayer", description: "If expStaticSite is enabled, the non-flexwatch (360p) player will be forced on.", value: false, locked: false }, "expHideAppbar": { name: "expHideAppbar", description: "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.", value: false, locked: false }, "expEpicWatch7": { name: "expEpicWatch7", description: "Makes watch7 use epic panda styling.", value: false, locked: false }, "expEpicWatch7Flat": { name: "expEpicWatch7Flat", description: "Removes the shadow on epic watch7.", value: false, locked: false }, "expEpicHeader": { name: "expEpicHeader", description: "Use the scrapped Epic Panda topbar", value: false, locked: false }, "expEpicStyling": { name: "expEpicStyling", description: "Recommended for Epic Panda layout", value: false, locked: false }, "expEpicFeeds": { name: "expEpicFeeds", description: "Epic Panda feed header", value: false, locked: false }, "expCosmicHeader": { name: "expCosmicHeader", description: "Use the Cosmic Panda topbar", value: false, locked: false }, "expCosmicBG": { name: "expCosmicBG", description: "Makes the site use the Cosmic Panda background image", value: false, locked: false }, "expCosmicButtons": { name: "expCosmicButtons", description: "Makes the site use Cosmic Panda styled buttons", value: false, locked: false }, "expCosmicStyles": { name: "expCosmicStyles", description: "Makes the site use Cosmic Panda styling in general.", value: false, locked: false }, "expCosmicBanners": { name: "expCosmicBanners", description: "Makes the site use the early 2012 alert banner styling.", value: false, locked: false }, "expCosmicBannersV2": { name: "expCosmicBannersV2", description: "Makes the site use the mid-late 2012 alert banner styling.", value: false, locked: false }, "expCosmicComments": { name: "expCosmicComments", description: "Use Cosmic Panda comments.", value: false, locked: false }, "expCosmicGuideStyle": { name: "expCosmicGuideStyle", description: "Makes the site use the Cosmic Panda black guide.", value: false, locked: false }, "expCosmicGuideLayout": { name: "expCosmicGuideLayout", description: "Makes the guide's structure similar to the Cosmic Panda one, with the browse channels button being on top for example.", value: false, locked: false }, "expCosmicFeedsV1": { name: "expCosmicFeedsV1", description: "Makes feed video renderers use the late 2011-early 2012 style.", value: false, locked: false }, "expCosmicFeedsV2": { name: "expCosmicFeedsV2", description: "Makes feed video renderers use the mid 2012 style.", value: false, locked: false }, "expCosmicFeedsV3": { name: "expCosmicFeedsV3", description: "Makes feed video renderers use the late 2012 style.", value: false, locked: false }, "expCosmicFeedsThirdColumn": { name: "expCosmicFeedsThirdColumn", description: "Adds a trending column to the feed pages.", value: false, locked: false }, "expWatch5D": { name: "expWatch5D", description: "Use the Cosmic Panda watch layout", value: false, locked: false }, "expNotifSquare": { name: "expNotifSquare", description: "Use the old Google+ notification square instead of the bell.", value: false, locked: false }, "expChannels3": { name: "expChannels3", description: "Use Channels3, the Cosmic Panda channel page.", value: false, locked: false }, "expChannels3BGVerticalRepeat": { name: "expChannels3BGVerticalRepeat", description: "The channel background will repeat vertically. Use with expChannels3BGHorizontalRepeat to make it repeat in all directions.", value: false, locked: false }, "expChannels3BGHorizontalRepeat": { name: "expChannels3BGHorizontalRepeat", description: "The channel background will repeat horizontally. Use with expChannels3BGVericalRepeat to make it repeat in all directions.", value: false, locked: false }, "expChannels3TimeVisible": { name: "expChannels3TimeVisible", description: "Show the timestamp on Channels3's homepage thumbnails.", value: false, locked: false }, "expChannels3DateVisible": { name: "expChannels3DateVisible", description: "Always show the the date on Channels3's homepage videos.", value: false, locked: false }, "expChannels3DateHidden": { name: "expChannels3DateHidden", description: "Never show the the date on Channels3's homepage videos.", value: false, locked: false }, "expNoGuide": { name: "expNoGuide", description: "Removes the guide (center alignment required)", value: false, locked: false }, "expGuideOnFeedsOnly": { name: "expGuideOnFeedsOnly", description: "Makes the guide only appear on feeds (such as subscriptions page) (center alignment required)", value: false, locked: false }, "expAozoraHome": { name: "expAozoraHome", description: "Arranges the homepage like the 2011 layout.", value: false, locked: false }, "expAozoraHeader": { name: "expAozoraHeader", description: "Makes the topbar look like the 2011 layout.", value: false, locked: false }, "expAozoraBG": { name: "expAozoraBG", description: "Pure white site background.", value: false, locked: false }, "expAozoraStyles": { name: "expAozoraStyles", description: "Styles many things to look like the Aozora (2010-2011) layout.", value: false, locked: false }, "expAozoraComments": { name: "expAozoraComments", description: "Use Aozora comments.", value: false, locked: false }, "expAozoraSubscribe": { name: "expAozoraSubscribe", description: "White subscribe button", value: false, locked: false }, "expAozoraTopbarLinks": { name: "expAozoraTopbarLinks", description: "Adds the browse, movies, and upload links to the topbar. Hides the default upload button.", value: false, locked: false }, "expAozoraSearch": { name: "expAozoraSearch", description: "Use the Aozora search layout, used from 2010-Early 2012.", value: false, locked: false }, "expWatch5C": { name: "expWatch5C", description: "Use the mid-late 2011 watch layout.", value: false, locked: false }, "expStargazerTabbedHeader": { name: "expStargazerTabbedHeader", description: "Use the 2008 header/topbar. Will overwrite any other topbar settings.", value: false, locked: false }, "expStargazerBarHeader": { name: "expStargazerBarHeader", description: "Use the Early/Mid 2009 header/topbar. Will overwrite any other topbar settings.", value: false, locked: false }, "expStargazerSimpleHeader": { name: "expStargazerSimpleHeader", description: "Use the Late 2009 header/topbar. Will overwrite any other topbar settings.", value: false, locked: false }, "expStargazerSubscribe": { name: "expStargazerSubscribe", description: "Use the old yellow subscribe button from 2008-2009.", value: false, locked: false }, "expHomeTab": { name: "expHomeTab", description: "Gives the channel page a regular home tab, instead of the icon tab.", value: false, locked: false }, "expRoboto": { name: "expRoboto", description: "Makes the site use the Roboto font.", value: false, locked: false }, "expCenteredSearch": { name: "expCenteredSearch", description: "Centers the searchbar. Intended to be used with the Polymer layout recreation.", value: false, locked: false }, "expBigSearch": { name: "expBigSearch", description: "Taller search bar from certain eras of Polymer.", value: false, locked: false }, "expSecondarySearchIcon": { name: "expSecondarySearchIcon", description: "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.", value: false, locked: false }, "expMaterialSearch": { name: "expMaterialSearch", description: "Material search bar from 2016 Polymer, and some Hitchhiker experiements.", value: false, locked: false }, "expPolymerAccountMenu": { name: "expPolymerAccountMenu", description: "Use the account menu from Polymer.", value: false, locked: false }, "expPolymerShell": { name: "expPolymerShell", description: "Changes the topbar, guide, and some other things to look like they did in Polymer Gen 1 (2017-2019).", value: false, locked: false }, "expEarlyPolymerShell": { name: "expEarlyPolymerShell", description: "Changes the topbar, guide, and some other things to look like they did in the Polymer Beta/Polymer Gen 0 (2016-2017).", value: false, locked: false }, "expEarlyPolymerGuide": { name: "expEarlyPolymerGuide", description: "Makes the guide items 48px tall.", value: false, locked: false }, "expPolymerGen2Colors": { name: "expPolymerGen2Colors", description: "Makes the site use the colors it did in Polymer Gen 2 (2020-2022).", value: false, locked: false }, "expPolymerSubscribe": { name: "expPolymerSubscribe", description: "Makes the subscribe button use the Polymer Gen 1 style (sub count inside the button)", value: false, locked: false }, "expPolymerGen2Subscribe": { name: "expPolymerGen2Subscribe", description: "Makes the subscribe button use the Polymer Gen 2 style (sub count not inside the button)", value: false, locked: false }, "expPolymerStyles": { name: "expPolymerStyles", description: "Makes video renderers and other things look like Polymer.", value: false, locked: false }, "expBetaPolymerStyles": { name: "expBetaPolymerStyles", description: "Styles some things to look like 2016 Polymer.", value: false, locked: false }, "expPolymerChannels": { name: "expPolymerChannels", description: "2017 onwards channels.", value: false, locked: false }, "expColorfulChannels": { name: "expColorfulChannels", description: "Colorful material channels from the 2016 polymer beta. Requires MATERIAL_C4 to be enabled.", value: false, locked: false }, "expPolymerComments": { name: "expPolymerComments", description: "Polymer comments.", value: false, locked: false }, "expPolymerTooltips": { name: "expPolymerTooltips", description: "Polymer tooltips.", value: false, locked: false }, "expTopbarShadow": { name: "expTopbarShadow", description: "Use the topbar shadow, which was used from 2016-2019 in Polymer.", value: false, locked: false }, "expMaterialSignIn": { name: "expMaterialSignIn", description: "Red Material sign in button.", value: false, locked: false }, "expRichGridHome": { name: "expRichGridHome", description: "Makes the homepage videos really big.", value: false, locked: false }, "expWatch9A": { name: "expWatch9A", description: "Enables the watch layout used from 2016-2019 in Polymer. Not the same as expWatch9.", value: false, locked: false }, "expWatch9B": { name: "expWatch9B", description: "Enables the watch layout used from 2020-2022 in Polymer. Not the same as expWatch9.", value: false, locked: false }, "expWatch10Beta": { name: "expWatch10Beta", description: "Use the weird mid 2022 Watch Metadata Refresh layout.", value: false, locked: false }, "expWatch10": { name: "expWatch10", description: "Use the current (as of Late 2024) watch layout.", value: false, locked: false }, "expCommentsTeaser": { name: "expCommentsTeaser", description: "Watch10 comments button.", value: false, locked: false }, "expSegmentedLtod": { name: "expSegmentedLtod", description: "Watch10 like and dislike buttons will be together instead of separate.", value: false, locked: false }, "expRoundedSubscribe": { name: "expRoundedSubscribe", description: "Use the rounded subscribe button from Late 2022 onwards.", value: false, locked: false }, "expBlackSubscribe": { name: "expBlackSubscribe", description: "Use the black (or white in dark mode) subscribe button from Late 2022 onwards.", value: false, locked: false }, "expRoundedThumbs": { name: "expRoundedThumbs", description: "Use rounded thumbnails from Late 2022 onwards.", value: false, locked: false }, "expRoundedPlayer": { name: "expRoundedPlayer", description: "Use rounded player from Mid 2023 onwards.", value: false, locked: false }, "expRoundedSearch": { name: "expRoundedSearch", description: "Use the rounded searchbar from Late 2022 onwards.", value: false, locked: false }, "expRoundedGuide": { name: "expRoundedGuide", description: "Use the Amsterdam Guide from Late 2022 onwards.", value: false, locked: false }, "expRoundedStyles": { name: "expRoundedStyles", description: "Rounded (Amsterdam) styles in general.", value: false, locked: false }, "expFrostedGlass": { name: "expFrostedGlass", description: "Use the semi-transparent frosted glass topbar that was being tested in late 2024.", value: false, locked: false }, "expPolymerGen3Colors": { name: "expPolymerGen3Colors", description: "Use the all-white color scheme of Amsterdam.", value: false, locked: false }, "expYTSansTitle": { name: "expYTSansTitle", description: "The video title will use the YouTube Sans font, like it did in watch10 beta, and final watch10 until late 2023.", value: false, locked: false }, "expWMRButtonsLowercase": { name: "expWMRButtonsLowercase", description: "Makes the Polymer watch layouts use lowercase buttons.", value: false, locked: false }, "expWMRAddTo": { name: "expWMRAddTo", description: "Makes the Polymer watch layouts use a plus icon for the add-to/save button.", value: false, locked: false }, "expWMRNoSaveText": { name: "expWMRNoSaveText", description: "Makes the Polymer watch layouts' save/addto button show the icon only.", value: false, locked: false }, "expWMRNoShareText": { name: "expWMRNoShareText", description: "Makes the Polymer watch layouts' share button show the icon only.", value: false, locked: false }, "expOutlineIcons": { name: "expOutlineIcons", description: "Use the outline icons that were introduced in 2021.", value: false, locked: false }, "expRoundedTopbarPfp": { name: "expRoundedTopbarPfp", description: "Makes the topbar pfp round like it was in 2016 onwards.", value: false, locked: false }, "expUploadIcon": { name: "expUploadIcon", description: "Replace the upload button with the upload icon from 2016-2018-ish.", value: false, locked: false }, "expCreateIcon": { name: "expCreateIcon", description: "Replace the upload button with the create icon from 2018-present.", value: false, locked: false }, "expYouTubeApps": { name: "expYouTubeApps", description: "Add the YouTube apps button, used in Polymer until it was removed in 2022.", value: false, locked: false }, "expRingo2": { name: "expRingo2", description: "Use YouTube's experimental Ringo2 rebrand, which makes the logo slightly pink, as well as the progressbar a red to pink gradient. Also applies the ringo2 coloring to red buttons and other red elements.", value: false, locked: false }, "exp2024Favicon": { name: "exp2024Favicon", description: "Make the site use the new pinkish 2024 Ringo2 favicon.", value: false, locked: false }, "exp2024FaviconOld": { name: "exp2024FaviconOld", description: "Make the site use an older version of the new pinkish 2024 Ringo2 favicon.", value: false, locked: false }, "exp2017Favicon": { name: "exp2017Favicon", description: "Make the site use the 2017-2024 Ringo favicon.", value: false, locked: false }, "exp2015Favicon": { name: "exp2015Favicon", description: "Make the site use the 2015-2017 favicon.", value: false, locked: false }, "exp2012Favicon": { name: "exp2012Favicon", description: "Make the site use the 2012-2015 favicon.", value: false, locked: false }, "exp2010Favicon": { name: "exp2010Favicon", description: "Make the site use the 2010-2012 favicon.", value: false, locked: false }, "exp2005Favicon": { name: "exp2005Favicon", description: "Make the site use the 2005-2010 favicon.", value: false, locked: false }, "expHideYoodles": { name: "expHideYoodles", description: "Hide YouTube Doodles because they break the styling of the logo on some layouts.", value: false, locked: false }, "expFixedShareIcons": { name: "expFixedShareIcons", description: "Some share options incorrectly appear as Facebook. This option fixes some of them.", value: false, locked: false }, "expFixedXIcon": { name: "expFixedXIcon", description: "Makes the X share option use the modern icon, as opposed to the pre-2023 icon.", value: false, locked: false }, "expMaterialGbar": { name: "expMaterialGbar", description: "Gives the modern gbar a Material-ish skin. Requires V3's MODERN_GBAR_DELEGATION to be enabled.", value: false, locked: false } }; function executeRadios(i, x) { if (i == "layoutMode") { if (x == "manual") { STS.expAdaptiveLayout = false; } else { STS.expAdaptiveLayout = true; // SRS.layoutSelect = "passive"; } } else if (i == "layoutSelect") { if (x == "amst2024c") { ST2019Settings(); ST2020Settings(); ST2021Settings(); ST2022Settings(); STAmsterdamSettings(); } else if (x == "poly2022") { ST2019Settings(); ST2020Settings(); ST2021Settings(); ST2022Settings(); } else if (x == "poly2021") { ST2019Settings(); ST2020Settings(); ST2021Settings(); } else if (x == "poly2020") { ST2019Settings(); ST2020Settings(); } else if (x == "poly2019") { ST2019Settings(); } else if (x == "poly2018") { ST2019Settings(); ST2018PolySettings(); } else if (x == "poly2017") { ST2019Settings(); ST2018PolySettings(); ST2017PolySettings(); } else if (x == "poly2016") { ST2019Settings(); ST2018PolySettings(); ST2017PolySettings(); ST2016PolySettings(); } else if (x == "hh2024") { STModernHitchhikerSettings(); ST2016Settings(); ST2017Settings(); ST2018Settings(); STRingo2(); } else if (x == "hh2018") { STModernHitchhikerSettings(); ST2016Settings(); ST2017Settings(); ST2018Settings(); } else if (x == "hh2017") { STModernHitchhikerSettings(); ST2016Settings(); ST2017Settings(); } else if (x == "hh2016") { STModernHitchhikerSettings(); ST2016Settings(); } else if (x == "hh2015") { STModernHitchhikerSettings(); } else if (x == "hh2014") { STModernHitchhikerSettings(); ST2014Settings(); STWatch7(); } else if (x == "hh2013_3") { STModernHitchhikerSettings(); ST2014Settings(); ST2013Settings(); STWatch7(); } else if (x == "hh2013_2") { STModernHitchhikerSettings(); ST2014Settings(); ST2013Settings(); STMid2013Settings(); STWatch7(); } else if (x == "hh2013_1") { STModernHitchhikerSettings(); ST2014Settings(); ST2013Settings(); STMid2013Settings(); STEarly2013Settings(); STWatch7(); } else if (x == "epic2012_1") { STEpicPandaSettings(); } else if (x == "epic2012_2") { STEpicPandaSettings(); STEpicPandaRealSettings(); } else if (x == "cosmic2012_1") { STCosmicPandaSettings(); } else if (x == "cosmic2012_2") { STCosmicPandaSettings(); STCosmicPandaMidSettings(); } else if (x == "cosmic2012_3") { STCosmicPandaSettings(); STCosmicPandaMidSettings(); STCosmicPandaLateSettings(); } else if (x == "aozora2011_2") { STCosmicPandaSettings(); STAozoraSettings(); } else if (x == "stargazer2009_3") { STStargazerSettings(); } else if (x == "stargazer2009_2") { STStargazerSettings(); STStargazerMid2009Settings(); } else if (x == "stargazer2009_1") { STStargazerSettings(); STStargazerMid2009Settings(); STStargazerEarly2009Settings(); } else if (x == "stargazer2008_1") { STStargazerSettings(); STStargazerMid2009Settings(); STStargazerEarly2009Settings(); STStargazer2008Settings(); } else if (x == "hhE2017") { STModernHitchhikerSettings(); ST2016Settings(); STEarly2017Settings(); } else if (x == "hhM2016") { STModernHitchhikerSettings(); ST2016Settings(); STMid2016Settings(); } else if (x == "hhE2016") { STModernHitchhikerSettings(); STEarly2016Settings(); } else if (x == "hhE2015") { STModernHitchhikerSettings(); STEarly2015Settings(); } } else if (i == "faviconSelect") { if (x == "2024") { STS.exp2024Favicon = true; STS.exp2024FaviconOld = false; STS.exp2017Favicon = false; STS.exp2015Favicon = false; STS.exp2012Favicon = false; STS.exp2010Favicon = false; STS.exp2005Favicon = false; } else if (x == "2024_old") { STS.exp2024Favicon = false; STS.exp2024FaviconOld = true; STS.exp2017Favicon = false; STS.exp2015Favicon = false; STS.exp2012Favicon = false; STS.exp2010Favicon = false; STS.exp2005Favicon = false; } else if (x == "2017") { STS.exp2024Favicon = false; STS.exp2024FaviconOld = false; STS.exp2017Favicon = true; STS.exp2015Favicon = false; STS.exp2012Favicon = false; STS.exp2010Favicon = false; STS.exp2005Favicon = false; } else if (x == "2015") { STS.exp2024Favicon = false; STS.exp2024FaviconOld = false; STS.exp2017Favicon = false; STS.exp2015Favicon = true; STS.exp2012Favicon = false; STS.exp2010Favicon = false; STS.exp2005Favicon = false; } else if (x == "2012") { STS.exp2024Favicon = false; STS.exp2024FaviconOld = false; STS.exp2017Favicon = false; STS.exp2015Favicon = false; STS.exp2012Favicon = true; STS.exp2010Favicon = false; STS.exp2005Favicon = false; } else if (x == "2010") { STS.exp2024Favicon = false; STS.exp2024FaviconOld = false; STS.exp2017Favicon = false; STS.exp2015Favicon = false; STS.exp2012Favicon = false; STS.exp2010Favicon = true; STS.exp2005Favicon = false; } else if (x == "2005") { STS.exp2024Favicon = false; STS.exp2024FaviconOld = false; STS.exp2017Favicon = false; STS.exp2015Favicon = false; STS.exp2012Favicon = false; STS.exp2010Favicon = false; STS.exp2005Favicon = true; } } else if (i == "gbarVersion") { if (x == "modern") { setV3Settings("modernGbar"); STS.expMaterialGbar = false; } else if (x == "classic") { setV3Settings("classicGbar"); STS.expMaterialGbar = false; } else if (x == "material") { STS.expMaterialGbar = true; setV3Settings("materialGbar"); } else if (x == "off") { setV3Settings("noGbar"); } else if (x == "passive") { STS.expMaterialGbar = false; } } else if (i == "accountMenu") { if (x == "me") { STS.expAccountMenu = false; STS.expPolymerAccountMenu = false; } else if (x == "mhh") { STS.expAccountMenu = true; STS.expPolymerAccountMenu = false; } else if (x == "poly") { STS.expAccountMenu = false; STS.expPolymerAccountMenu = true; } } else if (i == "playerVersion") { if (x == "auto") { setV3Settings("defaultPlayer"); } else if (x == "modernV2") { STS.expModernPlayer = false; STS.expModernPlayerV2 = true; } else if (x == "modernV1") { setV3Settings("defaultPlayer"); STS.expModernPlayer = true; STS.expModernPlayerV2 = false; } else if (x == "default2014") { setV3Settings("defaultPlayer"); STS.expModernPlayer = false; STS.expModernPlayerV2 = false; } else if (x == "flash7") { setV3Settings("flash7Player"); STS.expModernPlayer = false; STS.expModernPlayerV2 = false; } else if (x == "embed") { setV3Settings("embedPlayer"); STS.expModernPlayer = false; STS.expModernPlayerV2 = false; } } else if (i == "playerSizerules") { if (STS.expStaticSite == true && STS.expStaticSiteForcesSmallPlayer == true) { setV3Settings("noFlexwatch"); } else { if (x == "passive") { /*if ( SRS.layoutSelect == "hh2013_1" || SRS.layoutSelect == "hh2013_2" || SRS.layoutSelect == "hh2013_3" || SRS.layoutSelect == "hh2014" ) { setV3Settings("noFlexwatch"); } else { setV3Settings("flexwatchMini"); }*/ setV3Settings("flexwatchMini"); } else if (x == "auto") { if ( SRS.layoutSelect == "hh2013_1" || SRS.layoutSelect == "hh2013_2" || SRS.layoutSelect == "hh2013_3" || SRS.layoutSelect == "hh2014" ) { setV3Settings("noFlexwatch"); } else if ( SRS.layoutSelect == "hhE2015" || SRS.layoutSelect == "hh2015" || SRS.layoutSelect == "hhE2016" || SRS.layoutSelect == "hhM2016" || SRS.layoutSelect == "hh2016" || SRS.layoutSelect == "hhE2017" || SRS.layoutSelect == "hh2017" || SRS.layoutSelect == "hh2018" || SRS.layoutSelect == "hh2024" || SRS.layoutSelect == "poly2016" ) { setV3Settings("flexwatchMiniV2"); } else if ( SRS.layoutSelect == "poly2017" || SRS.layoutSelect == "poly2018" || SRS.layoutSelect == "poly2019" || SRS.layoutSelect == "poly2020" || SRS.layoutSelect == "poly2021" || SRS.layoutSelect == "poly2022" || SRS.layoutSelect == "amst2024c" ) { setV3Settings("flexwatchLarge"); } else { setV3Settings("flexwatchMini"); } } else if (x == "noFlexwatch") { setV3Settings("noFlexwatch"); } else if (x == "flexwatchMini") { setV3Settings("flexwatchMini"); } else if (x == "flexwatchMiniV2") { setV3Settings("flexwatchMiniV2"); $("html").setAttribute("custom-sizerules",""); $("html").setAttribute("flexwatch-mini-v2",""); } else if (x == "flexwatchMedium") { setV3Settings("flexwatchMedium"); $("html").setAttribute("custom-sizerules",""); $("html").setAttribute("flexwatch-medium",""); } else if (x == "flexwatchLarge") { setV3Settings("flexwatchLarge"); $("html").setAttribute("custom-sizerules",""); $("html").setAttribute("flexwatch-large",""); } } } else if (i == "watchLayout") { if (x == "auto") { } else if (x == "autoPreferAltW9") { if ( SRS.layoutSelect == "hh2013_1" || SRS.layoutSelect == "hh2013_2" || SRS.layoutSelect == "hh2013_3" || SRS.layoutSelect == "hh2014" || SRS.layoutSelect == "hhE2015" || SRS.layoutSelect == "hh2015" || SRS.layoutSelect == "hhE2016" || SRS.layoutSelect == "hhM2016" || SRS.layoutSelect == "hh2016" || SRS.layoutSelect == "hhE2017" || SRS.layoutSelect == "hh2017" || SRS.layoutSelect == "hh2018" || SRS.layoutSelect == "hh2024") { STAltWatch9(); } } else if (x == "altWatch9") { STAltWatch9(); } else if (x == "altWatch9Fancy") { STAltWatch9Fancy(); } } else if (i == "relatedTabs") { if (x == "on") { STS.expRelatedTabs = true; STS.expRelatedTabsHoldsSubscribe = true; } else if (x == "onNoSub") { STS.expRelatedTabs = true; STS.expRelatedTabsHoldsSubscribe = false; } else if (x == "off") { STS.expRelatedTabs = false; STS.expRelatedTabsHoldsSubscribe = false; STS.expWatch9NoOwner = false; } } else if (i == "relatedGrid") { if (x == "on") { STS.expRelatedGrid = true; } else if (x == "off") { STS.expRelatedGrid = false; } } else if (i == "relatedSize") { if (x == "stupid") { STS.expRelatedThumbsSizeStupid = true; STS.expRelatedThumbsSizeLarge = false; STS.expRelatedThumbsSizeMedium = false; STS.expRelatedThumbsSizeSmaller = false; } else if (x == "large") { STS.expRelatedThumbsSizeStupid = false; STS.expRelatedThumbsSizeLarge = true; STS.expRelatedThumbsSizeMedium = false; STS.expRelatedThumbsSizeSmaller = false; } else if (x == "medium") { STS.expRelatedThumbsSizeStupid = false; STS.expRelatedThumbsSizeLarge = false; STS.expRelatedThumbsSizeMedium = true; STS.expRelatedThumbsSizeSmaller = false; } else if (x == "small") { STS.expRelatedThumbsSizeStupid = false; STS.expRelatedThumbsSizeLarge = false; STS.expRelatedThumbsSizeMedium = false; STS.expRelatedThumbsSizeSmaller = false; } else if (x == "smaller") { STS.expRelatedThumbsSizeStupid = false; STS.expRelatedThumbsSizeLarge = false; STS.expRelatedThumbsSizeMedium = false; STS.expRelatedThumbsSizeSmaller = true; } } else if (i == "compactDate") { if (x == "on") { STS.expAlwaysShowCompactDate = true; STS.expNeverShowCompactDate = false; } else if (x == "off") { STS.expAlwaysShowCompactDate = false; STS.expNeverShowCompactDate = true; } else if (x == "hover") { STS.expAlwaysShowCompactDate = false; STS.expNeverShowCompactDate = false; } } else if (i == "guideNavToFeed") { if (x == "auto") { if ( SRS.layoutSelect == "cosmic2012_1" || SRS.layoutSelect == "cosmic2012_2" || SRS.layoutSelect == "cosmic2012_3" ) { setV3Settings("guideFeed"); } else { setV3Settings("guideChannel"); } } else if (x == "on") { setV3Settings("guideFeed"); } else if (x == "off") { setV3Settings("guideChannel"); } } else if (i == "guideAlwaysPinned") { if (x == "on") { STS.expGuideAlwaysPinned = true; } else if (x == "off") { STS.expGuideAlwaysPinned = false; } } else if (i == "channelVersion") { if (x == "c4") { STS.expChannels3 = false; } else if (x == "c3") { STS.expChannels3 = true; } } else if (i == "colorfulChannels") { if (x == "auto") { if ( SRS.layoutSelect == "poly2016" ) { STS.expColorfulChannels = true; setV3Settings("colorfulChannels"); } else { STS.expColorfulChannels = false; setV3Settings("normalChannels"); } } else if (x == "polymer") { if ( SRS.layoutSelect == "poly2016" || SRS.layoutSelect == "poly2017" || SRS.layoutSelect == "poly2018" || SRS.layoutSelect == "poly2019" || SRS.layoutSelect == "poly2020" || SRS.layoutSelect == "poly2021" || SRS.layoutSelect == "poly2022" ) { STS.expColorfulChannels = true; setV3Settings("colorfulChannels"); } else { STS.expColorfulChannels = false; setV3Settings("normalChannels"); } } else if (x == "on") { STS.expColorfulChannels = true; setV3Settings("colorfulChannels"); } else if (x == "v3version") { STS.expColorfulChannels = false; setV3Settings("colorfulChannels"); } else if (x == "off") { STS.expColorfulChannels = false; setV3Settings("normalChannels"); } } applySettings(); } executeRadiosParent(SRS); function executeRadiosParent(text) { executeRadios("layoutMode", text.layoutMode, true); executeRadios("layoutSelect", text.layoutSelect, true); executeRadios("faviconSelect", text.faviconSelect, true); executeRadios("gbarVersion", text.gbarVersion, true); executeRadios("accountMenu", text.accountMenu, true); executeRadios("playerVersion", text.playerVersion, true); executeRadios("playerSizerules", text.playerSizerules, true); executeRadios("watchLayout", text.watchLayout, true); executeRadios("relatedTabs", text.relatedTabs, true); executeRadios("relatedGrid", text.relatedGrid, true); executeRadios("relatedSize", text.relatedSize, true); executeRadios("compactDate", text.compactDate, true); executeRadios("guideNavToFeed", text.guideNavToFeed, true); executeRadios("guideAlwaysPinned", text.guideAlwaysPinned, true); executeRadios("channelVersion", text.channelVersion, true); executeRadios("colorfulChannels", text.colorfulChannels, true); } getIronSettings(); function STAltWatch9() { STS.expRelatedTabs = true; STS.expRelatedTabsHoldsSubscribe = true; STS.expWatch9 = true; STS.expWatch9NoOwner = true; STS.expWatch9TrueExpander = false; STS.expVerticalWatch9 = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expWatch9ReportTab = true; STS.expRelatedGrid = false; STS.expWatch8 = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = false; STS.expWatch5D = false; STS.expWatch5C = false; STS.expWatch9A = false; STS.expWatch9B = false; STS.expWatch10Beta = false; STS.expWatch10 = false; STS.expCommentsTeaser = false; STS.expSegmentedLtod = false; STS.expRoundedSubscribe = false; STS.expBlackSubscribe = false; STS.expWMRButtonsLowercase = false; STS.expWMRAddTo = false; STS.expWMRNoSaveText = false; STS.expWMRNoShareText = false; STS.expNoVideosLink = false; } function STAltWatch9Fancy() { 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.expWatch5D = false; STS.expWatch5C = false; STS.expWatch9A = false; STS.expWatch9B = false; STS.expWatch10Beta = false; STS.expWatch10 = false; STS.expCommentsTeaser = false; STS.expSegmentedLtod = false; STS.expRoundedSubscribe = false; STS.expBlackSubscribe = false; STS.expWMRButtonsLowercase = false; STS.expWMRAddTo = false; STS.expWMRNoSaveText = false; STS.expWMRNoShareText = false; STS.expNoVideosLink = false; } function STWatch7() { STS.expRelatedTabs = false; STS.expRelatedTabsHoldsSubscribe = false; STS.expWatch9 = false; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expVerticalWatch9 = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expRelatedGrid = false; STS.expWatch8 = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = false; STS.expWatch5D = false; STS.expWatch5C = false; STS.expWatch9A = false; STS.expWatch9B = false; STS.expWatch10Beta = false; STS.expWatch10 = false; STS.expCommentsTeaser = false; STS.expSegmentedLtod = false; STS.expRoundedSubscribe = false; STS.expBlackSubscribe = false; STS.expWMRButtonsLowercase = false; STS.expWMRAddTo = false; STS.expWMRNoSaveText = false; STS.expWMRNoShareText = false; } function STModernHitchhikerSettings() { STS.expHomepageRedirectsToFeed = false; STS.expLogoLinksToFeed = false; STS.expLogoLinksToSubs = false; STS.expLinkToGridSubs = true; STS.expRelatedThumbsSizeSmaller = false; STS.expRelatedThumbsSizeMedium = false; STS.expRelatedThumbsSizeLarge = false; STS.expRelatedThumbsSizeStupid = false; STS.expAlwaysShowCompactDate = false; STS.expNeverShowCompactDate = false; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = false; STS.expMoveGuideButtonToTopbar = false; STS.expRelatedTabs = false; STS.expRelatedTabsHoldsSubscribe = false; STS.expWatch9 = false; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expVerticalWatch9 = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expWatch9ReportTab = false; STS.expRelatedGrid = false; STS.expWatch8 = true; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = true; STS.expSharrow = false; STS.expGuideAlwaysPinned = false; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = false; STS.expTwoColumnSearchResults = false; STS.configNoTabTopBorder = true; STS.configWatch7SidebarCardShadow = true; STS.expFlatLogo = false; STS.expInvertLogo = false; STS.expGlossyLogo = false; STS.expClassicTitle = false; STS.expClassicGuide = false; STS.expClassicSubscribe = false; STS.expClassicStyles = false; STS.expClassicLtod = false; STS.expClassicButtons = false; STS.expBigSearchThumbs = false; STS.expBiggerSearchThumbs = false; STS.expNoVideosLink = true; STS.expSkinnySubscribe = true; STS.expModernStyles = true; STS.expModernCards = true; STS.expLightChannelBar = true; STS.expModernNotifIcon = false; STS.expModernTopbar = true; STS.expModernUpload = true; STS.expModernGuideButton = false; STS.expModernSearchIcon = false; STS.expSearchText = false; STS.expModernTitle = false; STS.expModernGuide = false; STS.expModernHome = true; STS.expModernPlaylists = true; STS.expModernPlaylistThumbnails = true; STS.expPlaylistRedBorder = true; STS.expPlaylistTimestamps = true; STS.expTrueScrollableGuide = true; STS.expModernPlayer = true; STS.expModernPlayerV2 = false; STS.expViewsString = false; STS.expGoogleApps = false; STS.expCommentsFullWidth = true; STS.expNoByText = false; STS.expAccountMenu = true; STS.expStaticSite = false; STS.expHideAppbar = false; STS.expEpicWatch7 = false; STS.expEpicWatch7Flat = false; STS.expEpicHeader = false; STS.expEpicStyling = false; STS.expEpicFeeds = false; STS.expCosmicHeader = false; STS.expCosmicBG = false; STS.expCosmicButtons = false; STS.expCosmicStyles = false; STS.expCosmicBanners = false; STS.expCosmicBannersV2 = false; STS.expCosmicComments = false; STS.expCosmicGuideStyle = false; STS.expCosmicGuideLayout = false; STS.expCosmicFeedsV1 = false; STS.expCosmicFeedsV2 = false; STS.expCosmicFeedsV3 = false; STS.expCosmicFeedsThirdColumn = false; STS.expWatch5D = false; STS.expNotifSquare = false; STS.expChannels3 = false; STS.expChannels3TimeVisible = false; STS.expChannels3DateVisible = false; STS.expChannels3DateHidden = false; STS.expNoGuide = false; STS.expGuideOnFeedsOnly = false; STS.expAozoraHome = false; STS.expAozoraHeader = false; STS.expAozoraBG = false; STS.expAozoraStyles = false; STS.expAozoraComments = false; STS.expAozoraSubscribe = false; STS.expAozoraTopbarLinks = false; STS.expAozoraSearch = false; STS.expWatch5C = false; STS.expStargazerTabbedHeader = false; STS.expStargazerBarHeader = false; STS.expStargazerSimpleHeader = false; STS.expStargazerSubscribe = false; STS.expHomeTab = true; STS.expRoboto = false; STS.expCenteredSearch = false; STS.expBigSearch = false; STS.expSecondarySearchIcon = false; STS.expMaterialSearch = false; STS.expPolymerAccountMenu = false; STS.expPolymerShell = false; STS.expEarlyPolymerShell = false; STS.expEarlyPolymerGuide = false; STS.expPolymerGen2Colors = false; STS.expPolymerSubscribe = false; STS.expPolymerGen2Subscribe = false; STS.expPolymerStyles = false; STS.expBetaPolymerStyles = false; STS.expPolymerChannels = false; STS.expColorfulChannels = false; STS.expPolymerComments = false; STS.expPolymerTooltips = false; STS.expTopbarShadow = false; STS.expMaterialSignIn = false; STS.expRichGridHome = false; STS.expWatch9A = false; STS.expWatch9B = false; STS.expWatch10Beta = false; STS.expWatch10 = false; STS.expCommentsTeaser = false; STS.expSegmentedLtod = false; STS.expRoundedSubscribe = false; STS.expBlackSubscribe = false; STS.expRoundedThumbs = false; STS.expRoundedPlayer = false; STS.expRoundedSearch = false; STS.expRoundedGuide = false; STS.expRoundedStyles = false; STS.expFrostedGlass = false; STS.expPolymerGen3Colors = false; STS.expYTSansTitle = false; STS.expWMRButtonsLowercase = false; STS.expWMRAddTo = false; STS.expWMRNoSaveText = false; STS.expWMRNoShareText = false; STS.expOutlineIcons = false; STS.expRoundedTopbarPfp = false; STS.expUploadIcon = false; STS.expCreateIcon = false; STS.expYouTubeApps = false; STS.expRingo2 = false; STS.exp2024Favicon = false; STS.exp2024FaviconOld = false; STS.exp2017Favicon = false; STS.exp2015Favicon = true; STS.exp2012Favicon = false; STS.exp2010Favicon = false; STS.exp2005Favicon = false; STS.expHideYoodles = false; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("nirvana15"); } } function STEarly2015Settings() { STS.expTrueScrollableGuide = false; STS.expModernPlayer = false; STS.exp2015Favicon = false; STS.exp2012Favicon = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("nirvana15Early"); } } function ST2016Settings() { STS.expRelatedThumbsSizeLarge = true; STS.expSharrow = true; STS.expFlatLogo = true; STS.expModernNotifIcon = true; STS.expModernGuideButton = true; STS.expModernSearchIcon = true; STS.expSearchText = true; STS.expModernTitle = true; STS.expModernGuide = true; STS.expModernHome = true; STS.expPlaylistRedBorder = false; STS.expTrueScrollableGuide = true; STS.expModernPlayer = false; STS.expModernPlayerV2 = true; STS.expViewsString = true; STS.expNoByText = true; STS.expHomeTab = true; STS.expRoboto = true; STS.expRoundedTopbarPfp = true; STS.expHideYoodles = true; STS.exp2015Favicon = true; STS.exp2012Favicon = false; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("nirvana16"); } } function STEarly2016Settings() { STS.expSharrow = true; STS.expFlatLogo = true; STS.expModernGuideButton = true; STS.expModernSearchIcon = true; STS.expModernGuide = true; STS.expModernHome = true; STS.expTrueScrollableGuide = true; STS.expNoByText = true; STS.expHomeTab = true; STS.expRoboto = true; STS.expRoundedTopbarPfp = true; STS.expHideYoodles = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("nirvana15"); } } function STMid2016Settings() { STS.expRelatedThumbsSizeLarge = false; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("nirvana16"); } } function STEarly2017Settings() { STS.expBigSearchThumbs = true; STS.expUploadIcon = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("nirvana16"); } } function ST2017Settings() { STS.expFlatLogo = false; STS.expInvertLogo = true; STS.expBigSearchThumbs = true; STS.expUploadIcon = true; STS.exp2017Favicon = true; STS.exp2015Favicon = false; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("nirvana16"); } } function ST2018Settings() { STS.expUploadIcon = false; STS.expCreateIcon = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("nirvana16"); } } function STRingo2() { STS.expRingo2 = true; STS.exp2024Favicon = true; STS.exp2024FaviconOld = false; STS.exp2017Favicon = false; } function STIdealLayout() { STS.expVerticalWatch9 = true; STS.expWatch9SidebarBus = true; STS.expWatch9StickyColumns = true; STS.expRelatedGrid = true; STS.expGuideAlwaysPinned = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("nirvana16"); } } function ST2014Settings() { STS.expModernStyles = false; STS.expLightChannelBar = false; STS.expModernNotifIcon = false; STS.expModernGuideButton = false; STS.expModernSearchIcon = false; STS.expModernHome = true; STS.expModernTopbar = false; STS.expModernPlaylistThumbnails = false; STS.expTrueScrollableGuide = false; STS.expModernPlayer = false; STS.expModernPlayerV2 = false; STS.expAccountMenu = false; STS.exp2015Favicon = false; STS.exp2012Favicon = true; STS.expHideYoodles = false; STS.expNoVideosLink = false; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("nirvana14"); } } function ST2013Settings() { STS.expModernCards = false; STS.expModernPlaylists = false; STS.expPlaylistRedBorder = false; STS.expPlaylistTimestamps = false; STS.expNoVideosLink = false; STS.expHomeTab = false; STS.expModernHome = false; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("hitchhiker13"); } } function STMid2013Settings() { STS.expSkinnySubscribe = false; STS.expAozoraHome = true; STS.expClassicLtod = true; STS.expNotifSquare = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("hitchhiker13mid"); } } function STEarly2013Settings() { STS.expChannels3 = true; STS.expChannels3TimeVisible = true; STS.expChannels3DateVisible = true; STS.expChannels3DateHidden = false; STS.expClassicTitle = true; STS.expClassicGuide = true; STS.expClassicSubscribe = true; STS.expClassicStyles = true; STS.expClassicLtod = true; STS.expClassicButtons = true; STS.expAozoraHome = true; STS.expNotifSquare = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("hitchhiker13early"); } } function STEpicPandaSettings() { STS.expHomepageRedirectsToFeed = false; STS.expLogoLinksToFeed = false; STS.expLogoLinksToSubs = false; STS.expLinkToGridSubs = false; STS.expRelatedThumbsSizeSmaller = false; STS.expRelatedThumbsSizeMedium = false; STS.expRelatedThumbsSizeLarge = false; STS.expRelatedThumbsSizeStupid = false; STS.expAlwaysShowCompactDate = false; STS.expNeverShowCompactDate = false; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = true; STS.expMoveGuideButtonToTopbar = false; STS.expRelatedTabs = false; STS.expRelatedTabsHoldsSubscribe = false; STS.expWatch9 = false; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expVerticalWatch9 = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expWatch9ReportTab = false; STS.expRelatedGrid = false; STS.expWatch8 = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = false; STS.expGuideAlwaysPinned = false; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = true; STS.expTwoColumnSearchResults = false; STS.configNoTabTopBorder = true; STS.configWatch7SidebarCardShadow = true; STS.expFlatLogo = false; STS.expInvertLogo = false; STS.expGlossyLogo = false; STS.expClassicTitle = false; STS.expClassicGuide = false; STS.expClassicSubscribe = true; STS.expClassicStyles = false; STS.expClassicLtod = false; STS.expClassicButtons = true; STS.expBigSearchThumbs = false; STS.expBiggerSearchThumbs = false; STS.expNoVideosLink = false; STS.expSkinnySubscribe = true; STS.expModernStyles = false; STS.expModernCards = false; STS.expLightChannelBar = false; STS.expModernNotifIcon = false; STS.expModernTopbar = false; STS.expModernUpload = true; STS.expModernGuideButton = false; STS.expModernSearchIcon = false; STS.expSearchText = false; STS.expModernTitle = false; STS.expModernGuide = false; STS.expModernHome = false; STS.expModernPlaylists = false; STS.expModernPlaylistThumbnails = false; STS.expPlaylistRedBorder = false; STS.expTrueScrollableGuide = false; STS.expModernPlayer = false; STS.expModernPlayerV2 = false; STS.expViewsString = false; STS.expGoogleApps = false; STS.expCommentsFullWidth = true; STS.expNoByText = false; STS.expAccountMenu = false; STS.expStaticSite = true; STS.expHideAppbar = true; STS.expEpicWatch7 = true; STS.expEpicWatch7Flat = true; STS.expEpicHeader = true; STS.expEpicStyling = true; STS.expEpicFeeds = false; STS.expCosmicHeader = false; STS.expCosmicBG = false; STS.expCosmicButtons = false; STS.expCosmicStyles = false; STS.expCosmicBanners = false; STS.expCosmicBannersV2 = false; STS.expCosmicComments = true; STS.expCosmicGuideStyle = false; STS.expCosmicGuideLayout = true; STS.expCosmicFeedsV1 = false; STS.expCosmicFeedsV2 = false; STS.expCosmicFeedsV3 = false; STS.expCosmicFeedsThirdColumn = false; STS.expWatch5D = false; STS.expNotifSquare = true; STS.expChannels3 = true; STS.expChannels3TimeVisible = true; STS.expChannels3DateVisible = true; STS.expChannels3DateHidden = false; STS.expNoGuide = false; STS.expGuideOnFeedsOnly = true; STS.expAozoraHome = true; STS.expAozoraHeader = false; STS.expAozoraBG = false; STS.expAozoraStyles = false; STS.expAozoraComments = false; STS.expAozoraSubscribe = false; STS.expAozoraTopbarLinks = false; STS.expAozoraSearch = true; STS.expWatch5C = false; STS.expStargazerTabbedHeader = false; STS.expStargazerBarHeader = false; STS.expStargazerSimpleHeader = false; STS.expStargazerSubscribe = false; STS.expHomeTab = false; STS.expRoboto = false; STS.expCenteredSearch = false; STS.expBigSearch = false; STS.expSecondarySearchIcon = false; STS.expMaterialSearch = false; STS.expPolymerAccountMenu = false; STS.expPolymerShell = false; STS.expEarlyPolymerShell = false; STS.expEarlyPolymerGuide = false; STS.expPolymerGen2Colors = false; STS.expPolymerSubscribe = false; STS.expPolymerGen2Subscribe = false; STS.expPolymerStyles = false; STS.expBetaPolymerStyles = false; STS.expPolymerChannels = false; STS.expColorfulChannels = false; STS.expPolymerComments = false; STS.expPolymerTooltips = false; STS.expTopbarShadow = false; STS.expMaterialSignIn = false; STS.expRichGridHome = false; STS.expWatch9A = false; STS.expWatch9B = false; STS.expWatch10Beta = false; STS.expWatch10 = false; STS.expCommentsTeaser = false; STS.expSegmentedLtod = false; STS.expRoundedSubscribe = false; STS.expBlackSubscribe = false; STS.expRoundedThumbs = false; STS.expRoundedPlayer = false; STS.expRoundedSearch = false; STS.expRoundedGuide = false; STS.expRoundedStyles = false; STS.expFrostedGlass = false; STS.expPolymerGen3Colors = false; STS.expYTSansTitle = false; STS.expWMRButtonsLowercase = false; STS.expWMRAddTo = false; STS.expWMRNoSaveText = false; STS.expWMRNoShareText = false; STS.expOutlineIcons = false; STS.expRoundedTopbarPfp = false; STS.expUploadIcon = false; STS.expCreateIcon = false; STS.expYouTubeApps = false; STS.expRingo2 = false; STS.exp2024Favicon = false; STS.exp2024FaviconOld = false; STS.exp2017Favicon = false; STS.exp2015Favicon = false; STS.exp2012Favicon = true; STS.exp2010Favicon = false; STS.exp2005Favicon = false; STS.expHideYoodles = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("cosmic"); } } function STEpicPandaRealSettings() { STS.expHomepageRedirectsToFeed = true; STS.expLogoLinksToFeed = true; STS.expEpicWatch7 = true; STS.expEpicWatch7Flat = false; STS.expEpicHeader = false; STS.expEpicStyling = true; STS.expEpicFeeds = true; STS.expCosmicHeader = true; STS.expCosmicButtons = true; STS.expAozoraTopbarLinks = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("epicreal"); } } function STCosmicPandaSettings() { STS.expHomepageRedirectsToFeed = true; STS.expLogoLinksToFeed = true; STS.expLogoLinksToSubs = false; STS.expLinkToGridSubs = false; STS.expRelatedThumbsSizeSmaller = false; STS.expRelatedThumbsSizeMedium = false; STS.expRelatedThumbsSizeLarge = false; STS.expRelatedThumbsSizeStupid = false; STS.expAlwaysShowCompactDate = false; STS.expNeverShowCompactDate = false; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = true; STS.expMoveGuideButtonToTopbar = false; STS.expRelatedTabs = false; STS.expRelatedTabsHoldsSubscribe = false; STS.expWatch9 = false; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expVerticalWatch9 = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expWatch9ReportTab = false; STS.expRelatedGrid = false; STS.expWatch8 = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = false; STS.expGuideAlwaysPinned = false; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = false; STS.expTwoColumnSearchResults = false; STS.configNoTabTopBorder = true; STS.configWatch7SidebarCardShadow = true; STS.expFlatLogo = false; STS.expInvertLogo = false; STS.expGlossyLogo = false; STS.expClassicTitle = false; STS.expClassicGuide = false; STS.expClassicSubscribe = false; STS.expClassicStyles = false; STS.expClassicLtod = false; STS.expClassicButtons = false; STS.expBigSearchThumbs = false; STS.expBiggerSearchThumbs = false; STS.expNoVideosLink = false; STS.expSkinnySubscribe = false; STS.expModernStyles = false; STS.expModernCards = false; STS.expLightChannelBar = false; STS.expModernNotifIcon = false; STS.expModernTopbar = false; STS.expModernUpload = true; STS.expModernGuideButton = false; STS.expModernSearchIcon = false; STS.expSearchText = false; STS.expModernTitle = false; STS.expModernGuide = false; STS.expModernHome = false; STS.expModernPlaylists = false; STS.expModernPlaylistThumbnails = false; STS.expPlaylistRedBorder = false; STS.expPlaylistTimestamps = false; STS.expTrueScrollableGuide = true; STS.expModernPlayer = false; STS.expModernPlayerV2 = false; STS.expViewsString = false; STS.expGoogleApps = false; STS.expCommentsFullWidth = true; STS.expNoByText = false; STS.expAccountMenu = false; STS.expStaticSite = true; STS.expHideAppbar = true; STS.expEpicWatch7 = false; STS.expEpicWatch7Flat = false; STS.expEpicHeader = false; STS.expEpicStyling = false; STS.expEpicFeeds = false; STS.expCosmicHeader = true; STS.expCosmicBG = true; STS.expCosmicButtons = true; STS.expCosmicStyles = true; STS.expCosmicBanners = true; STS.expCosmicBannersV2 = false; STS.expCosmicComments = true; STS.expCosmicGuideStyle = true; STS.expCosmicGuideLayout = true; STS.expCosmicFeedsV1 = true; STS.expCosmicFeedsV2 = false; STS.expCosmicFeedsV3 = false; STS.expCosmicFeedsThirdColumn = true; STS.expWatch5D = true; STS.expNotifSquare = true; STS.expChannels3 = true; STS.expChannels3TimeVisible = false; STS.expChannels3DateVisible = false; STS.expChannels3DateHidden = false; STS.expNoGuide = false; STS.expGuideOnFeedsOnly = true; STS.expAozoraHome = true; STS.expAozoraHeader = false; STS.expAozoraBG = false; STS.expAozoraStyles = false; STS.expAozoraComments = false; STS.expAozoraSubscribe = false; STS.expAozoraTopbarLinks = true; STS.expAozoraSearch = true; STS.expWatch5C = false; STS.expStargazerTabbedHeader = false; STS.expStargazerBarHeader = false; STS.expStargazerSimpleHeader = false; STS.expStargazerSubscribe = false; STS.expHomeTab = false; STS.expRoboto = false; STS.expCenteredSearch = false; STS.expBigSearch = false; STS.expSecondarySearchIcon = false; STS.expMaterialSearch = false; STS.expPolymerAccountMenu = false; STS.expPolymerShell = false; STS.expEarlyPolymerShell = false; STS.expEarlyPolymerGuide = false; STS.expPolymerGen2Colors = false; STS.expPolymerSubscribe = false; STS.expPolymerGen2Subscribe = false; STS.expPolymerStyles = false; STS.expBetaPolymerStyles = false; STS.expPolymerChannels = false; STS.expColorfulChannels = false; STS.expPolymerComments = false; STS.expPolymerTooltips = false; STS.expTopbarShadow = false; STS.expMaterialSignIn = false; STS.expRichGridHome = false; STS.expWatch9A = false; STS.expWatch9B = false; STS.expWatch10Beta = false; STS.expWatch10 = false; STS.expCommentsTeaser = false; STS.expSegmentedLtod = false; STS.expRoundedSubscribe = false; STS.expBlackSubscribe = false; STS.expRoundedThumbs = false; STS.expRoundedPlayer = false; STS.expRoundedSearch = false; STS.expRoundedGuide = false; STS.expRoundedStyles = false; STS.expFrostedGlass = false; STS.expPolymerGen3Colors = false; STS.expYTSansTitle = false; STS.expWMRButtonsLowercase = false; STS.expWMRAddTo = false; STS.expWMRNoSaveText = false; STS.expWMRNoShareText = false; STS.expOutlineIcons = false; STS.expRoundedTopbarPfp = false; STS.expUploadIcon = false; STS.expCreateIcon = false; STS.expYouTubeApps = false; STS.expRingo2 = false; STS.exp2024Favicon = false; STS.exp2024FaviconOld = false; STS.exp2017Favicon = false; STS.exp2015Favicon = false; STS.exp2012Favicon = true; STS.exp2010Favicon = false; STS.exp2005Favicon = false; STS.expHideYoodles = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("cosmic"); } } function STCosmicPandaMidSettings() { STS.expCosmicBanners = false; STS.expCosmicBannersV2 = true; STS.expCosmicFeedsV1 = false; STS.expCosmicFeedsV2 = true; STS.expCosmicFeedsV3 = false; STS.expChannels3TimeVisible = true; STS.expChannels3DateVisible = true; STS.expChannels3DateHidden = false; STS.expAozoraSearch = false; } function STCosmicPandaLateSettings() { STS.expCosmicFeedsV1 = false; STS.expCosmicFeedsV2 = false; STS.expCosmicFeedsV3 = true; STS.expChannels3TimeVisible = true; STS.expChannels3DateVisible = true; STS.expChannels3DateHidden = false; STS.expAozoraSearch = false; } function STAozoraSettings() { STS.expHomepageRedirectsToFeed = false; STS.expLogoLinksToFeed = false; STS.expRelatedThumbsSizeSmaller = true; STS.expCosmicHeader = false; STS.expCosmicBG = false; STS.expCosmicButtons = false; STS.expCosmicStyles = false; STS.expCosmicBanners = false; STS.expCosmicComments = false; STS.expCosmicGuideStyle = false; STS.expCosmicGuideLayout = true; STS.expCosmicFeedsV1 = false; STS.expCosmicFeedsV2 = false; STS.expCosmicFeedsV3 = false; STS.expCosmicFeedsThirdColumn = false; STS.expWatch5D = false; STS.expChannels3TimeVisible = false; STS.expChannels3DateVisible = false; STS.expChannels3DateHidden = false; STS.expAozoraHeader = true; STS.expAozoraBG = true; STS.expAozoraStyles = true; STS.expAozoraComments = true; STS.expAozoraSubscribe = true; STS.expWatch5C = true; STS.exp2012Favicon = false; STS.exp2010Favicon = true; } function STStargazerSettings() { STS.expHomepageRedirectsToFeed = false; STS.expLogoLinksToFeed = false; STS.expLogoLinksToSubs = false; STS.expLinkToGridSubs = true; STS.expRelatedThumbsSizeSmaller = true; STS.expRelatedThumbsSizeMedium = false; STS.expRelatedThumbsSizeLarge = false; STS.expRelatedThumbsSizeStupid = false; STS.expAlwaysShowCompactDate = false; STS.expNeverShowCompactDate = false; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = true; STS.expMoveGuideButtonToTopbar = false; STS.expRelatedTabs = false; STS.expRelatedTabsHoldsSubscribe = false; STS.expWatch9 = false; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expVerticalWatch9 = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expWatch9ReportTab = false; STS.expRelatedGrid = false; STS.expWatch8 = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = false; STS.expGuideAlwaysPinned = false; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = false; STS.expTwoColumnSearchResults = false; STS.configNoTabTopBorder = true; STS.configWatch7SidebarCardShadow = true; STS.expFlatLogo = false; STS.expInvertLogo = false; STS.expGlossyLogo = false; STS.expClassicTitle = false; STS.expClassicGuide = false; STS.expClassicSubscribe = false; STS.expClassicStyles = false; STS.expClassicLtod = false; STS.expClassicButtons = false; STS.expBigSearchThumbs = false; STS.expBiggerSearchThumbs = false; STS.expNoVideosLink = false; STS.expSkinnySubscribe = false; STS.expModernStyles = false; STS.expModernCards = false; STS.expLightChannelBar = false; STS.expModernNotifIcon = false; STS.expModernTopbar = false; STS.expModernUpload = true; STS.expModernGuideButton = false; STS.expModernSearchIcon = false; STS.expSearchText = false; STS.expModernTitle = false; STS.expModernGuide = false; STS.expModernHome = false; STS.expModernPlaylists = false; STS.expModernPlaylistThumbnails = false; STS.expPlaylistRedBorder = false; STS.expPlaylistTimestamps = false; STS.expTrueScrollableGuide = true; STS.expModernPlayer = false; STS.expModernPlayerV2 = false; STS.expViewsString = false; STS.expGoogleApps = false; STS.expCommentsFullWidth = true; STS.expNoByText = false; STS.expAccountMenu = false; STS.expStaticSite = true; STS.expHideAppbar = true; STS.expEpicWatch7 = false; STS.expEpicWatch7Flat = false; STS.expEpicHeader = false; STS.expEpicStyling = false; STS.expEpicFeeds = false; STS.expCosmicHeader = false; STS.expCosmicBG = false; STS.expCosmicButtons = false; STS.expCosmicStyles = false; STS.expCosmicBanners = false; STS.expCosmicBannersV2 = false; STS.expCosmicComments = false; STS.expCosmicGuideStyle = false; STS.expCosmicGuideLayout = true; STS.expCosmicFeedsV1 = false; STS.expCosmicFeedsV2 = false; STS.expCosmicFeedsV3 = false; STS.expCosmicFeedsThirdColumn = false; STS.expWatch5D = false; STS.expNotifSquare = true; STS.expChannels3 = true; STS.expChannels3TimeVisible = false; STS.expChannels3DateVisible = false; STS.expChannels3DateHidden = false; STS.expNoGuide = true; STS.expGuideOnFeedsOnly = false; STS.expAozoraHome = true; STS.expAozoraHeader = false; STS.expAozoraBG = true; STS.expAozoraStyles = true; STS.expAozoraComments = true; STS.expAozoraSubscribe = false; STS.expAozoraTopbarLinks = false; STS.expAozoraSearch = true; STS.expWatch5C = true; STS.expStargazerTabbedHeader = false; STS.expStargazerBarHeader = false; STS.expStargazerSimpleHeader = true; STS.expStargazerSubscribe = true; STS.expHomeTab = false; STS.expRoboto = false; STS.expCenteredSearch = false; STS.expBigSearch = false; STS.expSecondarySearchIcon = false; STS.expMaterialSearch = false; STS.expPolymerAccountMenu = false; STS.expPolymerShell = false; STS.expEarlyPolymerShell = false; STS.expEarlyPolymerGuide = false; STS.expPolymerGen2Colors = false; STS.expPolymerSubscribe = false; STS.expPolymerGen2Subscribe = false; STS.expPolymerStyles = false; STS.expBetaPolymerStyles = false; STS.expPolymerChannels = false; STS.expColorfulChannels = false; STS.expPolymerComments = false; STS.expPolymerTooltips = false; STS.expTopbarShadow = false; STS.expMaterialSignIn = false; STS.expRichGridHome = false; STS.expWatch9A = false; STS.expWatch9B = false; STS.expWatch10Beta = false; STS.expWatch10 = false; STS.expCommentsTeaser = false; STS.expSegmentedLtod = false; STS.expRoundedSubscribe = false; STS.expBlackSubscribe = false; STS.expRoundedThumbs = false; STS.expRoundedPlayer = false; STS.expRoundedSearch = false; STS.expRoundedGuide = false; STS.expRoundedStyles = false; STS.expFrostedGlass = false; STS.expPolymerGen3Colors = false; STS.expYTSansTitle = false; STS.expWMRButtonsLowercase = false; STS.expWMRAddTo = false; STS.expWMRNoSaveText = false; STS.expWMRNoShareText = false; STS.expOutlineIcons = false; STS.expRoundedTopbarPfp = false; STS.expUploadIcon = false; STS.expCreateIcon = false; STS.expYouTubeApps = false; STS.expRingo2 = false; STS.exp2024Favicon = false; STS.exp2024FaviconOld = false; STS.exp2017Favicon = false; STS.exp2015Favicon = false; STS.exp2012Favicon = false; STS.exp2010Favicon = false; STS.exp2005Favicon = true; STS.expHideYoodles = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("cosmic"); } } function STStargazerMid2009Settings() { STS.expStargazerBarHeader = true; STS.expStargazerSimpleHeader = false; } function STStargazerEarly2009Settings() { STS.expStargazerBarHeader = true; STS.expStargazerSimpleHeader = false; } function STStargazer2008Settings() { STS.expStargazerTabbedHeader = true; STS.expStargazerBarHeader = false; } function ST2019Settings() { STS.expHomepageRedirectsToFeed = false; STS.expLogoLinksToFeed = false; STS.expLogoLinksToSubs = false; STS.expLinkToGridSubs = true; STS.expRelatedThumbsSizeSmaller = false; STS.expRelatedThumbsSizeMedium = false; STS.expRelatedThumbsSizeLarge = true; STS.expRelatedThumbsSizeStupid = false; STS.expAlwaysShowCompactDate = true; STS.expNeverShowCompactDate = false; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = true; STS.expMoveGuideButtonToTopbar = false; STS.expRelatedTabs = false; STS.expRelatedTabsHoldsSubscribe = false; STS.expWatch9 = false; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expVerticalWatch9 = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expWatch9ReportTab = false; STS.expRelatedGrid = false; STS.expWatch8 = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = true; STS.expSharrow = true; STS.expGuideAlwaysPinned = false; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = false; STS.expTwoColumnSearchResults = false; STS.configNoTabTopBorder = true; STS.configWatch7SidebarCardShadow = true; STS.expFlatLogo = false; STS.expInvertLogo = true; STS.expGlossyLogo = false; STS.expClassicTitle = false; STS.expClassicGuide = false; STS.expClassicSubscribe = false; STS.expClassicStyles = false; STS.expClassicLtod = false; STS.expClassicButtons = false; STS.expBigSearchThumbs = true; STS.expBiggerSearchThumbs = false; STS.expNoVideosLink = false; STS.expModernStyles = false; STS.expModernCards = false; STS.expLightChannelBar = true; STS.expModernNotifIcon = false; STS.expModernTopbar = true; STS.expModernUpload = true; STS.expModernGuideButton = true; STS.expModernSearchIcon = true; STS.expSearchText = true; STS.expModernTitle = true; STS.expModernGuide = true; STS.expModernHome = true; STS.expModernPlaylists = true; STS.expModernPlaylistThumbnails = true; STS.expPlaylistRedBorder = false; STS.expPlaylistTimestamps = true; STS.expTrueScrollableGuide = true; STS.expModernPlayer = false; STS.expModernPlayerV2 = true; STS.expViewsString = true; STS.expGoogleApps = false; STS.expCommentsFullWidth = true; STS.expNoByText = true; STS.expAccountMenu = false; STS.expStaticSite = false; STS.expHideAppbar = true; STS.expEpicWatch7 = false; STS.expEpicWatch7Flat = false; STS.expEpicHeader = false; STS.expEpicStyling = false; STS.expEpicFeeds = false; STS.expCosmicHeader = false; STS.expCosmicBG = false; STS.expCosmicButtons = false; STS.expCosmicStyles = false; STS.expCosmicBanners = false; STS.expCosmicBannersV2 = false; STS.expCosmicComments = false; STS.expCosmicGuideStyle = false; STS.expCosmicGuideLayout = false; STS.expCosmicFeedsV1 = false; STS.expCosmicFeedsV2 = false; STS.expCosmicFeedsV3 = false; STS.expCosmicFeedsThirdColumn = false; STS.expWatch5D = false; STS.expNotifSquare = false; STS.expChannels3 = false; STS.expChannels3TimeVisible = false; STS.expChannels3DateVisible = false; STS.expChannels3DateHidden = false; STS.expNoGuide = false; STS.expGuideOnFeedsOnly = false; STS.expAozoraHome = false; STS.expAozoraHeader = false; STS.expAozoraBG = false; STS.expAozoraStyles = false; STS.expAozoraComments = false; STS.expAozoraSubscribe = false; STS.expAozoraTopbarLinks = false; STS.expAozoraSearch = false; STS.expWatch5C = false; STS.expStargazerTabbedHeader = false; STS.expStargazerBarHeader = false; STS.expStargazerSimpleHeader = false; STS.expStargazerSubscribe = false; STS.expHomeTab = true; STS.expRoboto = true; STS.expCenteredSearch = true; STS.expBigSearch = false; STS.expSecondarySearchIcon = false; STS.expMaterialSearch = false; STS.expPolymerAccountMenu = true; STS.expPolymerShell = true; STS.expEarlyPolymerShell = false; STS.expEarlyPolymerGuide = false; STS.expPolymerGen2Colors = true; STS.expPolymerSubscribe = true; STS.expPolymerGen2Subscribe = false; STS.expPolymerStyles = true; STS.expBetaPolymerStyles = false; STS.expPolymerChannels = true; STS.expColorfulChannels = false; STS.expPolymerComments = true; STS.expPolymerTooltips = true; STS.expTopbarShadow = true; STS.expMaterialSignIn = true; STS.expRichGridHome = false; STS.expWatch9A = true; STS.expWatch9B = false; STS.expWatch10Beta = false; STS.expWatch10 = false; STS.expCommentsTeaser = false; STS.expSegmentedLtod = false; STS.expRoundedSubscribe = false; STS.expBlackSubscribe = false; STS.expRoundedThumbs = false; STS.expRoundedPlayer = false; STS.expRoundedSearch = false; STS.expRoundedGuide = false; STS.expRoundedStyles = false; STS.expFrostedGlass = false; STS.expPolymerGen3Colors = false; STS.expYTSansTitle = false; STS.expWMRButtonsLowercase = false; STS.expWMRAddTo = false; STS.expWMRNoSaveText = false; STS.expWMRNoShareText = false; STS.expOutlineIcons = false; STS.expRoundedTopbarPfp = true; STS.expUploadIcon = false; STS.expCreateIcon = true; STS.expYouTubeApps = true; STS.expRingo2 = false; STS.exp2024Favicon = false; STS.exp2024FaviconOld = false; STS.exp2017Favicon = true; STS.exp2015Favicon = false; STS.exp2012Favicon = false; STS.exp2010Favicon = false; STS.exp2005Favicon = false; STS.expHideYoodles = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("poly17"); } } function ST2018PolySettings() { STS.expCenteredSearch = true; STS.expPolymerGen2Colors = false; STS.expEarlyPolymerShell = false; STS.expWMRNoSaveText = false; STS.expWMRNoShareText = false; STS.expTopbarShadow = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("poly17"); } } function ST2017PolySettings() { STS.expCenteredSearch = false; STS.expEarlyPolymerShell = true; STS.expWMRNoSaveText = true; STS.expWMRNoShareText = false; STS.expUploadIcon = true; STS.expCreateIcon = false; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("poly17"); } } function ST2016PolySettings() { STS.expFlatLogo = true; STS.expInvertLogo = false; STS.expBigSearch = true; STS.expMaterialSearch = true; STS.expCenteredSearch = true; STS.expEarlyPolymerShell = true; STS.expBetaPolymerStyles = true; STS.expColorfulChannels = true; STS.expWMRAddTo = true; STS.expWMRNoSaveText = true; STS.expWMRNoShareText = true; STS.expUploadIcon = true; STS.expCreateIcon = false; STS.expYouTubeApps = false; STS.exp2017Favicon = false; STS.exp2015Favicon = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("poly16"); } } function ST2020Settings() { STS.expBigSearchThumbs = false; STS.expBiggerSearchThumbs = true; STS.expPolymerGen2Colors = true; STS.expPolymerGen2Subscribe = true; STS.expTopbarShadow = false; STS.expWatch9A = false; STS.expWatch9B = true; STS.expRichGridHome = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("poly17"); } } function ST2021Settings() { STS.expBigSearch = true; STS.expOutlineIcons = true; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("poly17"); } } function ST2022Settings() { STS.expSecondarySearchIcon = true; STS.expWatch9A = false; STS.expWatch9B = false; STS.expWatch10Beta = true; STS.expWatch10 = false; STS.expCommentsTeaser = true; STS.expYTSansTitle = true; STS.expWMRButtonsLowercase = true; STS.expYouTubeApps = false; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("poly17"); } } function STAmsterdamSettings() { STS.expWatch10Beta = false; STS.expWatch10 = true; STS.expCommentsTeaser = true; STS.expSegmentedLtod = true; STS.expRoundedSubscribe = true; STS.expBlackSubscribe = false; STS.expRoundedThumbs = true; STS.expRoundedPlayer = true; STS.expRoundedSearch = true; STS.expRoundedGuide = true; STS.expRoundedStyles = true; STS.expFrostedGlass = true; STS.expPolymerGen3Colors = true; STS.expYTSansTitle = true; STS.expRingo2 = true; STS.exp2024Favicon = true; STS.exp2024FaviconOld = true; STS.exp2017Favicon = false; STS.exp2015Favicon = false; STS.exp2012Favicon = false; STS.exp2010Favicon = false; STS.exp2005Favicon = false; if (STS.STPresetsAlsoSetV3Settings == true) { setV3Settings("poly17"); } } function setV3Settings(preset) { if (preset == "modernGbar" || preset == "materialGbar") { V3_SETTINGS_CONF.USING_GBAR = true; V3_SETTINGS_CONF.MODERN_GBAR_DELEGATION = true; } if (preset == "colorfulChannels") { V3_SETTINGS_CONF.MATERIAL_C4 = true; } if (preset == "normalChannels") { V3_SETTINGS_CONF.MATERIAL_C4 = false; } if (preset == "classicGbar") { V3_SETTINGS_CONF.USING_GBAR = true; V3_SETTINGS_CONF.MODERN_GBAR_DELEGATION = false; } if (preset == "noGbar") { V3_SETTINGS_CONF.USING_GBAR = false; } if (preset == "defaultPlayer") { V3_SETTINGS_CONF.FLASH7_PLAYER_STYLE = false; V3_SETTINGS_CONF.PLAYER_FORCE_MODERN_PLAYER_EMBED = false; } if (preset == "flash7Player") { V3_SETTINGS_CONF.FLASH7_PLAYER_STYLE = true; V3_SETTINGS_CONF.PLAYER_FORCE_MODERN_PLAYER_EMBED = false; } if (preset == "embedPlayer") { V3_SETTINGS_CONF.FLASH7_PLAYER_STYLE = false; V3_SETTINGS_CONF.PLAYER_FORCE_MODERN_PLAYER_EMBED = true; } if (preset == "noFlexwatch") { V3_SETTINGS_CONF.APPBAR_FLEXWATCH_MINI = false; } if (preset == "guideFeed") { V3_SETTINGS_CONF.GUIDE_NAVIGATE_TO_CHANNEL_FEED = true; } if (preset == "guideChannel") { V3_SETTINGS_CONF.GUIDE_NAVIGATE_TO_CHANNEL_FEED = false; } if (preset == "flexwatchMini") { V3_SETTINGS_CONF.APPBAR_FLEXWATCH_MINI = true; V3_SETTINGS_CONF.PLAYER_SIZERULE1_MIN_WIDTH = 1496; V3_SETTINGS_CONF.PLAYER_SIZERULE1_MIN_HEIGHT = 768; V3_SETTINGS_CONF.PLAYER_SIZERULE2_MIN_WIDTH = 1496; V3_SETTINGS_CONF.PLAYER_SIZERULE2_MIN_HEIGHT = 768; V3_SETTINGS_CONF.PLAYER_SIZERULE3_MIN_WIDTH = 2130; V3_SETTINGS_CONF.PLAYER_SIZERULE3_MIN_HEIGHT = 768; V3_SETTINGS_CONF.PLAYER_SIZERULE1_API_SIZE_WIDTH = 640; V3_SETTINGS_CONF.PLAYER_SIZERULE1_API_SIZE_HEIGHT = 360; V3_SETTINGS_CONF.PLAYER_SIZERULE2_API_SIZE_WIDTH = 854; V3_SETTINGS_CONF.PLAYER_SIZERULE2_API_SIZE_HEIGHT = 480; V3_SETTINGS_CONF.PLAYER_SIZERULE3_API_SIZE_WIDTH = 1280; V3_SETTINGS_CONF.PLAYER_SIZERULE3_API_SIZE_HEIGHT = 720; } if (preset == "flexwatchMiniV2") { V3_SETTINGS_CONF.APPBAR_FLEXWATCH_MINI = true; V3_SETTINGS_CONF.PLAYER_SIZERULE1_MIN_WIDTH = 5; V3_SETTINGS_CONF.PLAYER_SIZERULE1_MIN_HEIGHT = 5; V3_SETTINGS_CONF.PLAYER_SIZERULE2_MIN_WIDTH = 1294; V3_SETTINGS_CONF.PLAYER_SIZERULE2_MIN_HEIGHT = 630; V3_SETTINGS_CONF.PLAYER_SIZERULE3_MIN_WIDTH = 1720; V3_SETTINGS_CONF.PLAYER_SIZERULE3_MIN_HEIGHT = 980; V3_SETTINGS_CONF.PLAYER_SIZERULE1_API_SIZE_WIDTH = 640; V3_SETTINGS_CONF.PLAYER_SIZERULE1_API_SIZE_HEIGHT = 360; V3_SETTINGS_CONF.PLAYER_SIZERULE2_API_SIZE_WIDTH = 854; V3_SETTINGS_CONF.PLAYER_SIZERULE2_API_SIZE_HEIGHT = 480; V3_SETTINGS_CONF.PLAYER_SIZERULE3_API_SIZE_WIDTH = 1280; V3_SETTINGS_CONF.PLAYER_SIZERULE3_API_SIZE_HEIGHT = 720; } if (preset == "flexwatchMedium") { V3_SETTINGS_CONF.APPBAR_FLEXWATCH_MINI = true; V3_SETTINGS_CONF.PLAYER_SIZERULE1_MIN_WIDTH = 1496; V3_SETTINGS_CONF.PLAYER_SIZERULE1_MIN_HEIGHT = 768; V3_SETTINGS_CONF.PLAYER_SIZERULE2_MIN_WIDTH = 1496; V3_SETTINGS_CONF.PLAYER_SIZERULE2_MIN_HEIGHT = 768; V3_SETTINGS_CONF.PLAYER_SIZERULE3_MIN_WIDTH = 2130; V3_SETTINGS_CONF.PLAYER_SIZERULE3_MIN_HEIGHT = 768; V3_SETTINGS_CONF.PLAYER_SIZERULE1_API_SIZE_WIDTH = 640; V3_SETTINGS_CONF.PLAYER_SIZERULE1_API_SIZE_HEIGHT = 360; V3_SETTINGS_CONF.PLAYER_SIZERULE2_API_SIZE_WIDTH = 1024; V3_SETTINGS_CONF.PLAYER_SIZERULE2_API_SIZE_HEIGHT = 576; V3_SETTINGS_CONF.PLAYER_SIZERULE3_API_SIZE_WIDTH = 1600; V3_SETTINGS_CONF.PLAYER_SIZERULE3_API_SIZE_HEIGHT = 900; } if (preset == "flexwatchLarge") { V3_SETTINGS_CONF.APPBAR_FLEXWATCH_MINI = true; V3_SETTINGS_CONF.PLAYER_SIZERULE1_MIN_WIDTH = 1496; V3_SETTINGS_CONF.PLAYER_SIZERULE1_MIN_HEIGHT = 768; V3_SETTINGS_CONF.PLAYER_SIZERULE2_MIN_WIDTH = 1800; V3_SETTINGS_CONF.PLAYER_SIZERULE2_MIN_HEIGHT = 768; V3_SETTINGS_CONF.PLAYER_SIZERULE3_MIN_WIDTH = 2404; V3_SETTINGS_CONF.PLAYER_SIZERULE3_MIN_HEIGHT = 768; V3_SETTINGS_CONF.PLAYER_SIZERULE1_API_SIZE_WIDTH = 854; V3_SETTINGS_CONF.PLAYER_SIZERULE1_API_SIZE_HEIGHT = 480; V3_SETTINGS_CONF.PLAYER_SIZERULE2_API_SIZE_WIDTH = 1280; V3_SETTINGS_CONF.PLAYER_SIZERULE2_API_SIZE_HEIGHT = 720; V3_SETTINGS_CONF.PLAYER_SIZERULE3_API_SIZE_WIDTH = 1920; V3_SETTINGS_CONF.PLAYER_SIZERULE3_API_SIZE_HEIGHT = 1080; } if (preset == "poly16") { V3_SETTINGS_CONF.JFK_SIGN_IN = false; V3_SETTINGS_CONF.APPBAR_FLEXWATCH_MINI = true; V3_SETTINGS_CONF.SITE_CENTER_ALIGNED = true; V3_SETTINGS_CONF.APPBAR_GUIDE = true; V3_SETTINGS_CONF.MASTHEAD_APPBAR_LAUNCH = true; V3_SETTINGS_CONF.PROMINENT_UPLOAD_BUTTON = false; V3_SETTINGS_CONF.APPBAR_GUIDE_BUTTON_SIMPLE_STYLE = true; V3_SETTINGS_CONF.SITE_AS_GIANT_CARD = true; V3_SETTINGS_CONF.NEW_APPBAR_GUIDE_ICONS = true; V3_SETTINGS_CONF.APPBAR_GUIDE_PINNING = true; V3_SETTINGS_CONF.CARDIFIED_PAGE = false; V3_SETTINGS_CONF.INDIVIDUAL_CARDS_WATCH = false; V3_SETTINGS_CONF.WATCH7_ACTION_PANELS_USE_ICONS = false; V3_SETTINGS_CONF.WATCH7_TEXT_RATING = false; V3_SETTINGS_CONF.MASTHEAD_APPBAR_FUSION = true; V3_SETTINGS_CONF.WATCH8 = false; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.W2W_AS_LOHP_EVERYTIME = false; V3_SETTINGS_CONF.LOHP_VIDEO_FIX_THUMB_ASPECTRATIO = false; V3_SETTINGS_CONF.APPBAR_GUIDE_SCROLL = false; V3_SETTINGS_CONF.BODY_LEGACY_BACKGROUND = false; V3_SETTINGS_CONF.MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.LEFT_ALIGN_GUIDE_FIXED = true; V3_SETTINGS_CONF.MASTHEAD_SHOW_RED_LOGO_FOR_REDUSER = false; V3_SETTINGS_CONF.MATERIAL_C4 = true; } if (preset == "poly17") { V3_SETTINGS_CONF.JFK_SIGN_IN = false; V3_SETTINGS_CONF.APPBAR_FLEXWATCH_MINI = true; V3_SETTINGS_CONF.SITE_CENTER_ALIGNED = true; V3_SETTINGS_CONF.APPBAR_GUIDE = true; V3_SETTINGS_CONF.MASTHEAD_APPBAR_LAUNCH = true; V3_SETTINGS_CONF.PROMINENT_UPLOAD_BUTTON = false; V3_SETTINGS_CONF.APPBAR_GUIDE_BUTTON_SIMPLE_STYLE = true; V3_SETTINGS_CONF.SITE_AS_GIANT_CARD = true; V3_SETTINGS_CONF.NEW_APPBAR_GUIDE_ICONS = true; V3_SETTINGS_CONF.APPBAR_GUIDE_PINNING = true; V3_SETTINGS_CONF.CARDIFIED_PAGE = false; V3_SETTINGS_CONF.INDIVIDUAL_CARDS_WATCH = false; V3_SETTINGS_CONF.WATCH7_ACTION_PANELS_USE_ICONS = false; V3_SETTINGS_CONF.WATCH7_TEXT_RATING = false; V3_SETTINGS_CONF.MASTHEAD_APPBAR_FUSION = true; V3_SETTINGS_CONF.WATCH8 = false; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.W2W_AS_LOHP_EVERYTIME = false; V3_SETTINGS_CONF.LOHP_VIDEO_FIX_THUMB_ASPECTRATIO = false; V3_SETTINGS_CONF.APPBAR_GUIDE_SCROLL = false; V3_SETTINGS_CONF.BODY_LEGACY_BACKGROUND = false; V3_SETTINGS_CONF.MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.LEFT_ALIGN_GUIDE_FIXED = true; V3_SETTINGS_CONF.MASTHEAD_SHOW_RED_LOGO_FOR_REDUSER = false; V3_SETTINGS_CONF.MATERIAL_C4 = false; } if (preset == "hitchhiker13") { V3_SETTINGS_CONF.APPBAR_FLEXWATCH_MINI = true; V3_SETTINGS_CONF.SITE_CENTER_ALIGNED = false; V3_SETTINGS_CONF.APPBAR_GUIDE = false; V3_SETTINGS_CONF.MASTHEAD_APPBAR_LAUNCH = false; V3_SETTINGS_CONF.PROMINENT_UPLOAD_BUTTON = false; V3_SETTINGS_CONF.APPBAR_GUIDE_BUTTON_SIMPLE_STYLE = false; V3_SETTINGS_CONF.SITE_AS_GIANT_CARD = false; V3_SETTINGS_CONF.NEW_APPBAR_GUIDE_ICONS = false; V3_SETTINGS_CONF.APPBAR_GUIDE_PINNING = false; V3_SETTINGS_CONF.CARDIFIED_PAGE = false; V3_SETTINGS_CONF.INDIVIDUAL_CARDS_WATCH = false; V3_SETTINGS_CONF.WATCH7_ACTION_PANELS_USE_ICONS = false; V3_SETTINGS_CONF.WATCH7_TEXT_RATING = false; V3_SETTINGS_CONF.MASTHEAD_APPBAR_FUSION = false; V3_SETTINGS_CONF.WATCH8 = false; V3_SETTINGS_CONF.NEW_LOGO = true; V3_SETTINGS_CONF.W2W_AS_LOHP_EVERYTIME = true; V3_SETTINGS_CONF.LOHP_VIDEO_FIX_THUMB_ASPECTRATIO = false; V3_SETTINGS_CONF.BODY_LEGACY_BACKGROUND = false; V3_SETTINGS_CONF.MASTHEAD_POSITIONER = false; V3_SETTINGS_CONF.LEFT_ALIGN_GUIDE_FIXED = false; V3_SETTINGS_CONF.MATERIAL_C4 = false; } if (preset == "hitchhiker13mid") { V3_SETTINGS_CONF.NEW_LOGO = false; V3_SETTINGS_CONF.W2W_AS_LOHP_EVERYTIME = true; V3_SETTINGS_CONF.LOHP_VIDEO_FIX_THUMB_ASPECTRATIO = false; V3_SETTINGS_CONF.BODY_LEGACY_BACKGROUND = false; V3_SETTINGS_CONF.MATERIAL_C4 = false; } if (preset == "hitchhiker13early") { V3_SETTINGS_CONF.NEW_LOGO = false; V3_SETTINGS_CONF.W2W_AS_LOHP_EVERYTIME = true; V3_SETTINGS_CONF.LOHP_VIDEO_FIX_THUMB_ASPECTRATIO = false; V3_SETTINGS_CONF.BODY_LEGACY_BACKGROUND = true; V3_SETTINGS_CONF.MATERIAL_C4 = false; } if (preset == "nirvana14") { V3_SETTINGS_CONF.APPBAR_FLEXWATCH_MINI = true; V3_SETTINGS_CONF.SITE_CENTER_ALIGNED = true; V3_SETTINGS_CONF.APPBAR_GUIDE = true; V3_SETTINGS_CONF.MASTHEAD_APPBAR_LAUNCH = true; V3_SETTINGS_CONF.PROMINENT_UPLOAD_BUTTON = false; V3_SETTINGS_CONF.APPBAR_GUIDE_BUTTON_SIMPLE_STYLE = true; V3_SETTINGS_CONF.SITE_AS_GIANT_CARD = true; V3_SETTINGS_CONF.NEW_APPBAR_GUIDE_ICONS = true; V3_SETTINGS_CONF.APPBAR_GUIDE_PINNING = true; V3_SETTINGS_CONF.CARDIFIED_PAGE = true; V3_SETTINGS_CONF.INDIVIDUAL_CARDS = false; V3_SETTINGS_CONF.INDIVIDUAL_CARDS_WATCH = false; V3_SETTINGS_CONF.WATCH7_ACTION_PANELS_USE_ICONS = false; V3_SETTINGS_CONF.WATCH7_TEXT_RATING = false; V3_SETTINGS_CONF.MASTHEAD_APPBAR_FUSION = true; V3_SETTINGS_CONF.WATCH8 = false; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.APPBAR_GUIDE_SCROLL = true; V3_SETTINGS_CONF.NEW_LOGO = true; V3_SETTINGS_CONF.W2W_AS_LOHP_EVERYTIME = true; V3_SETTINGS_CONF.LOHP_VIDEO_FIX_THUMB_ASPECTRATIO = true; V3_SETTINGS_CONF.BODY_LEGACY_BACKGROUND = false; V3_SETTINGS_CONF.MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.LEFT_ALIGN_GUIDE_FIXED = true; V3_SETTINGS_CONF.MATERIAL_C4 = false; } if (preset == "nirvana15Early") { V3_SETTINGS_CONF.APPBAR_FLEXWATCH_MINI = true; V3_SETTINGS_CONF.SITE_CENTER_ALIGNED = true; V3_SETTINGS_CONF.APPBAR_GUIDE = true; V3_SETTINGS_CONF.MASTHEAD_APPBAR_LAUNCH = true; V3_SETTINGS_CONF.PROMINENT_UPLOAD_BUTTON = false; V3_SETTINGS_CONF.APPBAR_GUIDE_BUTTON_SIMPLE_STYLE = true; V3_SETTINGS_CONF.SITE_AS_GIANT_CARD = true; V3_SETTINGS_CONF.NEW_APPBAR_GUIDE_ICONS = true; V3_SETTINGS_CONF.APPBAR_GUIDE_PINNING = true; V3_SETTINGS_CONF.CARDIFIED_PAGE = true; V3_SETTINGS_CONF.INDIVIDUAL_CARDS = false; V3_SETTINGS_CONF.INDIVIDUAL_CARDS_WATCH = true; V3_SETTINGS_CONF.WATCH7_ACTION_PANELS_USE_ICONS = false; V3_SETTINGS_CONF.WATCH7_TEXT_RATING = false; V3_SETTINGS_CONF.MASTHEAD_APPBAR_FUSION = true; V3_SETTINGS_CONF.WATCH8 = false; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.APPBAR_GUIDE_SCROLL = true; V3_SETTINGS_CONF.NEW_LOGO = true; V3_SETTINGS_CONF.W2W_AS_LOHP_EVERYTIME = true; V3_SETTINGS_CONF.LOHP_VIDEO_FIX_THUMB_ASPECTRATIO = true; V3_SETTINGS_CONF.BODY_LEGACY_BACKGROUND = false; V3_SETTINGS_CONF.MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.LEFT_ALIGN_GUIDE_FIXED = true; V3_SETTINGS_CONF.MATERIAL_C4 = false; } if (preset == "nirvana15") { V3_SETTINGS_CONF.JFK_SIGN_IN = false; V3_SETTINGS_CONF.APPBAR_FLEXWATCH_MINI = true; V3_SETTINGS_CONF.SITE_CENTER_ALIGNED = true; V3_SETTINGS_CONF.APPBAR_GUIDE = true; V3_SETTINGS_CONF.MASTHEAD_APPBAR_LAUNCH = true; V3_SETTINGS_CONF.PROMINENT_UPLOAD_BUTTON = false; V3_SETTINGS_CONF.APPBAR_GUIDE_BUTTON_SIMPLE_STYLE = true; V3_SETTINGS_CONF.SITE_AS_GIANT_CARD = true; V3_SETTINGS_CONF.NEW_APPBAR_GUIDE_ICONS = true; V3_SETTINGS_CONF.APPBAR_GUIDE_PINNING = true; V3_SETTINGS_CONF.CARDIFIED_PAGE = true; V3_SETTINGS_CONF.INDIVIDUAL_CARDS = false; V3_SETTINGS_CONF.INDIVIDUAL_CARDS_WATCH = true; V3_SETTINGS_CONF.WATCH7_ACTION_PANELS_USE_ICONS = false; V3_SETTINGS_CONF.WATCH7_TEXT_RATING = false; V3_SETTINGS_CONF.MASTHEAD_APPBAR_FUSION = true; V3_SETTINGS_CONF.WATCH8 = false; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.APPBAR_GUIDE_SCROLL = false; V3_SETTINGS_CONF.NEW_LOGO = true; V3_SETTINGS_CONF.W2W_AS_LOHP_EVERYTIME = true; V3_SETTINGS_CONF.LOHP_VIDEO_FIX_THUMB_ASPECTRATIO = true; V3_SETTINGS_CONF.BODY_LEGACY_BACKGROUND = false; V3_SETTINGS_CONF.MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.LEFT_ALIGN_GUIDE_FIXED = true; V3_SETTINGS_CONF.MATERIAL_C4 = false; } if (preset == "nirvana16") { V3_SETTINGS_CONF.JFK_SIGN_IN = false; V3_SETTINGS_CONF.APPBAR_FLEXWATCH_MINI = true; V3_SETTINGS_CONF.SITE_CENTER_ALIGNED = true; V3_SETTINGS_CONF.APPBAR_GUIDE = true; V3_SETTINGS_CONF.MASTHEAD_APPBAR_LAUNCH = true; V3_SETTINGS_CONF.PROMINENT_UPLOAD_BUTTON = false; V3_SETTINGS_CONF.APPBAR_GUIDE_BUTTON_SIMPLE_STYLE = true; V3_SETTINGS_CONF.SITE_AS_GIANT_CARD = true; V3_SETTINGS_CONF.NEW_APPBAR_GUIDE_ICONS = true; V3_SETTINGS_CONF.APPBAR_GUIDE_PINNING = true; V3_SETTINGS_CONF.CARDIFIED_PAGE = true; V3_SETTINGS_CONF.INDIVIDUAL_CARDS = false; V3_SETTINGS_CONF.INDIVIDUAL_CARDS_WATCH = true; V3_SETTINGS_CONF.WATCH7_ACTION_PANELS_USE_ICONS = false; V3_SETTINGS_CONF.WATCH7_TEXT_RATING = false; V3_SETTINGS_CONF.MASTHEAD_APPBAR_FUSION = true; V3_SETTINGS_CONF.WATCH8 = false; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.W2W_AS_LOHP_EVERYTIME = false; V3_SETTINGS_CONF.LOHP_VIDEO_FIX_THUMB_ASPECTRATIO = false; V3_SETTINGS_CONF.APPBAR_GUIDE_SCROLL = false; V3_SETTINGS_CONF.BODY_LEGACY_BACKGROUND = false; V3_SETTINGS_CONF.MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.LEFT_ALIGN_GUIDE_FIXED = true; V3_SETTINGS_CONF.MATERIAL_C4 = false; } if (preset == "cosmic") { V3_SETTINGS_CONF.JFK_SIGN_IN = false; V3_SETTINGS_CONF.APPBAR_FLEXWATCH_MINI = false; V3_SETTINGS_CONF.SITE_CENTER_ALIGNED = true; V3_SETTINGS_CONF.APPBAR_GUIDE = true; V3_SETTINGS_CONF.MASTHEAD_APPBAR_LAUNCH = true; V3_SETTINGS_CONF.PROMINENT_UPLOAD_BUTTON = false; V3_SETTINGS_CONF.APPBAR_GUIDE_BUTTON_SIMPLE_STYLE = true; V3_SETTINGS_CONF.SITE_AS_GIANT_CARD = true; V3_SETTINGS_CONF.NEW_APPBAR_GUIDE_ICONS = true; V3_SETTINGS_CONF.APPBAR_GUIDE_PINNING = true; V3_SETTINGS_CONF.CARDIFIED_PAGE = false; V3_SETTINGS_CONF.WATCH7_ACTION_PANELS_USE_ICONS = false; V3_SETTINGS_CONF.WATCH7_TEXT_RATING = true; V3_SETTINGS_CONF.MASTHEAD_APPBAR_FUSION = true; V3_SETTINGS_CONF.WATCH8 = false; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.W2W_AS_LOHP_EVERYTIME = true; V3_SETTINGS_CONF.LOHP_VIDEO_FIX_THUMB_ASPECTRATIO = true; V3_SETTINGS_CONF.APPBAR_GUIDE_SCROLL = false; V3_SETTINGS_CONF.NEW_LOGO = false; V3_SETTINGS_CONF.BODY_LEGACY_BACKGROUND = true; V3_SETTINGS_CONF.MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.LEFT_ALIGN_GUIDE_FIXED = true; V3_SETTINGS_CONF.MASTHEAD_SHOW_RED_LOGO_FOR_REDUSER = false; V3_SETTINGS_CONF.MATERIAL_C4 = false; } if (preset == "epicreal") { V3_SETTINGS_CONF.BODY_LEGACY_BACKGROUND = true; } var V3_SETTINGS = localStorage.getItem("v3_local_db"); V3_SETTINGS = JSON.parse(V3_SETTINGS); V3_SETTINGS.config.db.yt = V3_SETTINGS_CONF; V3_SETTINGS = JSON.stringify(V3_SETTINGS); localStorage.setItem("v3_local_db",V3_SETTINGS); } async function checkSetting(settingName) { let value = STS[settingName]; return value; } async function checkLockedSetting(settingName) { if (STS.ironSettings[settingName]) { return true; } else { return false; } } let ScF = Object.entries(ScFa); var arraNum = 0; arra.forEach(itemRoot => { if (itemRoot) { let name = itemRoot[0]; checkSetting(name).then(function(value) { if (ScFa[name]) { ScFa[name].value = value; } }); checkLockedSetting(name).then(function(value) { if (ScFa[name]) { ScFa[name].locked = value; ScF = Object.entries(ScFa); } }); } }); if (window.location.href == "https://www.youtube.com/" && STS.expHomepageRedirectsToFeed == true) { window.location = "https://www.youtube.com/feed/what_to_watch/recommended"; } 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); }); } // EXfunct2 function cond(con, thenDo, elseDo) { if (con) { thenDo(); } else { elseDo(); } } function fillVideosDD() { let currPage = 0; let currNumb = 0; let pageVid = 0; gdp.currWatchData.paginatedCVList.forEach(i => { if (currNumb == 6 || currNumb == 12 || currNumb == 18 || currNumb == 24) { currPage++; pageVid = 0; if ($("#watch5-videos-dd")) { document.querySelectorAll("#videos-dd-pagination button")[currPage].classList.remove("hid"); $("#watch5-videos-dd").setAttribute("max-pages",currPage + 1); } } i.page.forEach(i2 => { createRenderer(i2, "superCompactVideo", currNumb, "", pageVid, currPage); if ($("#watch5-videos-dd-button[disabled]")) { $("#watch5-videos-dd-button").removeAttribute("disabled"); $("#watch5-videos-dd-button .run").textContent = gdp.currWatchData.videoCount; $("#videos-dd-count").textContent = gdp.currWatchData.videoCount; $("#videos-dd-link").href = "/channel/" + gdp.currWatchData.channelId + "/videos?view=0"; $("#videos-dd-link").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: gdp.currWatchData.channelId, canonicalBaseUrl: "/channel/" + gdp.currWatchData.channelId + "/videos?view=0", params: "EgZ2aWRlb3PyBgQKAjoA" }, commandMetadata: { webCommandMetadata: { url: "/channel/" + gdp.currWatchData.channelId + "/videos?view=0" } } } } } } currNumb++; pageVid++; }); }); } function createLoadMore(token, list, renderer, currNumb) { let container; if (renderer == "videosTabCompactVideo") { container = $("#watch-channel-videos"); } var newElem = document.createElement("span"); newElem.setAttribute("class", "continuation_item_wrapper"); newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[currNumb]); newElem.addEventListener("click", function() { newElem.remove(); delete gdp.currWatchData[list][currNumb]; EXFetch("none","double","browse","browseId",gdp.currWatchData.channelId,"params","EgZ2aWRlb3PyBgQKAjoA","continuation",token).then(result => { if (result.onResponseReceivedActions) { let richGrid = result.onResponseReceivedActions[0].appendContinuationItemsAction.continuationItems; richGrid.forEach(i => { gdp.currWatchData[list].push(i); }); fillVideoList(list,"videosTabCompactVideo","continuation",currNumb); } }); }); } function fillVideoList(list, renderer, purpose, prevNumb) { let currNumb = 0; gdp.currWatchData[list].forEach(i => { if (purpose == "continuation" && currNumb < prevNumb) { } else { if (i.richItemRenderer) { createRenderer(i.richItemRenderer.content.videoRenderer, renderer, currNumb, ""); } else if (i.continuationItemRenderer) { createLoadMore(i.continuationItemRenderer.continuationEndpoint.continuationCommand.token, list, renderer, currNumb); } if ($(".owner-videos-scroller-head")) { $(".owner-videos-scroller-head span").textContent = gdp.currWatchData.videoCount; $("#watch9-owner .owner-videos-scroller-head span").textContent = gdp.currWatchData.videoCount; } } currNumb++; }); } function getCVPagination() { gdp.currWatchData.paginatedCVList = [ {"page":[]}, {"page":[]}, {"page":[]}, {"page":[]}, {"page":[]} ]; let currNumb = 0; let currPage = 0; let page = { "page":[] }; gdp.currWatchData.channelVideosList.forEach(i => { if (i.continuationItemRenderer) { } else { gdp.currWatchData.paginatedCVList[currPage].page.push(i); } //console.log(currNumb, currPage, gdp.currWatchData.paginatedCVList[currPage]); //console.log(currNumb, currPage); alert() currNumb++; if (currNumb == 6 || currNumb == 12 || currNumb == 18 || currNumb == 24) { currPage++; } /*if (gdp.currWatchData.paginatedCVList[currPage] == null) { gdp.currWatchData.paginatedCVList.push(page); }*/ }); if (STS.expWatch5C == true || STS.expWatch5D == true) { if ($("#watch5-videos-dd")) { fillVideosDD(); } else { var elm = "#watch5-videos-dd"; waitForElement10(elm).then(function(elm) { if (canGo != false) { fillVideosDD(); } }); } } if (STS.expWatch9 == true && STS.expRelatedTabs == false) { if ($(".scroller-inner")) { fillVideoList("channelVideosList", "altWatch9SCVid"); } else { var elm = ".scroller-inner"; waitForElement10(elm).then(function(elm) { if (canGo != false) { fillVideoList("channelVideosList", "altWatch9SCVid"); } }); } } if (STS.expRelatedTabs == true) { if ($("#watch-channel-videos")) { fillVideoList("channelVideosList", "videosTabCompactVideo"); } else { var elm = "#watch-channel-videos"; waitForElement10(elm).then(function(elm) { if (canGo != false) { fillVideoList("channelVideosList", "videosTabCompactVideo"); } }); } } } function getChannelVideosList() { let navData = ""; if (navData == "") { let navData = $("#watch7-user-header").data.watch7UserHeader.originalNavigationEndpoint; let theHref = navData.browseEndpoint.browseId; gdp.currWatchData.channelId = theHref; EXFetch("none","single","browse","browseId",theHref,"params","EgZ2aWRlb3PyBgQKAjoA").then(result => { //gdp.currWatchData.APIvideoCount = result.header.pageHeaderRenderer.content.pageHeaderViewModel.metadata.contentMetadataViewModel.metadataRows[1].metadataParts[1].text.content; gdp.currWatchData.APIvideoCount = $(".yt-user-videos").textContent; if (result.contents.twoColumnBrowseResultsRenderer.tabs[1]) { let richGrid = result.contents.twoColumnBrowseResultsRenderer.tabs[1].tabRenderer.content.richGridRenderer; if (richGrid.header) { $("body").setAttribute("channel-sort","true"); if (richGrid.header.feedFilterChipBarRenderer) { let chip = richGrid.header.feedFilterChipBarRenderer.contents; gdp.currWatchData.newestToken = chip[0].chipCloudChipRenderer.navigationEndpoint.continuationCommand.token; gdp.currWatchData.popularToken = chip[1].chipCloudChipRenderer.navigationEndpoint.continuationCommand.token; gdp.currWatchData.oldestToken = chip[2].chipCloudChipRenderer.navigationEndpoint.continuationCommand.token; } } else { gdp.currWatchData.noChannelSort = true; $("body").setAttribute("channel-sort","false"); } gdp.currWatchData.channelVideosList = richGrid.contents; gdp.currWatchData.videoCount = gdp.currWatchData.APIvideoCount; getCVPagination(); } else { $("body").setAttribute("channel-sort","false"); gdp.currWatchData.channelVideosList = "Invalid"; gdp.currWatchData.videoCount = "No videos"; } }); } } let PS1W = V3_SETTINGS_CONF.PLAYER_SIZERULE1_API_SIZE_WIDTH; let PS1H = V3_SETTINGS_CONF.PLAYER_SIZERULE1_API_SIZE_HEIGHT; let PS2W = V3_SETTINGS_CONF.PLAYER_SIZERULE2_API_SIZE_WIDTH; let PS2H = V3_SETTINGS_CONF.PLAYER_SIZERULE2_API_SIZE_HEIGHT; let PS3W = V3_SETTINGS_CONF.PLAYER_SIZERULE3_API_SIZE_WIDTH; let PS3H = V3_SETTINGS_CONF.PLAYER_SIZERULE3_API_SIZE_HEIGHT; let SR1W = V3_SETTINGS_CONF.PLAYER_SIZERULE1_MIN_WIDTH; let SR1H = V3_SETTINGS_CONF.PLAYER_SIZERULE1_MIN_HEIGHT; let SR2W = V3_SETTINGS_CONF.PLAYER_SIZERULE2_MIN_WIDTH; let SR2H = V3_SETTINGS_CONF.PLAYER_SIZERULE2_MIN_HEIGHT; let SR3W = V3_SETTINGS_CONF.PLAYER_SIZERULE3_MIN_WIDTH; let SR3H = V3_SETTINGS_CONF.PLAYER_SIZERULE3_MIN_HEIGHT; function getVideoSize() { if (V3_SETTINGS_CONF.APPBAR_FLEXWATCH_MINI == true) { if ( SRS.playerSizerules == "noFlexwatch" || SRS.playerSizerules == "flexwatchMini" || SRS.playerSizerules == "passive" ) { } else { $("html").setAttribute("custom-sizerules",""); if ($("#st-sizerule-style")) { $("#st-sizerule-style").remove(); } if ($(".player-height")) { let container = $("html"); let newElem = document.createElement("div"); newElem.id = "st-sizerule-style"; newElem.innerHTML = ` `; container.insertBefore(newElem,container.children[0]); setTimeout(finishVideoSize, 200); setTimeout(finishVideoSize, 500); setTimeout(finishVideoSize, 1000); setTimeout(finishVideoSize, 2000); setTimeout(finishVideoSize, 3000); } } } } function finishVideoSize() { if ($("#page.watch")) { if ($("#st-sizerule-style-2")) { $("#st-sizerule-style-2").remove(); } let container2 = $("html"); let newElem2 = document.createElement("div"); let sideWidth = $("#watch7-sidebar").getBoundingClientRect(); sideWidth = sideWidth.width; let vidWidth = $(".html5-video-container").getBoundingClientRect(); let vidHeight = vidWidth.height; vidWidth = vidWidth.width; let fullWidth = sideWidth + vidWidth; newElem2.id = "st-sizerule-style-2"; newElem2.innerHTML = ` `; container2.insertBefore(newElem2,container2.children[0]); $("body").style.setProperty("--player-width",vidWidth + "px"); $("body").style.setProperty("--player-height",vidHeight + "px"); } } function everyLoadNeo(x) { if ($(".dark-mode")) { $("html").setAttribute("dark",""); } if (x === "x") { gdp.currWatchData = {}; } if (x === "x" && $("#st-account-menu")) { $("#st-account-menu").setAttribute("visible",""); $("#st-account-menu").removeAttribute("visible"); } if ($("#page.watch")) { getVideoSize(); } if ($("#page.watch") || $("#page.all_comments")) { if (STS.expAozoraComments == true || STS.expCosmicComments == true) { var elm = "#watch-discussion .distiller_yt_instance"; waitForElement10(elm).then(function(elm) { if (canGo != false && $(".distiller_content")) { modComments(); listenToComments(x); } }); } } if (window.location.href.includes("/watch") && gdp.currWatchData.channelVideosList == null && x === "x") { var elm = ".yt-uix-button-panel"; waitForElement10(elm).then(function(elm) { if (canGo != false) { getChannelVideosList(); } }); } } function modComments() { document.querySelectorAll(".comment:not(.startube-comment)").forEach(i => { let container = i.querySelector("header"); let newElem = document.createElement("div"); newElem.classList = "startube-comment-data flex-bar"; newElem.innerHTML = `
`; container.insertBefore(newElem,container.children[2]); i.classList.add("startube-comment"); let likeCount = i.querySelector(".action_bar .count").textContent; let likeCount2 = i.querySelector(".action_bar .count_active").textContent; i.querySelector(".comment-rating .count").textContent = likeCount; i.querySelector(".comment-rating .active-count").textContent = likeCount2; if (likeCount !== "") { newElem.classList.add("has-likes"); } else { newElem.classList.add("no-likes-by-default"); } if (i.querySelector(".like.active")) { newElem.classList.add("comment-liked"); if (i.querySelector(".no-likes-by-default")) { newElem.classList.add("has-likes"); } } if (i.querySelector(".heart.active")) { newElem.classList.add("comment-hearted"); } i.querySelector(".like").addEventListener("click",function() { if (i.querySelector(".comment-liked")) { newElem.classList.remove("comment-liked"); if (i.querySelector(".no-likes-by-default")) { newElem.classList.remove("has-likes"); } } else if (i.querySelector(".no-likes-by-default")) { newElem.classList.add("comment-liked"); newElem.classList.add("has-likes"); } else { newElem.classList.add("comment-liked"); } }); if (i.parentNode.classList != "post") { i.classList.add("startube-reply"); } else if (i.parentNode.parentNode.parentNode.querySelector(".link_action")) { let elem = i.parentNode.parentNode.querySelector(".link_action"); let count = i.parentNode.parentNode.querySelector(".link_action_text").textContent; i.querySelector(".load-more-link .expand-text").textContent = count; i.querySelector(".load-more-link").addEventListener("click",function() { elem.click(); if (i.querySelector(".comment-expanded")) { newElem.classList.remove("comment-expanded"); } else { newElem.classList.add("comment-expanded"); } }); } else { newElem.classList.add("no-replies"); i.classList.add("no-replies"); } }) } function commentStateChange(sort) { if (sort == "sort") { var elm = "#watch-discussion .load-more-button:not(.listening)"; waitForElement10(elm).then(function(elm) { if (canGo != false && $(".distiller_content")) { setTimeout(function() { modComments(); listenToComments(); }, 500); } }); } else { var elm = ".comment:not(.startube-comment)"; waitForElement10(elm).then(function(elm) { if (canGo != false && $(".distiller_content")) { setTimeout(function() { modComments(); listenToComments(); }, 10); } }); } } function listenToComments(x) { if (x === "x") { var elm = ".comment:not(.startube-comment)"; waitForElement10(elm).then(function(elm) { if (canGo != false && $(".distiller_content")) { setTimeout(function() { modComments(); listenToComments(); }, 1000); setTimeout(function() { modComments(); listenToComments(); }, 2500); } }); } document.querySelectorAll("#watch-discussion .load-more-button").forEach(i => { i.addEventListener("click", commentStateChange); i.classList.add("listening"); }) document.querySelectorAll("#watch-discussion .link_action").forEach(i => { i.addEventListener("click", commentStateChange); i.classList.add("listening"); }) document.querySelectorAll("#comments-order-popup li").forEach(i => { if ($("#watch-discussion .load-more-button")) { i.addEventListener("click", function() { commentStateChange("sort"); }); } else { i.addEventListener("click", commentStateChange); } i.classList.add("listening"); }) } 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"; gdp.myChanName = $("#yt-masthead-user-displayname").textContent; } if ($("#yt-masthead-signin")) { gdp.loggedIn = false; $("html").setAttribute("logged-in","false"); } else { gdp.loggedIn = true; $("html").setAttribute("logged-in","true"); } if ($(".guide-user-links .guide-channel[id^='UC'] a")) { let guideUrl = $(".guide-user-links .guide-channel[id^='UC'] a").getAttribute("href"); gdp.myChanUrl = guideUrl; let guideId = guideUrl.split("/channel/")[1]; gdp.myChanId = guideId; } //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 { d.tabs.forEach(i => { if ( i.tabRenderer && i.tabRenderer.selected == true && i.tabRenderer.endpoint ) { if (i.tabRenderer.title == "" && i.tabRenderer.icon == "yt-uix-button-icon-c4-home") { resolve(i.tabRenderer.content.sectionListRenderer.contents);//home } if (i.tabRenderer.endpoint.browseEndpoint.params == "EgZ2aWRlb3PyBgQKAjoA" && i.tabRenderer.richGridInfo) { resolve(i.tabRenderer.richGridInfo.contents[0].gridRenderer.items);//videos } if (i.tabRenderer.title == "Feed" || i.tabRenderer.icon == "yt-uix-button-icon-c4-home-feed") { resolve(i.tabRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer.contents); } if (i.tabRenderer.endpoint.browseEndpoint.params == "Egljb21tdW5pdHnyBgQKAkoA" && i.tabRenderer.content) { resolve(i.tabRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer.contents);//backstage } if (i.tabRenderer.endpoint.browseEndpoint.params == "EglwbGF5bGlzdHPyBgQKAkIA" && i.tabRenderer.content && i.tabRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer.contents[0].gridRenderer.items) { resolve(i.tabRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer.contents[0].gridRenderer.items);//playlists } } else if (i.expandableTabRenderer && i.expandableTabRenderer.content) { resolve(i.expandableTabRenderer.content.sectionListRenderer.contents); } }); }); } function numberWithCommas(x) { return x.toString().replace(/\B(? { gdp.currChan.content = result; }); } else { $("html").setAttribute("playlist-data-done","false"); let desc = "No description available."; let header = d.header.playlistHeaderRenderer; console.log(header); let name = header.ownerText.runs[1].text; let playlistName = header.title.simpleText; let viewCount = header.stats[1].simpleText; let shortViewCount = viewCount.split(" v")[0]; let videoCount = header.stats[0].runs[0].text + " videos"; let shortVideoCount = videoCount.split(" v")[0]; if (header.descriptionText && header.descriptionText.simpleText) { desc = header.descriptionText.simpleText.replaceAll("\n","
"); } let tvB = ""; /* if (gdp.currChan && lastId == id && c4h.banner) { tvB = gdp.currChan.header.tvBanner; } else if (c4h.banner) { if (c4h.tvBanner) { tvB = c4h.tvBanner.thumbnails; tvB.forEach(i => { tvB = i.url; }); } else { TheEXFetch(gdp.currChan == null,"nomod","browse","browseId",id); } } else { tvB = "none"; }*/ gdp.currPlaylist = { "title": playlistName, "viewCount": viewCount, "shortVideoCount": shortVideoCount, "shortViewCount": shortViewCount, "description": desc, "id": plId, "firstVideoId": firstVideoId }; gdp.currChan = { "currPage": "playlist", "id": id, "shortId": shortId, "header": { "name": name }, "sidebar": {} }; TheEXFetch(gdp.currChan == null,"nomod","browse","browseId",id); let test = await(d.newChannelInfoRequest.then(function(r) { $("html").setAttribute("channel-about-fetched","true"); gdp.currChan.header.subscribeButton = r.fullAboutObject.subscribeButton; if (r.fullAboutObject.videoCountText) { gdp.currChan.sidebar.videoCount = r.fullAboutObject.videoCountText; gdp.currChan.sidebar.shortVideoCount = r.fullAboutObject.videoCountText.split(" v")[0]; } else { gdp.currChan.sidebar.videoCount = "No videos"; gdp.currChan.sidebar.shortVideoCount = "0"; } if (r.fullAboutObject.viewCountText) { gdp.currChan.header.viewCount = r.fullAboutObject.viewCountText; gdp.currChan.header.shortViewCount = r.fullAboutObject.viewCountText.split(" v")[0]; } else { gdp.currChan.header.viewCount = "No views"; gdp.currChan.header.shortViewCount = "0"; } if (r.fullAboutObject.description) { gdp.currChan.sidebar.description = r.fullAboutObject.description.replaceAll("\n","
"); } if (r.avatar) { let avatar = r.avatar.split("=s")[0] + "=s108"; gdp.currChan.header.pfp = avatar; } gdp.currChan.header.subCount = numberWithCommas(r.subscriberCount); gdp.currChan.header.shortSubCount = numberWithCommas(r.subscriberCount); if (r.fullAboutObject.joinedDateText) { gdp.currChan.sidebar.joinedDate = r.fullAboutObject.joinedDateText.content; gdp.currChan.sidebar.shortJoinedDate = r.fullAboutObject.joinedDateText.content.split("d ")[1]; } else { gdp.currChan.sidebar.joinedDate = "Joined Dec 31, 1969"; gdp.currChan.sidebar.shortJoinedDate = "Dec 31, 1969"; } $("html").setAttribute("playlist-data-done","true"); return r.fullAboutObject; })); } } async function grabChannelData(x) { currChanData = $("#content").data.twoColumnBrowseResultsRenderer.items[0].brandedPageV2Renderer; let d = currChanData; let c4h = d.header.c4TabbedHeaderRenderer; let meta = d.metadata.channelMetadataRenderer; //let ncir = d.newChannelInfoRequest.value; let currPage = d.channelSubpage; let desc = meta.description; desc = desc.replaceAll("\n","
"); let name = meta.title; let pfp = meta.avatar.thumbnails[0].url; let id = meta.externalId; let shortId = id.split("UC")[1]; let lastId; if (gdp.currChan) { lastId = gdp.currChan.id; } if (lastId == id && x !== "x" && gdp.currChan.currPage !== "playlist") { gdp.currChan.content = ""; gdp.currChan.currPage = d.channelSubpage; getActiveTab(d).then(result => { gdp.currChan.content = result; }); } else { $("html").setAttribute("channel-about-fetched","false"); let tvB = ""; if (gdp.currChan && lastId == id && c4h.banner) { tvB = gdp.currChan.header.tvBanner; } else if (c4h.banner) { $("html").setAttribute("c4banner",""); let moddo = c4h.banner; if (c4h.tvBanner) { tvB = c4h.tvBanner.thumbnails; tvB.forEach(i => { tvB = i.url; }); } else { TheEXFetch(gdp.currChan == null,"nomod","browse","browseId",id); } } else { tvB = "none"; $("html").setAttribute("c4banner",""); $("html").removeAttribute("c4banner"); } //let aboutChan = c4h.tagline.channelTaglineRenderer.moreEndpoint.showEngagementPanelEndpoint.engagementPanel.engagementPanelSectionListRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer.contents[0].continuationItemRenderer.continuationEndpoint.continuationCommand.token; gdp.currChan = { "id": id, "shortId": shortId, "currPage": currPage, "header": { "name": name, "pfp": pfp, "banner": "", "tvBanner": tvB }, "sidebar": { "description": desc } }; getActiveTab(d).then(result => { gdp.currChan.content = result; }); let test = await(d.newChannelInfoRequest.then(function(r) { $("html").setAttribute("channel-about-fetched","true"); gdp.currChan.header.subscribeButton = r.fullAboutObject.subscribeButton; if (r.fullAboutObject.videoCountText) { gdp.currChan.sidebar.videoCount = r.fullAboutObject.videoCountText; gdp.currChan.sidebar.shortVideoCount = r.fullAboutObject.videoCountText.split(" v")[0]; } else { gdp.currChan.sidebar.videoCount = "No videos"; gdp.currChan.sidebar.shortVideoCount = "0"; } if (r.fullAboutObject.viewCountText) { gdp.currChan.header.viewCount = r.fullAboutObject.viewCountText; gdp.currChan.header.shortViewCount = r.fullAboutObject.viewCountText.split(" v")[0]; } else { gdp.currChan.header.viewCount = "No views"; gdp.currChan.header.shortViewCount = "0"; } gdp.currChan.header.subCount = numberWithCommas(r.subscriberCount); gdp.currChan.header.shortSubCount = numberWithCommas(r.subscriberCount); if (r.fullAboutObject.joinedDateText) { gdp.currChan.sidebar.joinedDate = r.fullAboutObject.joinedDateText.content; gdp.currChan.sidebar.shortJoinedDate = r.fullAboutObject.joinedDateText.content.split("d ")[1]; } else { gdp.currChan.sidebar.joinedDate = "Joined Dec 31, 1969"; gdp.currChan.sidebar.shortJoinedDate = "Dec 31, 1969"; } if (r.fullAboutObject.country) { gdp.currChan.sidebar.country = r.fullAboutObject.country; } if (r.fullAboutObject.links) { gdp.currChan.sidebar.links = r.fullAboutObject.links; } return r.fullAboutObject; })); } } function doChannelBanner(result) { if (result.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.header.channelHeaderRenderer.backgroundImage) { let thumbs = result.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.header.channelHeaderRenderer.backgroundImage.thumbnails; let thumbsL = thumbs.length - 1; let tvB = thumbs[thumbsL].url; gdp.currChan.header.tvBanner = tvB; $("html").style.setProperty("--tvbg",'no-repeat url(' + tvB + ')'); } else { gdp.currChan.header.tvBanner = null $("html").style.setProperty("--tvbg",'no-repeat url(' + null + ')'); } } // EXfunct async function createChannels3Prep() { if ($("#page.channel")) { createChannels3(); } else { if ($("[playlist-data-done='true']")) { createChannels3(); } else { var elm = "[playlist-data-done='true']"; waitForElement10(elm).then(function(elm) { if (canGo != false) { createChannels3(); } }); } } } // EXfunct async function createChannels3() { if ($("#c3-sidebar") == null) { if ($("#page.channel") || $("[location='playlist']")) { let version; if ($("#page.channel")) { version = "channel"; } else { version = "playlist"; } let container = $("#content"); let newElem = document.createElement("div"); newElem.id = "c3-container"; newElem.innerHTML = ` `; container.insertBefore(newElem,container.children[0]); //$("#content").style.background = "repeat-y url(" + gdp.currChan.header.tvBanner + ")"; $("html").style.setProperty("--tvbg",'no-repeat url(' + gdp.currChan.header.tvBanner + ')'); const img = new Image(); img.onload = function() { $("html").style.setProperty("--tvbanner-width",this.width + "px"); } $("#c3-channel-pfp img").src = gdp.currChan.header.pfp; $("#c3-channel-name .c3-name").textContent = gdp.currChan.header.name; $("#c3-channel-name .c3-name-link").textContent = gdp.currChan.header.name; if (version == "playlist") { $("#c3-playlist-title span").textContent = gdp.currPlaylist.title; $(".c3-playall a").href = "/watch?v=" + gdp.currPlaylist.firstVideoId + "&list=" + gdp.currPlaylist.id; } img.src = gdp.currChan.header.tvBanner; if ($(".c4-module-is-editable") == null) { var elm = "#c4-primary-header-contents .yt-uix-button-subscription-container"; waitForElement10(elm).then(function(elm) { if (canGo != false) { let btn = $("#c4-primary-header-contents .yt-uix-button-subscription-container"); let newHome = $("#st-space"); if (btn !== null) { newHome.append(btn); btn = $("#st-space .yt-uix-button-subscription-container"); if (version == "channel") { newHome = $("#c3-subscribe"); } else { newHome = $("#c3-sidebar-subscribe"); } newHome.append(btn); } } }); } if ($(".c4-player-container")) { var elm = ".video-player-view-component video"; waitForElement10(elm).then(function(elm) { if (canGo != false) { //$(".c4-player-container video").remove(); let btn = $(".video-player-view-component"); let newHome = $("#st-space"); if (btn !== null) { newHome.append(btn); btn = $("#st-space .video-player-view-component"); newHome = $("#c3-featured-slot"); newHome.append(btn); } } }); } if (version == "playlist") { var elm = ".pl-video-list"; waitForElement10(elm).then(function(elm) { if (canGo != false) { //$(".c4-player-container video").remove(); let btn = $(".pl-video-list"); let newHome = $("#st-space"); if (btn !== null) { newHome.append(btn); btn = $("#st-space .pl-video-list"); newHome = $("#c3-content-items"); newHome.append(btn); } } }); } switch (gdp.currChan.currPage) { case "featured": $("#c3-featured-tab").classList.add("active"); break; case "videos": $("#c3-videos-tab").classList.add("active"); $("#c3-uploads-nav").classList.add("active"); $(".c3").classList.add("is-videos"); fillC3Page("videos"); break; case "playlists": $("#c3-videos-tab").classList.add("active"); $("#c3-playlists-nav").classList.add("active"); $(".c3").classList.add("is-videos"); fillC3Page("playlists"); break; case "community": $("#c3-feed-tab").classList.add("active"); $("#c3-backstage-nav").classList.add("active"); $(".c3").classList.add("is-feed"); fillC3Page("backstage"); break; case "feed": $("#c3-feed-tab").classList.add("active"); $(".c3").classList.add("is-feed"); break; case "search": $("#c3-search").classList.add("active"); $(".c3").classList.add("is-search"); fillC3Page("search"); break; case "about": $("#c3-featured-tab").classList.add("active"); $(".c3").classList.add("is-home"); break; case "playlist": $(".c3").classList.add("is-playlist"); fillC3Page("playlist"); break; default: } if ($('[channel-location="feed"]')) { $("#c3-feed-tab").classList.add("active"); $("#c3-activity-nav").classList.add("active"); $("#c3-featured-tab").classList.remove("active"); $(".c3").classList.add("is-feed"); fillC3Page("feed"); } if ($('[channel-location="home"]')) { $("#c3-featured-tab").classList.add("active"); $(".c3").classList.add("is-home"); fillC3Page("home"); } let homeData = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: gdp.currChan.id, canonicalBaseUrl: "/channel/" + gdp.currChan.id }, commandMetadata: { webCommandMetadata: { url: "/channel/" + gdp.currChan.id } } } } } $("#c3-channel-pfp").data = homeData; $(".c3-name-link").data = homeData; $("#c3-featured-tab").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: gdp.currChan.id, canonicalBaseUrl: "/channel/" + gdp.currChan.id + "/featured" }, commandMetadata: { webCommandMetadata: { url: "/channel/" + gdp.currChan.id + "/featured" } } } } } let c3FeedData = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: gdp.currChan.id, canonicalBaseUrl: "/channel/" + gdp.currChan.id + "/feed", params: "EghmZWF0dXJlZPIGBAoCMgA%3D" }, commandMetadata: { webCommandMetadata: { url: "/channel/" + gdp.currChan.id + "/feed" } } } } } let c3VidsData = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: gdp.currChan.id, canonicalBaseUrl: "/channel/" + gdp.currChan.id + "/videos?view=0", params: "EgZ2aWRlb3PyBgQKAjoA" }, commandMetadata: { webCommandMetadata: { url: "/channel/" + gdp.currChan.id + "/videos?view=0" } } } } } $("#c3-playlists-nav").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: gdp.currChan.id, canonicalBaseUrl: "/channel/" + gdp.currChan.id + "/playlists", params: "EglwbGF5bGlzdHPyBgQKAkIA" }, commandMetadata: { webCommandMetadata: { url: "/channel/" + gdp.currChan.id + "/playlists" } } } } } $("#c3-backstage-nav").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: gdp.currChan.id, canonicalBaseUrl: "/channel/" + gdp.currChan.id + "/community", params: "Egljb21tdW5pdHnyBgQKAkoA" }, commandMetadata: { webCommandMetadata: { url: "/channel/" + gdp.currChan.id + "/community" } } } } } $("#c3-videos-tab").data = c3VidsData; $("#c3-uploads-nav").data = c3VidsData; $("#c3-feed-tab").data = c3FeedData; $("#c3-activity-nav").data = c3FeedData; if ($("[channel-about-fetched='true']")) { fillC3Blanks(); } else { var elm = "[channel-about-fetched='true']"; waitForElement10(elm).then(function(elm) { if (canGo != false) { fillC3Blanks(); } }); } } } } function fillC3Page(page, n, api) { let number; if (n == null) { number = 0; } else { number = n; } if (page == "search") { gdp.currChan.content.forEach(i => { if (i.itemSectionRenderer) { if (i.itemSectionRenderer.contents[0].videoRenderer) { createRenderer(i.itemSectionRenderer.contents[0].videoRenderer, "channelGridVideo", number, gdp.currChan.content.length); } } number++; }); } if (page == "playlist") { let container = $("#c3-content-header"); let newElem = document.createElement("div"); newElem.classList = "c3-playlist-desc"; newElem.innerHTML = ` ${gdp.currPlaylist.description} `; container.insertBefore(newElem,container.children[0]); } if (page == "videos") { gdp.currChan.content.forEach(i => { if (i.richItemRenderer) { i = i.richItemRenderer.content.videoRenderer; let i2 = i.contextItemData; let href; let viewCount; let publishDate; let title; let thumbnail = i.thumbnail.thumbnails[0].url; if (api == "innertube") { href = i.navigationEndpoint.commandMetadata.webCommandMetadata.url; viewCount = i.viewCountText.simpleText; publishDate = i.publishedTimeText.simpleText; title = i.title.runs[0].text; } else { href = i2.href; viewCount = i2.viewCount; publishDate = i2.publishDate; title = i2.title; } if (i.thumbnail.thumbnails[3]) { thumbnail = i.thumbnail.thumbnails[3].url; } let container = $("#c3-content-items"); let newElem = document.createElement("div"); newElem.classList = "channels-content-item yt-shelf-grid-item"; newElem.innerHTML = `

${title}

  • ${viewCount}
  • ${publishDate}
`; container.insertBefore(newElem,container.children[number]); newElem.querySelector(".yt-uix-sessionlink").setAttribute("title",title); newElem.querySelector("a").data = { abstractVorElement: { navigationEndpoint: { watchEndpoint: { videoId: i.videoId, canonicalBaseUrl: href }, commandMetadata: { webCommandMetadata: { url: href } } } } }; newElem.querySelectorAll("a")[1].data = { abstractVorElement: { navigationEndpoint: { watchEndpoint: { videoId: i.videoId, canonicalBaseUrl: href }, commandMetadata: { webCommandMetadata: { url: href } } } } }; } if (i.continuationItemRenderer) { //continuationEndpoint.continuationCommand let container = $("#c3-content-items"); let newElem = document.createElement("div"); newElem.classList = "c3-continuation"; newElem.innerHTML = ` `; container.insertBefore(newElem,container.children[number]); if (!window.location.href.includes("view=0")) { $(".c3-continuation button").setAttribute("disabled",""); $(".c3-continuation .run").textContent = "Please go to /videos?view=0 to load more videos."; } else { newElem.querySelector("button").addEventListener("click", function() { let key = i.continuationItemRenderer.continuationEndpoint.continuationCommand.token; if (gdp.loggedIn == true) { EXFetch("none","doubleLoggedIn","browse","browseId",gdp.currChan.id,"params","EghjaGFubmVsc_IGBAoCUgA%3D","continuation",key).then(result => { newElem.remove(); gdp.currChan.content = result.onResponseReceivedActions[0].appendContinuationItemsAction.continuationItems; fillC3Page("videos",number,"innertube"); }); } else { EXFetch("none","double","browse","browseId",gdp.currChan.id,"params","EghjaGFubmVsc_IGBAoCUgA%3D","continuation",key).then(result => { newElem.remove(); gdp.currChan.content = result.onResponseReceivedActions[0].appendContinuationItemsAction.continuationItems; fillC3Page("videos",number,"innertube"); }); } }); } } number++; }); if ($("#c3-content-items .c3-loading")) { $("#c3-content-items .c3-loading").remove(); } } if (page == "playlists") { gdp.currChan.content.forEach(i => { if (i.gridPlaylistRenderer) { i = i.gridPlaylistRenderer; let i2 = i.contextItemData; let href; let videoId; if (i2 == null) { href = i.navigationEndpoint.commandMetadata.webCommandMetadata.url; videoId = i.navigationEndpoint.watchEndpoint.videoId; } else { href = i2.href; videoId = i.originalNavigationEndpoint.watchEndpoint.videoId; } let container = $("#c3-content-items"); let newElem = document.createElement("div"); newElem.classList = "channels-content-item yt-shelf-grid-item"; newElem.innerHTML = ` `; container.insertBefore(newElem,container.children[number]); let numberT = 0; newElem.querySelector(".yt-pl-thumb-link").data = { abstractVorElement: { navigationEndpoint: { watchEndpoint: { videoId: videoId, playlistId: i.playlistId, canonicalBaseUrl: href }, commandMetadata: { webCommandMetadata: { url: href } } } } } newElem.querySelector(".yt-uix-sessionlink").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "VL" + i.playlistId }, commandMetadata: { webCommandMetadata: { url: "/playlist?list=" + i.playlistId } } } } } if (i.sidebarThumbnails) { i.sidebarThumbnails.forEach(xl => { if (xl.empty == null) { newElem.querySelectorAll(".sidethumb img")[numberT].src = xl.thumbnails[0].url; } else { newElem.querySelectorAll(".sidethumb")[numberT].classList.add("empty"); } numberT++; }); } else { newElem.querySelectorAll(".sidethumb").forEach(c => { c.classList.add("empty"); }); } //i.sidebarThumbnails[0].thumbnails[0].url ?? null } if (i.continuationItemRenderer) { let container = $("#c3-content-items"); let newElem = document.createElement("div"); newElem.classList = "c3-continuation"; newElem.innerHTML = ` `; container.insertBefore(newElem,container.children[number]); newElem.querySelector("button").addEventListener("click", function() { let key = i.continuationItemRenderer.continuationEndpoint.continuationCommand.token; if (gdp.loggedIn == true) { EXFetch("none","doubleLoggedIn","browse","browseId",gdp.currChan.id,"params","EghjaGFubmVsc_IGBAoCUgA%3D","continuation",key).then(result => { newElem.remove(); gdp.currChan.content = result.onResponseReceivedActions[0].appendContinuationItemsAction.continuationItems; fillC3Page("playlists",number,"innertube"); }); } else { EXFetch("none","double","browse","browseId",gdp.currChan.id,"params","EghjaGFubmVsc_IGBAoCUgA%3D","continuation",key).then(result => { newElem.remove(); gdp.currChan.content = result.onResponseReceivedActions[0].appendContinuationItemsAction.continuationItems; fillC3Page("playlists",number,"innertube"); }); } }); } number++; }); } if (page == "feed") { gdp.currChan.content.forEach(i => { if (i.__DOM_REFERENCE && i.feedItemRenderer) { setTimeout(function() { createFeedItem(i, number, "feed"); }, 500); } else if (i.continuationItemRenderer) { setTimeout(function() { //createFeedItem(i, number, "cont"); }, 1000); } else if (i.continuationItemRenderer == null) { setTimeout(function() { createFeedItem(i, number, "feed"); }, 1250); } number++; }); } if (page == "backstage") { let container = $("#c3-content-items"); let newElem = document.createElement("div"); newElem.classList = "c3-warning-banner"; newElem.id = "c3-backstage-warning"; newElem.innerHTML = `
Alert icon
`; container.insertBefore(newElem,container.children[number]); $("#c3-backstage-warning .close").addEventListener("click", function() { $("#c3-backstage-warning").remove(); }); $("#c3-redir").href = "/channel/" + gdp.currChan.id + "/community?force-c4"; $("#c3-redir").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: gdp.currChan.id, canonicalBaseUrl: "/channel/" + gdp.currChan.id + "/community?force-c4", params: "Egljb21tdW5pdHnyBgQKAkoA" }, commandMetadata: { webCommandMetadata: { url: "/channel/" + gdp.currChan.id + "/community?force-c4" } } } } }; gdp.currChan.content.forEach(i => { if (i.__DOM_REFERENCE && i.backstagePostThreadRenderer) { setTimeout(function() { createBackstagePost(i, number); }, 500); } number++; }); } if (page == "home") { EXFetch("none","single","browse","browseId",gdp.currChan.id,"params","EgZ2aWRlb3PyBgQKAjoA").then(result => { buildFeaturedList(result.contents.twoColumnBrowseResultsRenderer.tabs[1].tabRenderer.content.richGridRenderer.contents, number); }); gdp.currChan.content.forEach(i => { if (i.itemSectionRenderer) { if (i.itemSectionRenderer.contents[0].channelFeaturedContentRenderer) { buildFeaturedContent(i.itemSectionRenderer.contents[0].channelFeaturedContentRenderer, number); } if (i.itemSectionRenderer.contents[0].channelVideoPlayerRenderer) { //buildChannelPlayer(i.itemSectionRenderer.contents[0].channelVideoPlayerRenderer, number); } if ( i.itemSectionRenderer.contents[0].shelfRenderer && i.itemSectionRenderer.contents[0].shelfRenderer.content.horizontalListRenderer && i.itemSectionRenderer.contents[0].shelfRenderer.content.horizontalListRenderer.items[0].gridChannelRenderer ) { var elm = "#c3-featured-channels-slot"; waitForElement10(elm).then(function(elm) { if (canGo != false) { buildFeaturedChannels(i.itemSectionRenderer.contents[0].shelfRenderer, number); } }); } if ( i.itemSectionRenderer.contents[0].shelfRenderer && i.itemSectionRenderer.contents[0].shelfRenderer.content.horizontalListRenderer && i.itemSectionRenderer.contents[0].shelfRenderer.content.horizontalListRenderer.items[0].gridPlaylistRenderer ) { var elm = "#c3-featured-playlists-slot"; waitForElement10(elm).then(function(elm) { if (canGo != false) { buildFeaturedPlaylists(i.itemSectionRenderer.contents[0].shelfRenderer, number); } }); } } /*if (i.__DOM_REFERENCE.classList[6] == "expanded-shelf-content-list") { buildFeaturedList(i.itemSectionRenderer.contents[0].shelfRenderer.content, number); }*/ number++; }); } } function buildChannelPlayer(Bdata, number) { let id = Bdata.videoId; let container = $("#c3-featured-slot"); let newElem = document.createElement("div"); newElem.classList = "c3-featured-content"; newElem.id = "c3-player-container"; newElem.innerHTML = `
`; container.insertBefore(newElem,container.children[0]); /*let href = newElem.querySelector(".yt-lockup-title a").href; let id = href.split("/watch?v=")[1]; let data = { abstractVorElement: { navigationEndpoint: { watchEndpoint: { videoId: id, canonicalBaseUrl: href }, commandMetadata: { webCommandMetadata: { url: href } } } } }; let authorHref = newElem.querySelector(".yt-user-name").href; let authorId = authorHref.split("/channel/")[1]; let authorData = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: authorId, canonicalBaseUrl: authorHref }, commandMetadata: { webCommandMetadata: { url: authorHref } } } } }; newElem.querySelector(".yt-lockup-title a").data = data; newElem.querySelector(".yt-lockup-thumbnail a").data = data; newElem.querySelector(".yt-user-name").data = authorData;*/ } function buildFeaturedList(Bdata, number) { if ($(".c3-featured-list") == null) { let container = $("#c3-content-items"); let newElem = document.createElement("div"); newElem.classList = "c3-featured-list"; newElem.innerHTML = ` `; container.insertBefore(newElem,container.children[0]); /*let featuredList = Bdata.horizontalListRenderer.items; let newNumber = 0; featuredList.forEach(i => { if (i.gridVideoRenderer) { buildFeaturedContent(i.gridVideoRenderer, "bigListVideo", umber); } newNumber++; });*/ let newNumber = 0; Bdata.forEach(i => { if (i.richItemRenderer) { createRenderer(i.richItemRenderer.content.videoRenderer, "bigListVideo", newNumber, Bdata.length); } newNumber++; }); } } function buildFeaturedChannels(Bdata, number) { if ($(".c3-featured-channels") == null) { let title = Bdata.title.runs[0].text; let list = Bdata.content.horizontalListRenderer.items; let container = $("#c3-featured-channels-slot"); let newElem = document.createElement("div"); newElem.classList = "c3-featured-channels"; newElem.innerHTML = `
${title}
`; container.insertBefore(newElem,container.children[0]); let newNumber = 0; list.forEach(i => { if (i.gridChannelRenderer) { createRenderer(i.gridChannelRenderer, "featuredChannel", newNumber); } newNumber++; }); } } function buildFeaturedPlaylists(Bdata, number) { if ($(".c3-featured-playlists") == null) { let title = Bdata.title.runs[0].text; let list = Bdata.content.horizontalListRenderer.items; let container = $("#c3-featured-playlists-slot"); let newElem = document.createElement("div"); newElem.classList = "c3-featured-playlists"; newElem.innerHTML = `
${title}
`; container.insertBefore(newElem,container.children[0]); let newNumber = 0; list.forEach(i => { if (i.gridPlaylistRenderer) { createRenderer(i.gridPlaylistRenderer, "featuredPlaylist", newNumber); } newNumber++; }); } } function createRenderer(Bdata, renderer, number, length, extra, extra2) { if (number == null) { number = 0; } let i = Bdata; if (renderer == "superCompactVideo") { let pageVid = extra; let currPage = extra2; let container = $("#videos-dd-content"); let newElem = document.createElement("a"); newElem.classList = "super-compact-video sc-video"; newElem.setAttribute("page",currPage); newElem.setAttribute("page-video",pageVid); newElem.innerHTML = `
`; container.insertBefore(newElem,container.children[number]); let video = i.richItemRenderer.content.videoRenderer; let title = video.title.runs[0].text; let time = video.lengthText.simpleText; let views = video.viewCountText.simpleText; let date = video.publishedTimeText.simpleText; let thumbl = video.thumbnail.thumbnails.length; let thumb = video.thumbnail.thumbnails[thumbl - 1].url; let nav = video.navigationEndpoint; let href = "/watch?v=" + video.videoId; newElem.href = href; newElem.querySelector(".sc-video-title span").textContent = title; newElem.querySelector(".sc-video-title").title = title; newElem.querySelector(".sc-video-time span").textContent = time; newElem.querySelector(".sc-video-view-count span").textContent = views; newElem.querySelector(".sc-video-date span").textContent = date; newElem.querySelector(".sc-video-thumbnail img").src = thumb; newElem.data = { abstractVorElement: { navigationEndpoint: nav } } } if (renderer == "altWatch9SCVid") { let id = i.navigationEndpoint.watchEndpoint.videoId; let href = "/watch?v=" + id; let date = i.publishedTimeText.simpleText; let viewCount = i.viewCountText.simpleText; let container = $("#watch9-owner-slider .scroller-inner"); let title = i.title.runs[0].text; let time = i.lengthText.simpleText; let thumbnail = i.thumbnail.thumbnails[2].url; let newElem = document.createElement("li"); newElem.classList = "st-super-compact-video"; newElem.innerHTML = `
${title}
${viewCount}
`; container.insertBefore(newElem,container.children[number]); newElem.data = { abstractVorElement: { navigationEndpoint: { watchEndpoint: { videoId: id, canonicalBaseUrl: href }, commandMetadata: { webCommandMetadata: { url: href } } } } }; container = $("#watch9-owner .scroller-inner"); newElem = document.createElement("li"); newElem.classList = "st-super-compact-video"; newElem.innerHTML = `
${title}
${viewCount}
`; container.insertBefore(newElem,container.children[number]); newElem.data = { abstractVorElement: { navigationEndpoint: { watchEndpoint: { videoId: id, canonicalBaseUrl: href }, commandMetadata: { webCommandMetadata: { url: href } } } } }; } if (renderer == "videosTabCompactVideo") { let id = i.navigationEndpoint.watchEndpoint.videoId; let href = "/watch?v=" + id; let date = i.publishedTimeText.simpleText; let viewCount = i.viewCountText.simpleText; let container = $("#watch-channel-videos"); let title = i.title.runs[0].text; let time = i.lengthText.simpleText; let thumbnail = i.thumbnail.thumbnails[2].url; let newElem = document.createElement("li"); newElem.classList = "video-list-item related-list-item context-data-item"; newElem.innerHTML = ` Thumbnail ${time} ${title} ${viewCount}${date} `; container.insertBefore(newElem,container.children[number]); newElem.querySelector("a").data = { abstractVorElement: { navigationEndpoint: { watchEndpoint: { videoId: id, canonicalBaseUrl: href }, commandMetadata: { webCommandMetadata: { url: href } } } } }; } if (renderer == "thirdColCompactVideo") { let id = i.navigationEndpoint.watchEndpoint.videoId; let href = "/watch?v=" + id; let date = i.publishedTimeText.simpleText; let viewCount = i.viewCountText.simpleText; let owner = i.ownerText.runs[0].text; let container = $("#thirdcol-videos"); let title = i.title.runs[0].text; let time = i.lengthText.simpleText; let thumbnail = i.thumbnail.thumbnails[2].url; let newElem = document.createElement("li"); newElem.classList = "thirdcol-video video-list-item related-list-item context-data-item"; newElem.innerHTML = ` Thumbnail ${time} ${title} by ${owner}${viewCount}${date} `; container.insertBefore(newElem,container.children[number]); newElem.querySelector("a").data = { abstractVorElement: { navigationEndpoint: { watchEndpoint: { videoId: id, canonicalBaseUrl: href }, commandMetadata: { webCommandMetadata: { url: href } } } } }; } if (renderer == "channelGridVideo") { let i2 = i.contextItemData; let href; let viewCount; let publishDate; let title; let thumbnail = i.thumbnail.thumbnails[0].url; href = i2.href; viewCount = i2.viewCount; publishDate = i2.publishDate; title = i2.title; if (i.thumbnail.thumbnails[3]) { thumbnail = i.thumbnail.thumbnails[3].url; } let container = $("#c3-content-items"); let newElem = document.createElement("div"); newElem.classList = "channels-content-item yt-shelf-grid-item"; newElem.innerHTML = `

${title}

  • ${viewCount}
  • ${publishDate}
`; container.insertBefore(newElem,container.children[number]); newElem.querySelector(".yt-uix-sessionlink").setAttribute("title",title); newElem.querySelector("a").data = { abstractVorElement: { navigationEndpoint: { watchEndpoint: { videoId: i.videoId, canonicalBaseUrl: href }, commandMetadata: { webCommandMetadata: { url: href } } } } }; newElem.querySelectorAll("a")[1].data = { abstractVorElement: { navigationEndpoint: { watchEndpoint: { videoId: i.videoId, canonicalBaseUrl: href }, commandMetadata: { webCommandMetadata: { url: href } } } } }; } if (renderer == "featuredPlaylist") { let id = i.contextItemData.playlistId; let href = "/playlist?list=" + id; let href2 = i.contextItemData.href; let author = i.contextItemData.authorNavigationEndpoint.browseEndpoint.browseId; let href3 = "/channel/" + author; let videoId = href2.split("v=")[1].split("&")[0]; let thumb1 = i.thumbnail.thumbnails[0].url; let vidCount = i.videoCountShortText.simpleText; let title = i.title.runs[0].text; let byline = i.contextItemData.byLine; let container = $("#c3-featured-playlists-slot .c3-sidebar-content"); let newElem = document.createElement("div"); newElem.classList = "c3-featured-playlist c3-playlist"; newElem.innerHTML = `
Play all
(${vidCount})
${vidCount}
videos
`; container.insertBefore(newElem,container.children[number]); newElem.querySelector(".c3-playlist-thumbnails").data = { abstractVorElement: { navigationEndpoint: { watchEndpoint: { videoId: videoId, playlistId: i.contextItemData.playlistId, canonicalBaseUrl: href2 }, commandMetadata: { webCommandMetadata: { url: href2 } } } } } newElem.querySelector(".c3-playlist-title").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "VL" + id }, commandMetadata: { webCommandMetadata: { url: href } } } } } newElem.querySelector(".c3-playlist-byline").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: author, canonicalBaseUrl: href3 }, commandMetadata: { webCommandMetadata: { url: href3 } } } } } if (vidCount == 1) { newElem.querySelector(".c3-videos-string").textContent = "video"; } let numberT = 0; if (i.sidebarThumbnails) { i.sidebarThumbnails.forEach(xl => { if (xl.empty == null && newElem.querySelectorAll(".c3-sidethumb:not(.c3-first-thumb)")[numberT]) { newElem.querySelectorAll(".c3-sidethumb:not(.c3-first-thumb) img")[numberT].src = xl.thumbnails[0].url; } else if (newElem.querySelectorAll(".c3-sidethumb:not(.c3-first-thumb)")[numberT]) { newElem.querySelectorAll(".c3-sidethumb:not(.c3-first-thumb)")[numberT].classList.add("empty"); newElem.classList.add("c3-not-full-playlist"); } numberT++; }); } else { newElem.querySelectorAll(".c3-sidethumb:not(.c3-first-thumb)").forEach(c => { c.classList.add("empty"); }); newElem.classList.add("c3-not-full-playlist"); } } if (renderer == "featuredChannel") { let container = $("#c3-featured-channels-slot .c3-sidebar-content"); let newElem = document.createElement("div"); newElem.classList = "c3-featured-channel"; newElem.innerHTML = ` ${i.title.simpleText} ${i.subscriberCountText.simpleText} `; container.insertBefore(newElem,container.children[number]); newElem.querySelector("a").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: i.channelId, canonicalBaseUrl: "/channel/" + i.channelId }, commandMetadata: { webCommandMetadata: { url: "/channel/" + i.channelId } } } } }; } if (renderer == "bigListVideo") { let desc = ""; let id = i.navigationEndpoint.watchEndpoint.videoId; if (i.descriptionSnippet) { desc = i.descriptionSnippet.runs[0].text; } let container = $(".c3-featured-list-items"); let newElem = document.createElement("div"); newElem.classList = "c3-featured-list-item"; newElem.innerHTML = `
  • Thumbnail
${i.lengthText.simpleText} ${i.title.runs[0].text} ${gdp.currChan.header.name} ${i.viewCountText.simpleText} ${i.publishedTimeText.simpleText} ${desc}
  • `; container.insertBefore(newElem,container.children[number]); newElem.querySelector(".video-overview").setAttribute("title",i.title.runs[0].text); newElem.querySelector("a").data = { abstractVorElement: { navigationEndpoint: { watchEndpoint: { videoId: id, canonicalBaseUrl: "/watch?v=" + id }, commandMetadata: { webCommandMetadata: { url: "/watch?v=" + id } } } } }; if (number == 0) { if (length == 31) { length = 30; } var elm = "[channel-about-fetched='true']"; waitForElement10(elm).then(function(elm) { if (canGo != false && $(".c3-featured-header") == null) { container = $("#c3-content-header"); newElem = document.createElement("div"); newElem.classList = "c3-featured-header"; newElem.innerHTML = `
    `; container.insertBefore(newElem,container.children[0]); newElem.querySelector("a").data = { abstractVorElement: { navigationEndpoint: { watchEndpoint: { videoId: id, playlistId: "UU" + gdp.currChan.shortId, canonicalBaseUrl: "/watch?v=" + id + "&list=UU" + gdp.currChan.shortId }, commandMetadata: { webCommandMetadata: { url: "/watch?v=" + id + "&list=UU" + gdp.currChan.shortId } } } } } } }); } } } function buildFeaturedContent(Bdata, number) { let html = Bdata.items[1].__DOM_REFERENCE.outerHTML; let container = $("#c3-featured-slot"); let newElem = document.createElement("div"); newElem.classList = "c3-featured-content"; newElem.innerHTML = html; container.insertBefore(newElem,container.children[0]); var elm = ".c3-featured-content"; waitForElement10(elm).then(function(elm) { if (canGo != false) { let href = newElem.querySelector(".yt-lockup-title a").href; let id = href.split("/watch?v=")[1]; let data = { abstractVorElement: { navigationEndpoint: { watchEndpoint: { videoId: id, canonicalBaseUrl: href }, commandMetadata: { webCommandMetadata: { url: href } } } } }; let authorHref = newElem.querySelector(".g-hovercard .run-link").href; let authorId = authorHref.split("/channel/")[1]; let authorData = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: authorId, canonicalBaseUrl: authorHref }, commandMetadata: { webCommandMetadata: { url: authorHref } } } } }; newElem.querySelector(".yt-lockup-title a").data = data; newElem.querySelector(".yt-lockup-thumbnail a").data = data; newElem.querySelector(".g-hovercard .run-link").data = authorData; } }); } function createFeedItem(i, number, type) { let html = i.__DOM_REFERENCE.outerHTML; let container = $("#c3-content-items"); let newElem = document.createElement("div"); newElem.classList = "c3-feed-item"; newElem.innerHTML = html; container.insertBefore(newElem,container.children[number]); setTimeout(function() { if (type == "feed") { if (newElem.querySelector(".yt-lockup-title a")) { let href = newElem.querySelector(".yt-lockup-title a").href; let id = href.split("/watch?v=")[1]; let data = { abstractVorElement: { navigationEndpoint: { watchEndpoint: { videoId: id, canonicalBaseUrl: href }, commandMetadata: { webCommandMetadata: { url: href } } } } }; newElem.querySelector(".yt-lockup-title a").data = data; newElem.querySelector(".yt-lockup-thumbnail a").data = data; } let authorHref = newElem.querySelector(".feed-author-bubble").href; let authorId = authorHref.split("/channel/")[1]; let authorData = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: authorId, canonicalBaseUrl: authorHref }, commandMetadata: { webCommandMetadata: { url: authorHref } } } } }; newElem.querySelector(".feed-author-bubble").data = authorData; newElem.querySelector(".yt-user-name").data = authorData; } }, 100); } function createBackstagePost(i, number) { let html = i.__DOM_REFERENCE.outerHTML; let container = $("#c3-content-items"); let newElem = document.createElement("div"); newElem.classList = "c3-backstage"; newElem.innerHTML = html; container.insertBefore(newElem,container.children[number]); } function fillC3Blanks() { $("#c3-header-meta").innerHTML = `
    ${gdp.currChan.header.shortSubCount} subscribers
    ${gdp.currChan.header.shortViewCount} video views
    videos
    views
    `; if (gdp.currPlaylist) { $("#c3-pl-view-count span").textContent = gdp.currPlaylist.shortViewCount; $("#c3-pl-video-count span").textContent = gdp.currPlaylist.shortVideoCount; } $("#c3-sidebar").innerHTML = `
    About ${gdp.currChan.header.name}
    ${gdp.currChan.sidebar.description}
    Date Joined
    ${gdp.currChan.sidebar.shortJoinedDate}
    Location
    ${gdp.currChan.sidebar.country}
    Uploads
    ${gdp.currChan.sidebar.videoCount}
    `; 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 = `
    Uploaded Videos (${gdp.currChan.sidebar.shortVideoCount})
    `; let rgi = $("#content").data.twoColumnBrowseResultsRenderer.items[0].brandedPageV2Renderer.tabs[1].tabRenderer.richGridInfo; let chipBar0 = rgi.header.feedFilterChipBarRenderer.contents[0].chipCloudChipRenderer.navigationEndpoint.continuationCommand.token; let chipBar1 = rgi.header.feedFilterChipBarRenderer.contents[1].chipCloudChipRenderer.navigationEndpoint.continuationCommand.token; let chipBar2 = rgi.header.feedFilterChipBarRenderer.contents[2].chipCloudChipRenderer.navigationEndpoint.continuationCommand.token; if (!window.location.href.includes("view=0")) { } else { $("#c3-sort-popular").addEventListener("click", function() { $("#c3-content-items").innerHTML = `

    Loading...

    `; $("#c3-filter-dropdown").setAttribute("state","popular"); $("#c3-filter-menu").setAttribute("state","popular"); let key = chipBar1; if (gdp.loggedIn == true) { EXFetch("none","doubleLoggedIn","browse","browseId",gdp.currChan.id,"params","EghjaGFubmVsc_IGBAoCUgA%3D","continuation",key).then(result => { gdp.currChan.content = result.onResponseReceivedActions[1].reloadContinuationItemsCommand.continuationItems; fillC3Page("videos",0,"innertube"); }); } else { EXFetch("none","double","browse","browseId",gdp.currChan.id,"params","EghjaGFubmVsc_IGBAoCUgA%3D","continuation",key).then(result => { gdp.currChan.content = result.onResponseReceivedActions[1].reloadContinuationItemsCommand.continuationItems; fillC3Page("videos",0,"innertube"); }); } }); $("#c3-sort-newest").addEventListener("click", function() { $("#c3-filter-dropdown").setAttribute("state","newest"); $("#c3-filter-menu").setAttribute("state","newest"); $("#c3-content-items").innerHTML = `

    Loading...

    `; let key = chipBar0; if (gdp.loggedIn == true) { EXFetch("none","doubleLoggedIn","browse","browseId",gdp.currChan.id,"params","EghjaGFubmVsc_IGBAoCUgA%3D","continuation",key).then(result => { gdp.currChan.content = result.onResponseReceivedActions[1].reloadContinuationItemsCommand.continuationItems; fillC3Page("videos",0,"innertube"); }); } else { EXFetch("none","double","browse","browseId",gdp.currChan.id,"params","EghjaGFubmVsc_IGBAoCUgA%3D","continuation",key).then(result => { gdp.currChan.content = result.onResponseReceivedActions[1].reloadContinuationItemsCommand.continuationItems; fillC3Page("videos",0,"innertube"); }); } }); $("#c3-sort-oldest").addEventListener("click", function() { $("#c3-filter-dropdown").setAttribute("state","oldest"); $("#c3-filter-menu").setAttribute("state","oldest"); $("#c3-content-items").innerHTML = `

    Loading...

    `; let key = chipBar2; if (gdp.loggedIn == true) { EXFetch("none","doubleLoggedIn","browse","browseId",gdp.currChan.id,"params","EghjaGFubmVsc_IGBAoCUgA%3D","continuation",key).then(result => { gdp.currChan.content = result.onResponseReceivedActions[1].reloadContinuationItemsCommand.continuationItems; fillC3Page("videos",0,"innertube"); }); } else { EXFetch("none","double","browse","browseId",gdp.currChan.id,"params","EghjaGFubmVsc_IGBAoCUgA%3D","continuation",key).then(result => { gdp.currChan.content = result.onResponseReceivedActions[1].reloadContinuationItemsCommand.continuationItems; fillC3Page("videos",0,"innertube"); }); } }); } } if (gdp.currChan.currPage == "playlists") { $("#c3-content-header").innerHTML = `
    Playlists
    `; } 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("x"); setTimeout(createThirdColumn, 2000); checkContentMargin(); function checkContentMargin() { if ( $("#content") && $("[static] #appbar-guide-menu") ) { var rock = $("#content").getBoundingClientRect(); $("#appbar-guide-menu").style.left = rock.left + "px"; $("html").style.setProperty("--guide-left",rock.left + "px"); if ($("#masthead-positioner")) { var stone = $("#masthead-positioner").getBoundingClientRect(); $("#appbar-guide-menu").style.top = stone.height + "px"; $("html").style.setProperty("--guide-top",stone.height + "px"); } $("#appbar-guide-menu").style.height = rock.height - 20 + "px"; $("html").style.setProperty("--guide-height",rock.height - 20 + "px"); } } setTimeout(everyLoad, 1000); // sometimes 's attributes "reset" halfway through loading, causing some settings to not apply, this should correct that when it happens. Done twice until I find a better way to do it. setTimeout(everyLoad, 3000); setTimeout(everyLoad, 6000); setTimeout(everyLoad, 10000); setTimeout(everyLoad, 15000); setTimeout(everyLoad, 20000); setTimeout(checkContentMargin, 1500); setTimeout(checkContentMargin, 3000); var elm = "#page"; waitForElement10(elm).then(function(elm) { if (canGo != false) { if (STS.expMoveGuideMainSectionToTop == true) { var elm = ".guide-section"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var guideSection0 = document.querySelectorAll(".guide-section")[1]; var guideSection1 = document.querySelectorAll(".guide-section")[0]; var guideSection2 = document.querySelectorAll(".guide-section")[2]; var guideSection3 = document.querySelectorAll(".guide-section")[3]; var newHome = document.querySelector('.guide-toplevel'); newHome.appendChild(guideSection0); newHome.appendChild(guideSection1); newHome.appendChild(guideSection2); newHome.appendChild(guideSection3); } }); } } }); var interval = setInterval(function() { if (STS.expViewsString == true) { if ($(".watch-view-count") != null) { if (!$(".watch-view-count").textContent.includes('view') && !$(".watch-view-count").textContent.includes('wa')) { var tC = $(".watch-view-count").textContent; $(".watch-view-count").textContent = tC + " views"; } } } }, 500); setTimeout(interval, 10); function createWelcomeAlert() { let container = document.querySelector("#alerts"); var newElem = document.createElement("div"); newElem.id = "st-welcome-alert"; newElem.innerHTML = `
    Alert icon
    `; container.insertBefore(newElem, container.children[0]); newElem.querySelector(".close").addEventListener("click", function() { newElem.style.display = "none"; closedWelcomeBanner = true; STS.showWelcomeBanner = false; applySettings(); }); } function createEFYTAlert() { let container = document.querySelector("#alerts"); var newElem = document.createElement("div"); newElem.id = "st-efyt-alert"; newElem.innerHTML = `
    Alert icon
    `; container.insertBefore(newElem, container.children[0]); newElem.querySelector(".close").addEventListener("click", function() { newElem.style.display = "none"; closedEFYTBanner = true; }); switch (bannerNo) { case 1: newElem.querySelector(".yt-alert").classList.add("yt-alert-info"); break; case 2: newElem.querySelector(".yt-alert").classList.add("yt-alert-warn"); break; case 3: newElem.querySelector(".yt-alert").classList.add("yt-alert-error"); break; } } function createThirdColumn() { if ( $("#page.home") && STS.expAozoraHome == true && !window.location.href.includes("/feed") ) { // $(".branded-page-v2-secondary-col").innerHTML = ``; let stolenRecoms = ""; if ($(".lohp-newspaper-shelf")) { stolenRecoms = document.querySelectorAll(".feed-item-container")[1]; } else { stolenRecoms = $(".feed-item-container"); } if (stolenRecoms.querySelector(".lohp-newspaper-shelf")){ stolenRecoms = document.querySelectorAll(".feed-item-container")[2]; } let newHome = $(".branded-page-v2-secondary-col .branded-page-box"); stolenRecoms.style.display = "block"; newHome.appendChild(stolenRecoms); let container = document.querySelector(".branded-page-v2-secondary-col"); var newElem = document.createElement("div"); newElem.id = "epic-panda-rules"; newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[0]); var elm = ".feed-item-container:nth-child(10) img"; waitForElement500(elm).then(function(elm) { if (canGo != false) { let arrayShelves = document.querySelectorAll(".compact-shelf"); arrayShelves.forEach(itemRoot => { if (itemRoot) { itemRoot.classList.add("rule-added"); var newElem = document.createElement("div"); newElem.setAttribute("class","horizontal-rule"); newElem.innerHTML = ` `; itemRoot.insertBefore(newElem, itemRoot.children[0]); } }); } }); } } function createShelfIcons() { if ( STS.expPolymerStyles == true && !window.location.href.includes("/feed") ) { if ($(".home") || $(".channel")) { var elm = ".yt-uix-shelfslider-next"; waitForElement500(elm).then(function(elm) { if (canGo != false) { let arrayShelves = document.querySelectorAll(".compact-shelf"); arrayShelves.forEach(itemRoot => { if (itemRoot.querySelector(".yt-uix-shelfslider-next:not(.icon-added) .yt-uix-button-icon-wrapper")) { let next = itemRoot.querySelector(".yt-uix-shelfslider-next:not(.icon-added) .yt-uix-button-icon-wrapper"); next.parentNode.classList.add("icon-added"); next.parentNode.classList.add("st-shelf-btn"); var newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg"); newElem.innerHTML = `
    `; next.insertBefore(newElem,next.children[0]); } if (itemRoot.querySelector(".yt-uix-shelfslider-prev:not(.icon-added) .yt-uix-button-icon-wrapper")) { let prev = itemRoot.querySelector(".yt-uix-shelfslider-prev:not(.icon-added) .yt-uix-button-icon-wrapper"); prev.parentNode.classList.add("icon-added"); prev.parentNode.classList.add("st-shelf-btn"); var newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg"); newElem.innerHTML = `
    `; prev.insertBefore(newElem,prev.children[0]); } }); } }); } } } function createFeedText() { if (document.querySelector(".epic-panda-header") == null) { var elm = ".branded-page-v2-subnav-container"; waitForElement10(elm).then(function(elm) { if (canGo != false) { let container = document.querySelector('.feed-item-container'); var newElem = document.createElement("div"); newElem.class = "epic-panda-header"; newElem.innerHTML = ` From YouTube `; container.insertBefore(newElem, container.children[0]); } }); } } if (document.querySelector("#st-settings-button") == null) { /* setTimeout(function() { createExpandedFooter(); }, 2000); var elm = "#yt-masthead-content"; waitForElement10(elm).then(function(elm) { if (canGo != false) { if (document.querySelector("#st-settings-button") == null) { createExpandedFooter(); } } });*/ var elm = "#footer"; waitForElement10(elm).then(function(elm) { if (canGo != false) { if ($(".oz-expand-debugger-icon")) { $(".oz-expand-debugger-icon").addEventListener("click", function() { if (document.querySelector("#st-settings-button") == null) { createExpandedFooter(); } }); } else if ($("#upload-menu-account")) { $("#upload-menu-account:not(.yt-uix-button-menu-new-section-separator)").addEventListener("click", function() { if (document.querySelector("#st-settings-button") == null) { createOOBEAccessBtn(); } }); } if ($(".astro-settings") == null) { createSettingsMenu(); } } }); } function deleteTitleOnTop() { if ( $("#watch5-above-container") ) { $("#watch5-above-container").remove(); } } function guideAlwaysPinned() { if (document.querySelector(".guide-pinning-enabled") == null) { document.querySelector("body").classList.add("guide-pinning-enabled"); } if (document.querySelector(".guide-pinned") == null) { document.querySelector("body").classList.add("guide-pinned"); } if (document.querySelector(".guide-guide") == null) { document.querySelector("body").classList.add("show-guide"); } } function hideYoodles() { if ($("#logo-container.doodle")) { $("#logo-container.doodle").classList.remove("doodle"); $("#logo-container img").src = "//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif"; if ($(".content-region")) { $(".content-region").removeAttribute("style"); } } } function createRelatedTabsPrep() { if (document.querySelector(".watch") != null) { if (document.querySelector(".live_chat_box_iframe_holder") != null) { if (document.querySelector("#related-tabs") == null) { createRelatedTabs(1); } } else { if (document.querySelector("#related-tabs") == null) { createRelatedTabs(0); } } } else { var elm = ".watch"; waitForElement10(elm).then(function(elm) { if (canGo != false) { if (document.querySelector("#alt-watch9-container") == null) { if (document.querySelector(".live_chat_box_iframe_holder") != null) { if (document.querySelector("#related-tabs") == null) { createRelatedTabs(1); } } else { if (document.querySelector(".watch") != null) { if (document.querySelector("#related-tabs") == null) { createRelatedTabs(0); } } } } } }); } } function createWatch9Prep() { if (document.querySelector("#watch7-content.watch-content .yt-uix-button") != null) { if (document.querySelector("#alt-watch9-container") == null) { if (document.querySelector("#watch7-creator-bar") != null) { createWatch9(1); } else { createWatch9(0); } } } else { var elm = "#watch7-content.watch-content .yt-uix-button"; waitForElement10(elm).then(function(elm) { if (canGo != false) { if (document.querySelector("#alt-watch9-container") == null) { if (document.querySelector("#watch7-creator-bar") != null) { createWatch9(1); } else { createWatch9(0); } } } }); } } function createWatch8Prep() { if (document.querySelector("#watch7-content.watch-content .yt-uix-button") != null) { if (document.querySelector("#watch8-container") == null) { if (document.querySelector("#watch7-creator-bar") != null) { createWatch8(2); } else { createWatch8(1); } } } else { var elm = "#watch7-content.watch-content .yt-uix-button"; waitForElement10(elm).then(function(elm) { if (canGo != false) { if (document.querySelector("#watch8-container") == null) { if (document.querySelector("#watch7-creator-bar") != null) { createWatch8(2); } else { createWatch8(1); } } } }); } } function createWatch5Prep() { var elm = "#watch7-content.watch-content .yt-uix-button"; waitForElement10(elm).then(function(elm) { if (canGo != false) { if (document.querySelector("#watch5-container") == null) { if (document.querySelector("#watch7-creator-bar") != null) { createWatch5(1, "d"); } else { createWatch5(0, "d"); } } } }); } function createRealWatch9Prep() { if (document.querySelector("#watch7-content.watch-content .yt-uix-button") != null) { if (document.querySelector("#watch9-container") == null) { if (document.querySelector("#watch7-creator-bar") != null) { createRealWatch9(1); } else { createRealWatch9(0); } } } else { var elm = "#watch7-content.watch-content .yt-uix-button"; waitForElement10(elm).then(function(elm) { if (canGo != false) { if (document.querySelector("#watch9-container") == null) { if (document.querySelector("#watch7-creator-bar") != null) { createRealWatch9(1); } else { createRealWatch9(0); } } } }); } } function createWatch10Prep() { if (document.querySelector("#watch7-content.watch-content .yt-uix-button") != null) { if (document.querySelector("#watch10-container") == null) { if (document.querySelector("#watch7-creator-bar") != null) { createWatch10(1); } else { createWatch10(0); } } } else { var elm = "#watch7-content.watch-content .yt-uix-button"; waitForElement10(elm).then(function(elm) { if (canGo != false) { if (document.querySelector("#watch10-container") == null) { if (document.querySelector("#watch7-creator-bar") != null) { createWatch10(1); } else { createWatch10(0); } } } }); } } function moveGuideButtonToTopbar() { var elm = "#appbar-guide-button"; waitForElement10(elm).then(function(elm) { if (canGo != false) { if (document.querySelector("#yt-masthead #appbar-guide-button") == null) { var theBtn = document.querySelector("#appbar-guide-button"); var newHome = document.querySelector('#yt-masthead'); newHome.insertBefore(theBtn, newHome.children[1]); } } }); } function moveCountsToButtons() { var elm = ".watch"; waitForElement10(elm).then(function(elm) { if (canGo != false) { if (document.querySelector(".likes-count") != null) { var likeCount = document.querySelector(".likes-count").textContent; var dislikeCount = document.querySelector(".dislikes-count").textContent; document.querySelector("#watch-like .run").textContent = likeCount; document.querySelector("#watch-dislike .yt-uix-button-content").innerHTML = ` Dislike `; document.querySelector("#watch-dislike .run").textContent = dislikeCount; document.querySelector("#watch-dislike").classList.remove("yt-uix-button-empty"); } } }); } function createMoreTooltips() { var elm = ".watch"; waitForElement10(elm).then(function(elm) { if (canGo != false) { if (document.querySelector(".video-extras-sparkbars") != null) { if (document.querySelector(".video-extras-sparkbars.yt-uix-tooltip") == null) { var percent = document.querySelector(".video-extras-sparkbar-likes").style.width; document.querySelector(".video-extras-sparkbars").setAttribute("title", percent + " of viewers like this video"); document.querySelector(".video-extras-sparkbars").classList.add("yt-uix-tooltip"); } } if (document.querySelector("#watch7-user-header .yt-user-name") != null) { if (document.querySelector("#watch7-user-header .yt-user-name.yt-uix-tooltip") == null) { var user = document.querySelector("#watch7-user-header .yt-user-name").textContent; document.querySelector("#watch7-user-header .yt-user-name").setAttribute("title", "View " + user + "'s channel"); document.querySelector("#watch7-user-header .yt-user-name").classList.add("yt-uix-tooltip"); document.querySelector("#watch7-user-header .yt-user-videos").setAttribute("title", "View " + user + "'s videos"); document.querySelector("#watch7-user-header .yt-user-videos").classList.add("yt-uix-tooltip"); } } if (document.querySelector(".yt-uix-button-subscribe-branded:not([disabled='True'])") != null) { if (document.querySelector(".yt-uix-button-subscribe-branded:not([disabled='True']):not(.yt-uix-tooltip)") != null) { document.querySelector(".yt-uix-button-subscribe-branded:not([disabled='True']):not(.yt-uix-tooltip)").setAttribute("title", "Subscribe"); document.querySelector(".yt-uix-button-subscribe-branded:not([disabled='True']):not(.yt-uix-tooltip)").classList.add("yt-uix-tooltip"); } } if (document.querySelector(".yt-uix-button-subscribed-branded:not([disabled='True'])") != null) { if (document.querySelector(".yt-uix-button-subscribed-branded:not([disabled='True']):not(.yt-uix-tooltip)") != null) { document.querySelector(".yt-uix-button-subscribed-branded:not([disabled='True']):not(.yt-uix-tooltip)").setAttribute("title", "Unsubscribe"); document.querySelector(".yt-uix-button-subscribed-branded:not([disabled='True']):not(.yt-uix-tooltip)").classList.add("yt-uix-tooltip"); } } if (document.querySelector("#watch7-secondary-actions .start") != null) { if (document.querySelector("#watch7-secondary-actions .start.yt-uix-tooltip") == null) { document.querySelector("#watch7-secondary-actions .start").setAttribute("title", "Video info"); document.querySelector("#watch7-secondary-actions .start").classList.add("yt-uix-tooltip"); if (STS.expWatch7AboutTabRename == true) { document.querySelector("#watch7-secondary-actions .start span").textContent = "Video info"; } if (STS.expWatch7AboutTabRename2 == true) { document.querySelector("#watch7-secondary-actions .start span").textContent = "Details"; } } } } }); if (document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(2)") != null) { if (document.querySelector("#watch7-secondary-actions .yt-uix-button.yt-uix-tooltip:nth-child(2)") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(2)").setAttribute("title", "Share"); document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(2)").classList.add("yt-uix-tooltip"); } } if (document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(3)") != null) { if (document.querySelector("#watch7-secondary-actions .yt-uix-button.yt-uix-tooltip:nth-child(3)") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(3)").setAttribute("title", "Add to"); document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(3)").classList.add("yt-uix-tooltip"); } } } function createSearchText() { if ($("#masthead-search-term") != null) { $("#masthead-search-term").setAttribute("placeholder","Search"); } } function doModernGuide() { if ($("#FEwhat_to_watch-guide-item.startube") == null) { if ($("#FEwhat_to_watch-guide-item") != null) { $("#FEwhat_to_watch-guide-item .display-name span").textContent = "Home"; $("#FEwhat_to_watch-guide-item").classList.add("startube"); let container = $("#FEwhat_to_watch-guide-item .yt-valign-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); } } if ($("#FEsubscriptions-guide-item.startube") == null) { if ($("#FEsubscriptions-guide-item") != null) { $("#FEsubscriptions-guide-item .display-name span").textContent = "Subscriptions"; let container = $("#FEsubscriptions-guide-item .yt-valign-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); $("#FEsubscriptions-guide-item").classList.add("startube"); } } if ($("#FEhistory-guide-item.startube") == null) { if ($("#FEhistory-guide-item") != null) { $("#FEhistory-guide-item .display-name span").textContent = "History"; let container = $("#FEhistory-guide-item .yt-valign-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); $("#FEhistory-guide-item").classList.add("startube"); } } if ($("#FEtrending-guide-item.startube") == null) { if ($("#FEtrending-guide-item") != null) { let container = $("#FEtrending-guide-item .yt-valign-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); $("#FEtrending-guide-item").classList.add("startube"); } } if ($("#FEsocial-guide-item.startube") == null) { if ($("#FEsocial-guide-item") != null) { let container = $("#FEsocial-guide-item .yt-valign-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); $("#FEsocial-guide-item").classList.add("startube"); } } if ($("#VLWL-guide-item.startube") == null) { if ($("#VLWL-guide-item") != null) { let container = $("#VLWL-guide-item .yt-valign-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); $("#VLWL-guide-item").classList.add("startube"); } } if ($("#VLLL-guide-item.startube") == null) { if ($("#VLLL-guide-item") != null) { let container = $("#VLLL-guide-item .yt-valign-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); $("#VLLL-guide-item").classList.add("startube"); } } if ($(".guide-user-links .guide-channel[id^='UC']") != null) { if ($(".startube-mychan > a") == null) { let container1 = $(".guide-user-links .guide-channel[id^='UC']"); container1.classList.add("startube-mychan"); let container = container1.querySelector(".yt-valign-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); container1.classList.add("startube"); let newHome = $(".guide-user-links"); newHome.insertBefore(container1, newHome.children[1]); } } if ($(".guide-channel[id^='VLP']:not(.startube)")) { let list = document.querySelectorAll(".guide-channel[id^='VLP']:not(.startube)"); list.forEach(item => { let container = item.querySelector(".yt-valign-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); item.classList.add("startube"); }); } if ($("#appbar-guide-button.startube") == null) { if ($("#appbar-guide-button") != null) { let container = $("#appbar-guide-button"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); newElem.id = "startube-guide-icon"; container.classList.add("startube-has-icon"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); $("#appbar-guide-button").classList.add("startube"); } } if ($("#logo-container.startube") == null) { if ($("#logo-container") != null) { let container = $("#logo-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[0]); $("#logo-container").classList.add("startube"); if (STS.expOutlineIcons == true) { $("#ringo-svg-logo svg").setAttribute("viewBox","0 0 200 56"); $("#ringo-svg-logo svg").style.marginTop = "-1px"; } } } if ( $(".appbar-nav-menu") != null && !window.location.href.includes("feed/history") && !window.location.href.includes("distiller_post_history") ) { if ( $(".home") != null || $(".feed") != null ) { var elm = ".epic-nav-item-heading"; waitForElement(elm).then(function(elm) { if (canGo != false) { if ($(".appbar-nav-menu li:nth-child(1) .epic-nav-item-heading") != null) { $(".appbar-nav-menu li:nth-child(1) .epic-nav-item-heading").textContent = "Home"; } else { $(".appbar-nav-menu li:nth-child(1) .yt-uix-button-content span").textContent = "Home"; } if ($(".appbar-nav-menu li:nth-child(2) .epic-nav-item-heading") != null) { $(".appbar-nav-menu li:nth-child(2) .epic-nav-item-heading").textContent = "Subscriptions"; } else { $(".appbar-nav-menu li:nth-child(2) .yt-uix-button-content span").textContent = "Subscriptions"; } } }); } if ( $("[location='feed-recs']") != null && $("[exp-cosmic-guide-layout]") != null ) { var elm = ".epic-nav-item-heading"; waitForElement(elm).then(function(elm) { if (canGo != false) { if ($(".appbar-nav-menu li:nth-child(1) .epic-nav-item-heading") != null) { $(".appbar-nav-menu li:nth-child(1) .epic-nav-item-heading").textContent = "From YouTube"; } else { $(".appbar-nav-menu li:nth-child(1) .yt-uix-button-content span").textContent = "From YouTube"; } } }); } } } function doScrollableGuide() { if ($("#guide-library-section")) { $("#guide-library-section").data.guideSubscriptionsSectionRenderer.navigationEndpoint = ""; } if ($(".startube-fixed-guide-item") == null) { var elm = "#guide-subscriptions-section"; waitForElement(elm).then(function(elm) { if (canGo != false) { if ($("#guide-library-container .guide-flyout") && $("#startube-library-expander-container") == null) { let container = $("#guide-library-container"); let newElem = document.createElement("div"); newElem.id = "startube-library-expander-container"; newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[5]); var theFlyout = document.querySelector("#guide-library-container .guide-flyout .guide-channels-list"); var newHome = document.querySelector("#guide-library-container .startube-guide-expander-items"); newHome.insertBefore(theFlyout, newHome.children[0]); newHome.classList.add("startube-fixed-guide-item"); } if ($("#guide-subscriptions-container:not(.st-modded) .guide-flyout") && $("#startube-subs-expander-container") == null) { let container = $("#guide-subscriptions-container"); let newElem = document.createElement("div"); newElem.id = "startube-subs-expander-container"; newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[4]); container.classList.add("st-modded"); theFlyout = document.querySelector("#guide-subscriptions-container .guide-flyout .guide-channels-list"); newHome = document.querySelector("#guide-subscriptions-container .startube-guide-expander-items"); newHome.insertBefore(theFlyout, newHome.children[0]); newHome.classList.add("startube-fixed-guide-item"); } if (document.querySelectorAll("#guide-subscriptions-container")[1]) { if ($(".st-guide-2") == null) { // if ($("#guide-subscriptions-container + #guide-subscriptions-container:not(.st-modded) .guide-flyout")) { document.querySelectorAll("#guide-subscriptions-container")[1].classList.add("st-guide-2"); let container = $(".st-guide-2"); let newElem = document.createElement("div"); newElem.id = "startube-subs-expander-container"; newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[4]); theFlyout = document.querySelector(".st-guide-2 .guide-flyout .guide-channels-list"); newHome = document.querySelector(".st-guide-2 .startube-guide-expander-items"); newHome.insertBefore(theFlyout, newHome.children[0]); newHome.classList.add("startube-fixed-guide-item"); container.classList.add("st-modded"); // } } } } }); } } function doModernPlayer() { if (STS.expModernPlayer == true || STS.expModernPlayerV2 == true) { document.querySelector("html").setAttribute("exp-modern-player", ""); if (STS.expModernPlayerV2 == true) { document.querySelector("html").setAttribute("exp-modern-player-v2", ""); } if ($("#page.watch") || $("#page.channel")) { var elm = ".html5-player-chrome"; waitForElement10(elm).then(function(elm) { if (canGo != false) { $("#movie_player").classList.add("autohide-controls"); if ($(".ytp-button-play.startube-has-icon") == null && $(".ytp-button-pause.startube-has-icon") == null) { let container; if ($(".ytp-button-play")) { container = $(".ytp-button-play"); } else { container = $(".ytp-button-pause"); } let newElem = document.createElement("div"); newElem.setAttribute("class","startube-player-svg"); container.classList.add("startube-has-icon"); container.classList.add("startube-player-icon"); container.id = "startube-playpause"; if (STS.expModernPlayerV2 == true) { newElem.innerHTML = ` `; } else { newElem.innerHTML = ` `; } container.insertBefore(newElem, container.children[0]); let currPlayerState = "paused"; // Select the node that will be observed for mutations const targetNode = document.querySelector("#movie_player"); // Options for the observer (which mutations to observe) const config = { attributes: true }; // Callback function to execute when mutations are observed const callback = (mutationList, observer) => { for (const mutation of mutationList) { if ($(".playing-mode") && currPlayerState == "paused") { $("#st-playing").beginElement(); currPlayerState = "playing"; } if ($(".paused-mode") && currPlayerState == "playing") { $("#st-pausing").beginElement(); currPlayerState = "paused"; } } }; // Create an observer instance linked to the callback function const observer = new MutationObserver(callback); // Start observing the target node for configured mutations observer.observe(targetNode, config); } if ($(".ytp-button-volume.startube-has-icon") == null) { let container = $(".ytp-button-volume"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-player-svg"); container.classList.add("startube-has-icon"); container.classList.add("startube-player-icon"); container.id = "startube-volume"; newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); } if ($("#subtitles_button.startube-has-icon") == null && $("#subtitles_button")) { let container = $("#subtitles_button"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-player-svg"); container.classList.add("startube-has-icon"); container.classList.add("startube-player-icon"); if (STS.expModernPlayerV2 == true) { newElem.innerHTML = ` `; } else { newElem.innerHTML = ` `; } container.insertBefore(newElem, container.children[1]); } if ($("#settings_button.startube-has-icon") == null) { let container = $("#settings_button"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-player-svg"); container.classList.add("startube-has-icon"); container.classList.add("startube-player-icon"); if (STS.expModernPlayerV2 == true) { newElem.innerHTML = ` `; } else { newElem.innerHTML = ` `; } container.insertBefore(newElem, container.children[1]); } if ($(".ytp-size-toggle-large.startube-has-icon") == null && $(".ytp-size-toggle-small.startube-has-icon") == null) { let container; if ($(".ytp-size-toggle-large")) { container = $(".ytp-size-toggle-large"); } else { container = $(".ytp-size-toggle-small"); } let newElem = document.createElement("div"); newElem.setAttribute("class","startube-player-svg"); container.classList.add("startube-has-icon"); container.classList.add("startube-player-icon"); container.id = "startube-theater"; if (STS.expModernPlayerV2 == true) { newElem.innerHTML = `
    `; } else { newElem.innerHTML = `
    `; } container.insertBefore(newElem, container.children[0]); } if ($(".ytp-button-fullscreen-enter.startube-has-icon") == null && $(".ytp-button-fullscreen-exit.startube-has-icon") == null) { let container; if ($(".ytp-button-fullscreen-enter")) { container = $(".ytp-button-fullscreen-enter"); } else { container = $(".ytp-button-fullscreen-exit"); } let newElem = document.createElement("div"); newElem.setAttribute("class","startube-player-svg"); container.classList.add("startube-has-icon"); container.classList.add("startube-player-icon"); container.id = "startube-fullscreen"; if (STS.expModernPlayerV2 == true) { newElem.innerHTML = `
    `; } else { newElem.innerHTML = `
    `; } container.insertBefore(newElem, container.children[0]); } if ($(".ytp-action-buttons .ytp-button-watch-later") == null) { var theBtn = document.querySelector(".ytp-button-watch-later"); var newHome = document.querySelector('.ytp-action-buttons'); newHome.insertBefore(theBtn, newHome.children[2]); } if ($(".ytp-button-watch-later.startube-has-icon") == null) { let container = $(".ytp-button-watch-later"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-player-svg"); container.classList.add("startube-has-icon"); container.classList.add("startube-player-icon"); newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[0]); } if ($(".ytp-button-share.startube-has-icon") == null) { let container = $(".ytp-button-share"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-player-svg"); container.classList.add("startube-has-icon"); container.classList.add("startube-player-icon"); newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[0]); } if ($(".ytp-button-prev.startube-has-icon") == null) { let container = $(".ytp-button-prev"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-player-svg"); container.classList.add("startube-has-icon"); container.classList.add("startube-player-icon"); if (STS.expModernPlayerV2 == true) { newElem.innerHTML = ` `; } else { newElem.innerHTML = ` `; } container.insertBefore(newElem, container.children[0]); } if ($(".ytp-button-next.startube-has-icon") == null) { let container = $(".ytp-button-next"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-player-svg"); container.classList.add("startube-has-icon"); container.classList.add("startube-player-icon"); if (STS.expModernPlayerV2 == true) { newElem.innerHTML = ` `; } else { newElem.innerHTML = ` `; } container.insertBefore(newElem, container.children[0]); } } }); } } } function createGoogleApps() { if (document.querySelector("#yt-masthead-content") != null) { if (document.querySelector("#google-apps") == null) { createApps(); } } else { var elm = "#yt-masthead-content"; waitForElement10(elm).then(function(elm) { if (canGo != false) { if (document.querySelector("#google-apps") == null) { createApps(); } } }); } } function createMenus() { if ($("#st-menus") == null) { let container = $("body"); let newElem = document.createElement("div"); newElem.id = "st-menus-container"; newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); $("#st-menus-fence").addEventListener("click", function() { $("#st-menus-container").classList.remove("menu-visible"); if ($("#st-menus [visible]")) { $("#st-menus [visible]").removeAttribute("visible"); } if ($("#startube-youtube-apps.active")) { $("#startube-youtube-apps").classList.remove("active"); } }); } } function createSpace() { if ($("#st-space") == null) { let container = $("body"); let newElem = document.createElement("div"); newElem.id = "st-space"; newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[0]); } } function createMESettingsBtn() { if ($("#st-masthead-expanded-v3-settings-button") == null) { var elm = "#masthead-expanded"; waitForElement10(elm).then(function(elm) { if (canGo != false && $("#st-masthead-expanded-v3-settings-button") == null) { let container = $("#masthead-expanded-menu-list"); let newElem = document.createElement("li"); newElem.id = "st-masthead-expanded-v3-settings-button"; newElem.classList = "masthead-expanded-menu-item"; newElem.innerHTML = ` V3 Settings `; container.insertBefore(newElem, container.children[5]); newElem.addEventListener("click", openV3Settings); let container2 = $("#masthead-expanded-menu-list"); let newElem2 = document.createElement("li"); newElem2.id = "st-masthead-expanded-startube-settings-button"; newElem2.classList = "masthead-expanded-menu-item"; newElem2.innerHTML = ` StarTube Settings `; container2.insertBefore(newElem2, container2.children[6]); newElem2.addEventListener("click", showHideSettings); } }); } } function createAccountMenu() { if ($("#st-account-menu") == null && $(".yt-masthead-user-icon") != null && $(".yt-masthead-user-icon.startube-evented") == null) { $(".yt-masthead-user-icon").classList.add("startube-evented"); $(".yt-masthead-user-icon").addEventListener("click", function() { if ($("#st-account-menu") == null) { $("#masthead-expanded [href='#']").click(); let container = $("#st-menus"); let newElem = document.createElement("div"); newElem.id = "st-account-menu"; newElem.classList = "startube-menu startube-show-svgs"; newElem.setAttribute("page","main"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); constructAccountMenu(); $("#st-polymer-switch-account").addEventListener("click", function() { $("#st-account-menu").setAttribute("page","accounts"); }); $("#st-polymer-menu-back").addEventListener("click", function() { $("#st-account-menu").setAttribute("page","main"); }); } $("#st-account-menu-v3-settings").addEventListener("click", openV3Settings); $("#st-account-menu-startube-settings").addEventListener("click", showHideSettings); $("#st-polymer-v3-settings").addEventListener("click", openV3Settings); $("#st-polymer-startube-settings").addEventListener("click", showHideSettings); $("#st-account-menu").setAttribute("page","main"); if ($("#st-menus-container.menu-visible")) { $("#st-menus-container").classList.remove("menu-visible"); } else { $("#st-menus-container").classList.add("menu-visible"); } if ($("#st-account-menu[visible]")) { $("#st-account-menu").removeAttribute("visible"); } else { $("#st-account-menu").setAttribute("visible",""); } }); } } function constructAccountMenu() { var elm = "#masthead-expanded .yt-uix-clickcard-card"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var elem = $(".masthead-card-switch-account .yt-uix-clickcard-card-body"); var newHome = $("#st-account-menu-other .st-account-menu-content"); newHome.insertBefore(elem, newHome.children[0]); var elem = $("#yt-masthead-multilogin-actions"); var newHome = $("#st-account-menu-footer"); newHome.insertBefore(elem, newHome.children[0]); let guideUrl = $(".guide-user-links .guide-channel[id^='UC'] a").getAttribute("href"); gdp.myChanUrl = guideUrl; let guideId = guideUrl.split("/channel/")[1]; gdp.myChanId = guideId; $("#yt-masthead-multilogin-actions a:nth-child(2)").textContent = "Add channel"; $("#yt-masthead-multilogin-actions a").classList.add("yt-uix-button"); $("#yt-masthead-multilogin-actions a:nth-child(2)").classList.add("yt-uix-button"); $("#yt-masthead-multilogin-actions a").classList.add("yt-uix-button-default"); $("#yt-masthead-multilogin-actions a:nth-child(2)").classList.add("yt-uix-button-default"); gdp.email = $("#masthead-expanded-menu-email").textContent; gdp.name = $("#masthead-expanded-menu-account-info p").textContent; gdp.subs = $(".yt-masthead-multilogin-user-content span:nth-of-type(2)").textContent; $("#st-account-menu-main .st-account-menu-header span").textContent = gdp.email; $("#st-polymer-menu-email span").textContent = gdp.email; $("#st-account-menu-email span").textContent = gdp.email; $("#st-account-menu-username span").textContent = gdp.name; $("#st-polymer-menu-username span").textContent = gdp.name; $("#st-account-menu-sub-count span").textContent = gdp.subs; $("#st-account-menu-pfp img").src = gdp.pfp; $("#st-polymer-menu-pfp img").src = gdp.pfp; $("#st-account-menu-pfp").href = gdp.myChanUrl; $("#st-polymer-my-channel").href = gdp.myChanUrl; let myChanData = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: gdp.myChanId, canonicalBaseUrl: gdp.myChanUrl }, commandMetadata: { webCommandMetadata: { url: gdp.myChanUrl } } } } } $("#st-account-menu-pfp").data = myChanData; $("#st-polymer-my-channel").data = myChanData; } }); } function createCosmicGuide() { if ($("#appbar-guide-menu") && $(".show-guide") && $("#startube-guide-top-left") == null) { let container = $("#appbar-guide-menu"); let newElem = document.createElement("div"); newElem.id = "startube-guide-cosmic-section"; newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[0]); let container2 = $(".guide-toplevel"); let newElem2 = document.createElement("div"); newElem2.id = "startube-guide-z-section"; newElem2.innerHTML = ` `; container2.insertBefore(newElem2, container2.children[0]); var theBtn = document.querySelector("#FEwhat_to_watch-guide-item"); var newHome = document.querySelector('#startube-guide-z-section .guide-channels-list'); newHome.insertBefore(theBtn, newHome.children[1]); if ($("#yt-masthead-user .yt-thumb-27 img")) { var theBtn = document.querySelector("#FEsubscriptions-guide-item"); var newHome = document.querySelector('#guide-channels').parentNode; newHome.insertBefore(theBtn, newHome.children[0]); var theBtn = document.querySelector("#guide-subscriptions-section"); var newHome = document.querySelector('.guide-toplevel'); newHome.insertBefore(theBtn, newHome.children[0]); let guideUrl = $(".guide-user-links .guide-channel[id^='UC'] a").getAttribute("href"); gdp.myChanUrl = guideUrl; let guideId = guideUrl.split("/channel/")[1]; gdp.myChanId = guideId; let guideUrlVids = guideUrl + "/videos"; $("#startube-guide-pfp img").src = gdp.pfp; $("#startube-guide-pfp").href = guideUrl; $("#st-g-my-channel").href = guideUrl; $("#st-g-my-videos").href = guideUrlVids; $("#recommended-guide-item").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "FEwhat_to_watch", canonicalBaseUrl: "/feed/what_to_watch/recommended" }, commandMetadata: { webCommandMetadata: { url: "/feed/what_to_watch/recommended" } } } } } $("#startube-guide-browse-button").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "FEguide_builder", canonicalBaseUrl: "/feed/guide_builder" }, commandMetadata: { webCommandMetadata: { url: "/feed/guide_builder" } } } } } $("#st-g-history").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "FEhistory", canonicalBaseUrl: "/feed/history" }, commandMetadata: { webCommandMetadata: { url: "/feed/history" } } } } } $("#st-g-watch-later").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "VLWL", canonicalBaseUrl: "/playlist?list=WL" }, commandMetadata: { webCommandMetadata: { url: "/playlist?list=WL" } } } } } $("#st-g-likes").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "VLLL", canonicalBaseUrl: "/playlist?list=LL" }, commandMetadata: { webCommandMetadata: { url: "/playlist?list=LL" } } } } } $("#st-g-my-channel").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: guideId, canonicalBaseUrl: guideUrl }, commandMetadata: { webCommandMetadata: { url: guideUrl } } } } } $("#startube-guide-pfp").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: guideId, canonicalBaseUrl: guideUrl }, commandMetadata: { webCommandMetadata: { url: guideUrl } } } } } $("#st-g-my-videos").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: guideId, canonicalBaseUrl: guideUrlVids, params: "EgZ2aWRlb3PyBgQKAjoA" }, commandMetadata: { webCommandMetadata: { url: guideUrlVids } } } } } if ($("#FEsubscriptions-guide-item.startube") == null) { if ($("#FEsubscriptions-guide-item") != null) { $("#FEsubscriptions-guide-item .display-name span").textContent = "Subscriptions"; $("#FEsubscriptions-guide-item").classList.add("startube"); } } } else { $("#startube-guide-profile-section").style.display = "none"; } } } // EXfunct function doRichGridHome() { if ($("#page.home")) { let list = document.querySelectorAll(".yt-shelf-grid-item"); $("#content").classList.add("yt-rich-grid"); list.forEach(item => { if (item.querySelector(".yt-lockup-user-photo") == null) { let pfp; let data; let url; if (item.data.richItemRenderer) { pfp = item.data.richItemRenderer.content.gridVideoRenderer.contextItemData.authorAvatar; data = item.data.richItemRenderer.content.gridVideoRenderer.contextItemData.authorNavigationEndpoint; url = item.data.richItemRenderer.content.gridVideoRenderer.contextItemData.authorNavigationEndpoint.browseEndpoint.canonicalBaseUrl; } else if (item.data.compactVideoRenderer) { pfp = item.data.compactVideoRenderer.channelThumbnail.thumbnails[0].url; data = item.data.compactVideoRenderer.contextItemData.authorNavigationEndpoint; url = item.data.compactVideoRenderer.contextItemData.authorNavigationEndpoint.browseEndpoint.canonicalBaseUrl; } data = { abstractVorElement: { navigationEndpoint: data } } let container = item.querySelector(".yt-lockup-content"); let newElem = document.createElement("a"); newElem.setAttribute("class","yt-lockup-user-photo"); newElem.href = url; newElem.data = data; newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[0]); container = item.querySelector(".yt-lockup-content"); newElem = document.createElement("div"); newElem.setAttribute("class","yt-lockup-details"); container.insertBefore(newElem, container.children[1]); let newHome = item.querySelector(".yt-lockup-details"); let toMove = item.querySelector(".yt-lockup-title"); let toMove2 = item.querySelector(".yt-lockup-meta"); newHome.appendChild(toMove); newHome.appendChild(toMove2); if (item.querySelector(".yt-lockup-badges")) { let toMove3 = item.querySelector(".yt-lockup-badges"); newHome.appendChild(toMove3); } item.classList.add("yt-rich-lockup-item"); } }); } } // EXfunct function doThirdColumnVideosPrep() { if ($(".feed")) { doThirdColumnVideos(); } else { if ($("[location='feed-recs']")) { var elm = ".feed"; waitForElement10(elm).then(function(elm) { if (canGo != false) { doThirdColumnVideos(); } }); } } } function doThirdColumnVideos() { if ($(".feed .branded-page-v2-secondary-col #startube-third-column") == null && $(".feed .branded-page-v2-secondary-col .branded-page-box")) { let container = $(".feed .branded-page-v2-secondary-col .branded-page-box"); let newElem = document.createElement("div"); newElem.id = "startube-third-column"; newElem.innerHTML = `

    Trending

    `; container.insertBefore(newElem, container.children[0]); if (gdp.thirdColVideos == null) { EXFetch("none","single","browse","browseId","FEtrending","params","6gQJRkVleHBsb3Jl").then(result => { fillThirdCol(result); gdp.thirdColVideos = result; }); } else { fillThirdCol(gdp.thirdColVideos); } } } function fillThirdCol(result) { let shelf = result.contents.twoColumnBrowseResultsRenderer.tabs[0].tabRenderer.content.sectionListRenderer.contents[3].itemSectionRenderer.contents[0].shelfRenderer.content.expandedShelfContentsRenderer.items; shelf.forEach(i => { if (i.videoRenderer) { createRenderer(i.videoRenderer, "thirdColCompactVideo"); } }); } // EXfunct function createUploadIcon() { if ($("#yt-masthead-content") && $("#startube-upload-icon") == null) { let container = $("#yt-masthead-content"); let newElem = document.createElement("a"); newElem.id = "startube-upload-icon"; newElem.setAttribute("class","startube-show-svgs yt-uix-tooltip"); newElem.setAttribute("title","Upload"); newElem.href = "/upload"; newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[2]); } } // EXfunct function replaceFavicon(favi) { if (favi !== "2012") { let icoElm = $("head [rel='icon']"); let timeout = 100; if ($("#st-favi") == null) { let clone = icoElm.cloneNode(true); clone.id = "st-favi"; $("head").appendChild(clone); icoElm.remove(); icoElm = clone; timeout = 3000; } setTimeout(function() { switch (favi) { case "2024": icoElm.href = "https://www.youtube.com/s/desktop/9fa451de/img/logos/favicon_32x32.png"; break; case "2024_old": icoElm.href = "https://www.youtube.com/s/desktop/71ca99b3/img/logos/favicon.ico"; break; case "2017": icoElm.setAttribute("href","https://www.youtube.com/s/desktop/daa4e47c/img/favicon_32x32.png"); break; case "2015": icoElm.href = "https://s.ytimg.com/yts/img/favicon_32-vfl8NGn4k.png"; break; case "2012": icoElm.href = "https://s.ytimg.com/yts/img/favicon-vfldLzJxy.ico"; break; case "2010": icoElm.href = "https://s.ytimg.com/yt/favicon-vflZlzSbU.ico"; break; case "2005": icoElm.href = "https://s.ytimg.com/yt/favicon-vfl1123.ico"; break; default: } }, timeout); } } // EXfunct function createCreateIcon() { if ($("#yt-masthead-content") && $("#startube-create-icon") == null) { let container = $("#yt-masthead-content"); let newElem = document.createElement("div"); newElem.id = "startube-create-icon"; newElem.setAttribute("class","startube-show-svgs yt-uix-tooltip"); //newElem.setAttribute("title","Upload"); //newElem.href = "/upload"; newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[2]); let container2 = $("#st-menus"); let newElem2 = document.createElement("div"); newElem2.id = "startube-create-menu"; newElem2.classList = "startube-menu startube-material-menu startube-show-svgs"; newElem2.innerHTML = ` `; container2.insertBefore(newElem2, container2.children[0]); var elm = ".guide-user-links .guide-channel[id^='UC'] a"; waitForElement(elm).then(function(elm) { if (canGo != false) { $("#startube-create-post").href = gdp.myChanUrl + "/community?show_create_dialog=1"; } }); newElem.addEventListener("click", function() { newElem2.toggleAttribute("visible"); if ($("#st-menus-container.menu-visible")) { $("#st-menus-container").classList.remove("menu-visible"); } else { $("#st-menus-container").classList.add("menu-visible"); } }); $("#startube-create-menu-v3-settings").addEventListener("click", openV3Settings); } } // EXfunct function createYouTubeApps() { if ($("#yt-masthead-content") && $("#startube-youtube-apps") == null) { let container = $("#yt-masthead-content"); let newElem = document.createElement("div"); newElem.id = "startube-youtube-apps"; newElem.setAttribute("class","startube-show-svgs yt-uix-tooltip"); newElem.setAttribute("title","YouTube apps"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[2]); let container2 = $("#st-menus"); let newElem2 = document.createElement("div"); newElem2.id = "startube-ytapps-menu"; newElem2.classList = "startube-menu startube-material-menu startube-show-svgs"; newElem2.innerHTML = ` `; container2.insertBefore(newElem2, container2.children[0]); newElem.addEventListener("click", function() { newElem2.toggleAttribute("visible"); if ($("#st-menus-container.menu-visible")) { $("#st-menus-container").classList.remove("menu-visible"); } else { $("#st-menus-container").classList.add("menu-visible"); } if ($("#startube-youtube-apps.active")) { $("#startube-youtube-apps").classList.remove("active"); } else { $("#startube-youtube-apps").classList.add("active"); } }); } } // EXfunct function doGuideIcons(ver) { if ($("#UCBR8-60-B28hp2BmDPdntcQ-guide-item")) { if (ver == "ringo2") { $("#UCF0pVplsI8R5kcAqgtoRqoA-guide-item img").src = "https://i.imgur.com/6NRPiW1.png"; $("#UC-9-kyTW8ZkZNDHQJ6FgpwQ-guide-item img").src = "https://i.imgur.com/z65iHM4.png"; $("#UCEgdi0XIXXZ-qJOFPf4JSKw-guide-item img").src = "https://i.imgur.com/xCXGcco.png"; $("#UCOpNcN46UbXVtpKMrmU4Abg-guide-item img").src = "https://i.imgur.com/2S7spgr.png"; $("#UCtFRv9O2AHqOZjjynzrv-xg-guide-item img").src = "https://i.imgur.com/WEYb4Je.png"; $("#FEcourses_destination-guide-item").style.display = "none"; $("#UCl8dMTqDrJQ0c8y23UBu4kQ-guide-item img").src = "https://i.imgur.com/sM8bYeQ.png"; $("#UCrpQ4p1Ql_hG8rKXIKM1MOQ-guide-item img").src = "https://i.imgur.com/BwhY9NF.png"; $("#UCYfdidRxbB8Qhf0Nx7ioOYw-guide-item img").src = "https://i.imgur.com/RGO0bQS.png"; $("#UC4R8DWoMoI7CAwX8_LjQHig-guide-item img").src = "https://i.imgur.com/fFvuFdW.png"; $("#UCzuqhhs6NWbgTzMuM09WKDQ-guide-item img").src = "https://i.imgur.com/ye0eloE.png"; $("#UCkYQyvc_i9hXEo4xic9Hh2g-guide-item").style.display = "none"; $("#FEpodcasts_destination-guide-item img").src = "https://i.imgur.com/swfIYE2.png"; $("#UCBR8-60-B28hp2BmDPdntcQ-guide-item img").src = "https://i.imgur.com/2tYVrgH.jpeg"; $("#UCBR8-60-B28hp2BmDPdntcQ-guide-item img").style.filter = "hue-rotate(-14.6deg)"; } } } // EXfunct function createSearchTumor() { if ($("#yt-masthead-content") && $("#startube-search-tumor") == null) { let container = $("#masthead-search-terms"); let newElem = document.createElement("div"); newElem.id = "startube-search-tumor"; newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); } } // EXfunct function createSearchIcon() { if ($("#yt-masthead-content") && $("#startube-search-icon") == null) { let container = $("#search-btn"); let newElem = document.createElement("div"); newElem.id = "startube-search-icon"; newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); } } // EXfunct function createNotifIcon() { if ($("#yt-masthead-content") && $("#startube-notif-icon") == null) { let container = $("#sb-button-notify"); let newElem = document.createElement("div"); newElem.id = "startube-notif-icon"; newElem.setAttribute("class","startube-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); container.addEventListener("click", function() { if ($("#sb-button-notify svg") == null) { createNotifIcon(); } }); } } // EXfunct function searchButtonLowercase() { if ($("#search-btn")) { $("#search-btn .run").textContent = "Search"; } } // EXfunct function createAozoraTopbarLinks() { if ($("#yt-masthead-content") && $("#aozora-topbar-links") == null) { let container = $("#yt-masthead-content"); let newElem = document.createElement("div"); newElem.id = "aozora-topbar-links"; newElem.setAttribute("class","flex-bar"); newElem.innerHTML = ` Browse Movies Upload `; container.insertBefore(newElem, container.children[2]); } } // EXfunct function stargazerHeader(n) { if ($("#yt-masthead-content") && $("#stargazer-header") == null) { let container = $("#yt-masthead-container"); let newElem = document.createElement("div"); newElem.id = "stargazer-header"; newElem.setAttribute("class","flex-bar"); newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[0]); $("#stargazer-v3-settings").addEventListener("click", toggleStargazerDD); $("#stargazer-v3-settings").addEventListener("click", openV3Settings); $("#stargazer-upload-dropdown").addEventListener("click", toggleStargazerDD); $("#stargazer-upload-fence").addEventListener("click", toggleStargazerDD); function toggleStargazerDD() { if ($("#stargazer-upload-menu-container[visible]")) { $("#stargazer-upload-menu-container").removeAttribute("visible"); $("#stargazer-header").classList.remove("upload-menu-open"); } else { $("#stargazer-upload-menu-container").setAttribute("visible",""); $("#stargazer-header").classList.add("upload-menu-open"); } } if (n == 0) { $(".st-sth .stargazer-logo-container").append($("#logo-container")); $(".st-sth .stargazer-search-container").append($("#masthead-search")); $(".st-sth .stargazer-user-container").append($("#yt-masthead-user")); } if (n == 1) { $(".st-sbh .stargazer-logo-container").append($("#logo-container")); $(".st-sbh .stargazer-search-container").append($("#masthead-search")); $(".st-sbh .stargazer-user-container").append($("#yt-masthead-user")); } if (n == 2) { $(".st-ssh .stargazer-logo-container").append($("#logo-container")); $(".st-ssh .stargazer-search-container").append($("#masthead-search")); $(".st-ssh .stargazer-user-container").append($("#yt-masthead-user")); } $("#masthead-search-terms").classList.remove("gsfe_b"); if (gdp.loggedIn == false) { newElem.classList.add("logged-out"); } else { newElem.classList.add("logged-in"); } document.querySelectorAll("#stargazer-my-channel").forEach(i => { i.querySelector(".run").textContent = gdp.myChanName; i.href = gdp.myChanUrl; i.data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId:gdp.myChanId, canonicalBaseUrl:gdp.myChanUrl }, commandMetadata: { webCommandMetadata: { url:gdp.myChanUrl } } } } } }); document.querySelectorAll("#stargazer-home").forEach(i => { i.data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "FEwhat_to_watch", canonicalBaseUrl: "/" }, commandMetadata: { webCommandMetadata: { url: "/" } } } } } }); document.querySelectorAll("#stargazer-videos").forEach(i => { i.data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "FEsubscriptions", canonicalBaseUrl: "/feed/subscriptions?flow=grid" }, commandMetadata: { webCommandMetadata: { url: "/feed/subscriptions?flow=grid" } } } } } }); document.querySelectorAll("#stargazer-videos.stargazer-link").forEach(i => { i.data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "FEwhat_to_watch", canonicalBaseUrl: "/feed/what_to_watch/recommended?flow=grid" }, commandMetadata: { webCommandMetadata: { url: "/feed/what_to_watch/recommended?flow=grid" } } } } } }); document.querySelectorAll("#stargazer-channels").forEach(i => { i.data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "FEguide_builder", canonicalBaseUrl: "/feed/guide_builder" }, commandMetadata: { webCommandMetadata: { url: "/feed/guide_builder" } } } } } }); document.querySelectorAll("#stargazer-community").forEach(i => { i.data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "FEsocial", canonicalBaseUrl: "/feed/social" }, commandMetadata: { webCommandMetadata: { url: "/feed/social" } } } } } }); document.querySelectorAll("#stargazer-subs").forEach(i => { i.data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "FEsubscriptions", canonicalBaseUrl: "/feed/subscriptions?flow=grid" }, commandMetadata: { webCommandMetadata: { url: "/feed/subscriptions?flow=grid" } } } } } }); document.querySelectorAll("#stargazer-history").forEach(i => { i.data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "FEhistory", canonicalBaseUrl: "/feed/history" }, commandMetadata: { webCommandMetadata: { url: "/feed/history" } } } } } }); } } // EXfunct function changeCommentPlaceholder(n) { if ($("#page.watch") && $(".widget_bounds .yt-spinner-message") == null && $(".share.focus_caller.startube") == null) { var elm = ".focus_caller"; waitForElement10(elm).then(function(elm) { if (canGo != false && $("#page.watch")) { if (n == 1) { $(".share.focus_caller").textContent = "Add a public comment"; } else if (n == 0) { $(".share.focus_caller").textContent = "Add a comment"; } $(".share.focus_caller").classList.add("startube"); } }); } } // EXfunct function changeCommentHeader(n) { if ($("#page.watch") && $(".distiller_yt_headline.startube") == null) { var elm = ".distiller_yt_headline"; waitForElement10(elm).then(function(elm) { if (canGo != false && $("#page.watch")) { gdp.commentCount = $(".distiller_yt_headline span:nth-child(2)").textContent.split("(")[1].split(")")[0]; $(".distiller_yt_headline").innerHTML = ` Comments Comments `; $(".distiller_yt_headline .comment-count").textContent = gdp.commentCount; $(".distiller_yt_headline").classList.add("startube"); } }); } } // EXfunct function doCosmicFeedHeader() { if ($(".epic-feed-header") == null) { if ($("[location='feed-recs']")) { var elm = ".branded-page-v2-subnav-container"; waitForElement10(elm).then(function(elm) { if (canGo != false) { $(".branded-page-v2-subnav-container").innerHTML = `
    From YouTube
    `; } }); } if ($("[location='feed-subs']")) { var elm = ".branded-page-v2-subnav-container"; waitForElement10(elm).then(function(elm) { if (canGo != false) { $(".branded-page-v2-subnav-container").innerHTML = `
    Subscriptions
    `; } }); } } } 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) { if (STS.newConfig == true) { STS.newConfig = false; executeRadios("layoutSelect", "hh2024", true); SRS.layoutSelect = "hh2024"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); setTimeout(function() { window.location.reload(); }, 500); } everyLoadNeo(x); grabData(); checkPlaylistThumbnails(); if (SRS.playerSizerules == "flexwatchLarge") { $("html").setAttribute("flexwatch-large",""); } if ($("#page.watch") && STS.expAdaptiveLayout) { let date = $("#watch-description-content").data.watchDescription.clip.videoDate.simpleText; if ( date.includes("2023") || date.includes("2024") ) { if (STS.expAdaptiveLayout2024HH == true) { if (SRS.layoutSelect != "hh2024") { executeRadios("layoutSelect", "hh2024", true); SRS.layoutSelect = "hh2024"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if (STS.expAdaptiveLayout2018Cap == true) { if (SRS.layoutSelect != "hh2018") { executeRadios("layoutSelect", "hh2018", true); SRS.layoutSelect = "hh2018"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if (STS.expAdaptiveLayout2017Cap == true) { if (SRS.layoutSelect != "hh2017") { executeRadios("layoutSelect", "hh2017", true); SRS.layoutSelect = "hh2017"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if (SRS.layoutSelect != "amst2024c") { executeRadios("layoutSelect", "amst2024c", true); SRS.layoutSelect = "amst2024c"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } if ( date.includes("2022") ) { if (STS.expAdaptiveLayout2024HH == true) { if (SRS.layoutSelect != "hh2024") { executeRadios("layoutSelect", "hh2024", true); SRS.layoutSelect = "hh2024"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if (STS.expAdaptiveLayout2018Cap == true) { if (SRS.layoutSelect != "hh2018") { executeRadios("layoutSelect", "hh2018", true); SRS.layoutSelect = "hh2018"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if (STS.expAdaptiveLayout2017Cap == true) { if (SRS.layoutSelect != "hh2017") { executeRadios("layoutSelect", "hh2017", true); SRS.layoutSelect = "hh2017"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if ( date.includes("Oct") || date.includes("Nov") || date.includes("Dec") ) { if (SRS.layoutSelect != "amst2024c") { executeRadios("layoutSelect", "amst2024c", true); SRS.layoutSelect = "amst2024c"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if (SRS.layoutSelect != "poly2022") { executeRadios("layoutSelect", "poly2022", true); SRS.layoutSelect = "poly2022"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } if ( date.includes("2021") ) { if (STS.expAdaptiveLayout2018Cap == true) { if (SRS.layoutSelect != "hh2018") { executeRadios("layoutSelect", "hh2018", true); SRS.layoutSelect = "hh2018"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if (STS.expAdaptiveLayout2017Cap == true) { if (SRS.layoutSelect != "hh2017") { executeRadios("layoutSelect", "hh2017", true); SRS.layoutSelect = "hh2017"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if ( date.includes("Jan") || date.includes("Feb") || date.includes("Mar") || date.includes("Apr") || date.includes("May") || date.includes("Jun") || date.includes("Jul") ) { if (SRS.layoutSelect != "poly2020") { executeRadios("layoutSelect", "poly2020", true); SRS.layoutSelect = "poly2020"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else { if (SRS.layoutSelect != "poly2021") { executeRadios("layoutSelect", "poly2021", true); SRS.layoutSelect = "poly2021"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } } if ( date.includes("2020") ) { if (STS.expAdaptiveLayout2018Cap == true) { if (SRS.layoutSelect != "hh2018") { executeRadios("layoutSelect", "hh2018", true); SRS.layoutSelect = "hh2018"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if (STS.expAdaptiveLayout2017Cap == true) { if (SRS.layoutSelect != "hh2017") { executeRadios("layoutSelect", "hh2017", true); SRS.layoutSelect = "hh2017"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if (SRS.layoutSelect != "poly2020") { executeRadios("layoutSelect", "poly2020", true); SRS.layoutSelect = "poly2020"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } if ( date.includes("2019") ) { if (STS.expAdaptiveLayout2018Cap == true) { if (SRS.layoutSelect != "hh2018") { executeRadios("layoutSelect", "hh2018", true); SRS.layoutSelect = "hh2018"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if (STS.expAdaptiveLayout2017Cap == true) { if (SRS.layoutSelect != "hh2017") { executeRadios("layoutSelect", "hh2017", true); SRS.layoutSelect = "hh2017"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if ( date.includes("Jan") || date.includes("Feb") || date.includes("Mar") || date.includes("Apr") ) { if (SRS.layoutSelect != "poly2018") { executeRadios("layoutSelect", "poly2018", true); SRS.layoutSelect = "poly2018"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if ( date.includes("Nov") || date.includes("Dec") ) { if (SRS.layoutSelect != "poly2020") { executeRadios("layoutSelect", "poly2020", true); SRS.layoutSelect = "poly2020"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else { if (SRS.layoutSelect != "poly2019") { executeRadios("layoutSelect", "poly2019", true); SRS.layoutSelect = "poly2019"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } } if ( date.includes("2018") ) { if (STS.expAdaptiveLayout2018Cap == true) { if (SRS.layoutSelect != "hh2018") { executeRadios("layoutSelect", "hh2018", true); SRS.layoutSelect = "hh2018"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if (STS.expAdaptiveLayout2017Cap == true) { if (SRS.layoutSelect != "hh2017") { executeRadios("layoutSelect", "hh2017", true); SRS.layoutSelect = "hh2017"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if (SRS.layoutSelect != "poly2018") { executeRadios("layoutSelect", "poly2018", true); SRS.layoutSelect = "poly2018"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } 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 (SRS.layoutSelect != "hhE2017") { executeRadios("layoutSelect", "hhE2017", true); SRS.layoutSelect = "hhE2017"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else { if (SRS.layoutSelect != "hh2017") { executeRadios("layoutSelect", "hh2017", true); SRS.layoutSelect = "hh2017"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } } if ( date.includes("2016") ) { if ( date.includes("Jan") || date.includes("Feb") || date.includes("Mar") || date.includes("Apr") ) { if (SRS.layoutSelect != "hhE2016") { executeRadios("layoutSelect", "hhE2016", true); SRS.layoutSelect = "hhE2016"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if ( date.includes("May") || date.includes("Jun") || date.includes("Jul") || date.includes("Aug") ) { if (SRS.layoutSelect != "hhM2016") { executeRadios("layoutSelect", "hhM2016", true); SRS.layoutSelect = "hhM2016"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else { if (SRS.layoutSelect != "hh2016") { executeRadios("layoutSelect", "hh2016", true); SRS.layoutSelect = "hh2016"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } } 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 (SRS.layoutSelect != "hhE2015") { executeRadios("layoutSelect", "hhE2015", true); SRS.layoutSelect = "hhE2015"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if ( date.includes("Dec") ) { if (SRS.layoutSelect != "hhE2016") { executeRadios("layoutSelect", "hhE2016", true); SRS.layoutSelect = "hhE2016"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else { if (SRS.layoutSelect != "hh2015") { executeRadios("layoutSelect", "hh2015", true); SRS.layoutSelect = "hh2015"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } } if ( date.includes("2014") ) { if ( date.includes("Jan") || date.includes("Feb") ) { if (SRS.layoutSelect != "hh2013_3") { executeRadios("layoutSelect", "hh2013_3", true); SRS.layoutSelect = "hh2013_3"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if ( date.includes("Sep") || date.includes("Oct") || date.includes("Nov") || date.includes("Dec") ) { if (SRS.layoutSelect != "hhE2015") { executeRadios("layoutSelect", "hhE2015", true); SRS.layoutSelect = "hhE2015"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else { if (SRS.layoutSelect != "hh2014") { executeRadios("layoutSelect", "hh2014", true); SRS.layoutSelect = "hh2014"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } } if ( date.includes("2013") ) { if ( date.includes("Jan") || date.includes("Feb") || date.includes("Mar") || date.includes("Apr") || date.includes("May") || date.includes("Jun") ) { if (SRS.layoutSelect != "hh2013_1") { executeRadios("layoutSelect", "hh2013_1", true); SRS.layoutSelect = "hh2013_1"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if ( date.includes("Jul") || date.includes("Aug") || date.includes("Sep") || date.includes("Oct") ) { if (SRS.layoutSelect != "hh2013_2") { executeRadios("layoutSelect", "hh2013_2", true); SRS.layoutSelect = "hh2013_2"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else { if (SRS.layoutSelect != "hh2013_3") { executeRadios("layoutSelect", "hh2013_3", true); SRS.layoutSelect = "hh2013_3"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } } if ( date.includes("2012") ) { if ( date.includes("Dec") ) { if (SRS.layoutSelect != "hh2013_1") { executeRadios("layoutSelect", "hh2013_1", true); SRS.layoutSelect = "hh2013_1"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if ( date.includes("Mar") || date.includes("Apr") || date.includes("May") || date.includes("Jun") || date.includes("Jul") ) { if (SRS.layoutSelect != "cosmic2012_2") { executeRadios("layoutSelect", "cosmic2012_2", true); SRS.layoutSelect = "cosmic2012_2"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else if ( date.includes("Jan") || date.includes("Feb") ) { if (SRS.layoutSelect != "cosmic2012_1") { executeRadios("layoutSelect", "cosmic2012_1", true); SRS.layoutSelect = "cosmic2012_1"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else { if (SRS.layoutSelect != "cosmic2012_3") { executeRadios("layoutSelect", "cosmic2012_3", true); SRS.layoutSelect = "cosmic2012_3"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } } if ( date.includes("2005") || date.includes("2006") || date.includes("2007") || date.includes("2008") ) { if (SRS.layoutSelect != "stargazer2008_1") { executeRadios("layoutSelect", "stargazer2008_1", true); SRS.layoutSelect = "stargazer2008_1"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } if ( date.includes("2009") ) { if ( date.includes("Sep") || date.includes("Oct") || date.includes("Nov") || date.includes("Dec") ) { if (SRS.layoutSelect != "stargazer2009_3") { executeRadios("layoutSelect", "stargazer2009_3", true); SRS.layoutSelect = "stargazer2009_3"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else { if (SRS.layoutSelect != "stargazer2009_1") { executeRadios("layoutSelect", "stargazer2009_1", true); SRS.layoutSelect = "stargazer2009_1"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } } if ( date.includes("2011") ) { if ( date.includes("Dec") ) { if (SRS.layoutSelect != "cosmic2012_1") { executeRadios("layoutSelect", "cosmic2012_1", true); SRS.layoutSelect = "cosmic2012_1"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } else { if (SRS.layoutSelect != "aozora2011_2") { executeRadios("layoutSelect", "aozora2011_2", true); SRS.layoutSelect = "aozora2011_2"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } } if ( date.includes("2010") ) { if (SRS.layoutSelect != "aozora2011_2") { executeRadios("layoutSelect", "aozora2011_2", true); SRS.layoutSelect = "aozora2011_2"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); window.location.reload(); } } } 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",""); } $("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($("#stargazer-header")){ if($(".stargazer-tab.active")){ $(".stargazer-tab.active").classList.remove("active"); } $("#stargazer-home.stargazer-tab").classList.add("active"); } } if (window.location.href.includes("feed/UC")) { $("html").setAttribute("location","feed-inline-channel"); if($("#stargazer-header")){ if($(".stargazer-tab.active")){ $(".stargazer-tab.active").classList.remove("active"); } $("#stargazer-channels.stargazer-tab").classList.add("active"); } } 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($("#stargazer-header")){ if($(".stargazer-tab.active")){ $(".stargazer-tab.active").classList.remove("active"); } } } if (window.location.href.includes("feed/guide")) { $("html").setAttribute("location","feed-guide-builder"); if($("#stargazer-header")){ if($(".stargazer-tab.active")){ $(".stargazer-tab.active").classList.remove("active"); } $("#stargazer-channels.stargazer-tab").classList.add("active"); } } if (window.location.href.includes("/subscriptions")) { $("html").setAttribute("location","feed-subs"); if($("#stargazer-header")){ if($(".stargazer-tab.active")){ $(".stargazer-tab.active").classList.remove("active"); } $("#stargazer-videos.stargazer-tab").classList.add("active"); } } if (window.location.href.includes("social")) { $("html").setAttribute("location","feed-social"); if($("#stargazer-header")){ if($(".stargazer-tab.active")){ $(".stargazer-tab.active").classList.remove("active"); } $("#stargazer-community.stargazer-tab").classList.add("active"); } } if (window.location.href.includes("recommended_for_you")) { $("html").setAttribute("location","feed-recs"); if($("#stargazer-header")){ if($(".stargazer-tab.active")){ $(".stargazer-tab.active").classList.remove("active"); } $("#stargazer-videos.stargazer-tab").classList.add("active"); } } if (window.location.href.includes("/what_to_watch/recommended")) { $("html").setAttribute("location","feed-recs"); if($("#stargazer-header")){ if($(".stargazer-tab.active")){ $(".stargazer-tab.active").classList.remove("active"); } $("#stargazer-videos.stargazer-tab").classList.add("active"); } 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($("#stargazer-header")){ if($(".stargazer-tab.active")){ $(".stargazer-tab.active").classList.remove("active"); } } gdp.searchValue = $("#masthead-search-term").value; gdp.resultCount = $(".num-results span").textContent.toLowerCase(); gdp.resultCount = gdp.resultCount.split(" r")[0].split("t ")[1]; if ($("#aozora-search-header") == null && STS.expAozoraSearch == true) { let container = $(".search-header"); let newElem = document.createElement("div"); newElem.id = "aozora-search-header"; newElem.innerHTML = `
    Search results for ${gdp.searchValue}
    About ${gdp.resultCount} results
    “${gdp.searchValue}” results 1 - 20 of about ${gdp.resultCount}

    `; container.insertBefore(newElem,container.children[0]); } if ($("#st-filter-icon") == null && STS.expPolymerStyles == true) { let container = $(".search-header .yt-uix-button-content"); let newElem = document.createElement("div"); newElem.id = "st-filter-icon"; newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); } } if ($("#page.all_comments")) { $("html").setAttribute("location","comments"); if($("#stargazer-header")){ if($(".stargazer-tab.active")){ $(".stargazer-tab.active").classList.remove("active"); } $("#stargazer-community.stargazer-tab").classList.add("active"); } } if ($("#page.watch")) { $("html").setAttribute("location","watch"); if($("#stargazer-header")){ if($(".stargazer-tab.active")){ $(".stargazer-tab.active").classList.remove("active"); } $("#stargazer-videos.stargazer-tab").classList.add("active"); } if (window.location.href.includes("&list")) { var elm = "#watch7-playlist-data"; waitForElement10(elm).then(function(elm) { if (canGo != false) { reconstructPlaylist(); } }); } } if ($("#page.channel")) { if($("#stargazer-header")){ if($(".stargazer-tab.active")){ $(".stargazer-tab.active").classList.remove("active"); } $("#stargazer-channels.stargazer-tab").classList.add("active"); } $("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" } } } } } } let subsLink = "/feed/subscriptions"; if (STS.expLinkToGridSubs == true) { subsLink = "/feed/subscriptions?flow=grid"; } if (STS.expLogoLinksToSubs == true && $("#logo-container")) { $("#logo-container").href = subsLink; $("#logo-container").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "FEsubscriptions", canonicalBaseUrl: subsLink }, commandMetadata: { webCommandMetadata: { url: subsLink } } } } } } if (STS.expLinkToGridSubs == true && $("#FEsubscriptions-guide-item")) { $("#FEsubscriptions-guide-item a").href = subsLink; $("#FEsubscriptions-guide-item a").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "FEsubscriptions", canonicalBaseUrl:subsLink }, commandMetadata: { webCommandMetadata: { url:subsLink } } } } } } var arraNum = 0; arra.forEach(itemRoot => { let name = itemRoot[0]; checkSetting(name).then(function(value) { if (value == true && name == "configNoCast") { $("html").setAttribute("config-no-cast", ""); } else if (value == true && name == "configAccountMenuV3SettingsButton") { $("html").setAttribute("config-account-menu-v3-settings-button", ""); createMESettingsBtn(); } else if (value == true && name == "configPolymerMenuV3SettingsButton") { $("html").setAttribute("config-polymer-menu-v3-settings-button", ""); } else if (value == true && name == "configCreateMenuV3SettingsButton") { $("html").setAttribute("config-create-menu-v3-settings-button", ""); } else if (value == true && name == "expAdaptiveLayout") { $("html").setAttribute("exp-adaptive-layout", ""); } else if (value == true && name == "expRelatedThumbsSizeSmaller") { $("html").setAttribute("exp-related-thumbs-size-smaller", ""); } else if (value == true && name == "expRelatedThumbsSizeMedium") { $("html").setAttribute("exp-related-thumbs-size-medium", ""); } else if (value == true && name == "expRelatedThumbsSizeLarge") { $("html").setAttribute("exp-related-thumbs-size-large", ""); } else if (value == true && name == "expRelatedThumbsSizeStupid") { $("html").setAttribute("exp-related-thumbs-size-stupid", ""); } else if (value == true && name == "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 == "expNeverShowCompactDate") { $("html").setAttribute("exp-never-show-compact-date", ""); } else if (value == true && name == "expTwoColumnSearchResults") { $("html").setAttribute("exp-two-column-search-results", ""); } else if (value == true && name == "expRelatedGrid") { $("html").setAttribute("exp-related-grid", ""); } else if (value == true && name == "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 == "expSkinnySubscribe") { $("html").setAttribute("exp-skinny-subscribe",""); } else if (value == true && name == "expModernStyles") { $("html").setAttribute("exp-modern-styles", ""); changeCommentPlaceholder(0); changeCommentHeader(0); } else if (value == true && name == "expModernCards") { $("html").setAttribute("exp-modern-cards", ""); } else if (value == true && name == "expLightChannelBar") { $("html").setAttribute("exp-light-channel-bar", ""); } else if (value == true && name == "expModernNotifIcon") { $("html").setAttribute("exp-modern-notif-icon", ""); } else if (value == true && name == "expModernTopbar") { $("html").setAttribute("exp-modern-topbar", ""); } else if (value == true && name == "expModernUpload") { $("html").setAttribute("exp-modern-upload", ""); } else if (value == true && name == "expModernGuideButton") { $("html").setAttribute("exp-modern-guide-button", ""); } else if (value == true && name == "expModernSearchIcon") { $("html").setAttribute("exp-modern-search-icon", ""); } else if (value == true && name == "expSearchText") { $("html").setAttribute("exp-search-text", ""); createSearchText(); } else if (value == true && name == "expModernTitle") { $("html").setAttribute("exp-modern-title", ""); } else if (value == true && name == "expModernGuide") { $("html").setAttribute("exp-modern-guide", ""); doModernGuide(); } else if (value == true && name == "expModernHome") { $("html").setAttribute("exp-modern-home", ""); } else if (value == true && name == "expModernPlaylists") { $("html").setAttribute("exp-modern-playlists", ""); } else if (value == true && name == "expModernPlaylistThumbnails") { $("html").setAttribute("exp-modern-playlist-thumbnails", ""); } else if (value == true && name == "expPlaylistRedBorder") { $("html").setAttribute("exp-playlist-red-border", ""); } else if (value == true && name == "expPlaylistTimestamps") { $("html").setAttribute("exp-playlist-timestamps", ""); } else if (value == true && name == "expTrueScrollableGuide") { $("html").setAttribute("exp-true-scrollable-guide", ""); doScrollableGuide(); } else if (value == true && name == "expModernPlayer") { $("html").setAttribute("exp-modern-player", ""); doModernPlayer(); } else if (value == true && name == "expModernPlayerV2") { $("html").setAttribute("exp-modern-player", ""); $("html").setAttribute("exp-modern-player-v2", ""); doModernPlayer(); } else if (value == true && name == "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 == "expCosmicBannersV2") { $("html").setAttribute("exp-cosmic-banners-v2", ""); } else if (value == true && name == "expCosmicComments") { $("html").setAttribute("exp-legacy-comments", ""); $("html").setAttribute("exp-cosmic-comments", ""); } else if (value == true && name == "expCosmicGuideLayout") { $("html").setAttribute("exp-cosmic-guide-layout", ""); createCosmicGuide(); } else if (value == true && name == "expCosmicGuideStyle") { $("html").setAttribute("exp-cosmic-guide-style", ""); } else if (value == true && name == "expCosmicFeedsV1") { $("html").setAttribute("exp-cosmic-feeds-v1", ""); doCosmicFeedHeader(); } else if (value == true && name == "expCosmicFeedsV2") { $("html").setAttribute("exp-cosmic-feeds-v2", ""); doCosmicFeedHeader(); } else if (value == true && name == "expCosmicFeedsV3") { $("html").setAttribute("exp-cosmic-feeds-v3", ""); doCosmicFeedHeader(); } else if (value == true && name == "expCosmicFeedsThirdColumn") { $("html").setAttribute("exp-cosmic-feeds-third-column", ""); doThirdColumnVideosPrep(); } else if (value == true && name == "expWatch5D") { $("html").setAttribute("exp-watch5d", ""); createWatch5Prep(); } else if (value == true && name == "expNotifSquare") { $("html").setAttribute("notif-square", ""); } else if (value == true && name == "expChannels3" && !window.location.href.includes("force-c4")) { $("html").setAttribute("exp-channels3",""); createChannels3Prep(); } else if (value == true && name == "expChannels3BGVerticalRepeat" && !window.location.href.includes("force-c4")) { $("html").setAttribute("exp-channels3-bg-vertical-repeat",""); } else if (value == true && name == "expChannels3BGHorizontalRepeat" && !window.location.href.includes("force-c4")) { $("html").setAttribute("exp-channels3-bg-horizontal-repeat",""); } else if (value == true && name == "expChannels3TimeVisible") { $("html").setAttribute("exp-channels3-time-visible",""); } else if (value == true && name == "expChannels3DateVisible") { $("html").setAttribute("exp-channels3-date-visible",""); } else if (value == true && name == "expChannels3DateHidden") { $("html").setAttribute("exp-channels3-date-hidden",""); } else if (value == true && name == "expNoGuide") { $("html").setAttribute("guide", "no"); } else if (value == true && name == "expGuideOnFeedsOnly") { $("html").setAttribute("guide", "feeds"); } else if (value == true && name == "expAozoraHome") { $("html").setAttribute("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 == "expAozoraComments") { $("html").setAttribute("exp-legacy-comments", ""); $("html").setAttribute("exp-aozora-comments", ""); } else if (value == true && name == "expAozoraSubscribe") { $("html").setAttribute("exp-aozora-subscribe", ""); } else if (value == true && name == "expAozoraTopbarLinks") { $("html").setAttribute("exp-aozora-topbar-links", ""); createAozoraTopbarLinks(); } else if (value == true && name == "expAozoraSearch") { $("html").setAttribute("exp-aozora-search", ""); } else if (value == true && name == "expWatch5C") { $("html").setAttribute("exp-watch5d", ""); $("html").setAttribute("exp-watch5c", ""); createWatch5Prep(); } else if (value == true && name == "expStargazerTabbedHeader") { $("html").setAttribute("stargazer-header", "tabbed"); stargazerHeader(0); searchButtonLowercase(); } else if (value == true && name == "expStargazerBarHeader") { $("html").setAttribute("stargazer-header", "bar"); stargazerHeader(1); searchButtonLowercase(); } else if (value == true && name == "expStargazerSimpleHeader") { $("html").setAttribute("stargazer-header", "simple"); stargazerHeader(2); searchButtonLowercase(); } else if (value == true && name == "expStargazerSubscribe") { $("html").setAttribute("stargazer-sub",""); } else if (value == true && name == "expHomeTab") { $("html").setAttribute("exp-home-tab", ""); } else if (value == true && name == "expRoboto") { $("html").setAttribute("exp-roboto", ""); } else if (value == true && name == "expCenteredSearch") { $("html").setAttribute("exp-centered-search", ""); } else if (value == true && name == "expBigSearch") { $("html").setAttribute("exp-big-search", ""); } else if (value == true && name == "expSecondarySearchIcon") { $("html").setAttribute("exp-secondary-search-icon", ""); createSearchTumor(); } else if (value == true && name == "expMaterialSearch") { $("html").setAttribute("exp-material-search", ""); createSearchIcon(); } else if (value == true && name == "expPolymerAccountMenu") { $("html").setAttribute("exp-account-menu", ""); $("html").setAttribute("exp-polymer-account-menu", ""); createAccountMenu(); } else if (value == true && name == "expPolymerShell") { $("html").setAttribute("exp-polymer-shell", ""); createSearchIcon(); createNotifIcon(); } else if (value == true && name == "expEarlyPolymerShell") { $("html").setAttribute("exp-polymer-shell", ""); $("html").setAttribute("exp-early-polymer-shell", ""); createNotifIcon(); } else if (value == true && name == "expEarlyPolymerGuide") { $("html").setAttribute("exp-early-polymer-guide", ""); } else if (value == true && name == "expPolymerGen2Colors") { $("html").setAttribute("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); createShelfIcons(); } else if (value == true && name == "expBetaPolymerStyles") { $("html").setAttribute("exp-beta-polymer-styles", ""); } else if (value == true && name == "expPolymerChannels") { $("html").setAttribute("exp-polymer-channels", ""); } else if (value == true && name == "expColorfulChannels") { $("html").setAttribute("exp-colorful-channels", ""); } else if (value == true && name == "expPolymerComments") { $("html").setAttribute("exp-polymer-comments", ""); } else if (value == true && name == "expPolymerTooltips") { $("html").setAttribute("exp-polymer-tooltips", ""); } else if (value == true && name == "expTopbarShadow") { $("html").setAttribute("exp-topbar-shadow", ""); } else if (value == true && name == "expMaterialSignIn") { $("html").setAttribute("exp-material-sign-in", ""); } else if (value == true && name == "expRichGridHome") { $("html").setAttribute("exp-rich-grid-home", ""); doRichGridHome(); } else if (value == true && name == "expWatch9A") { $("html").setAttribute("exp-watch9a", ""); createRealWatch9Prep(); } else if (value == true && name == "expWatch9B") { $("html").setAttribute("exp-watch9b", ""); createRealWatch9Prep(); } else if (value == true && name == "expWatch10Beta") { $("html").setAttribute("exp-watch10-beta", ""); createWatch10Prep(); } else if (value == true && name == "expWatch10") { $("html").setAttribute("exp-watch10", ""); createWatch10Prep(); } else if (value == true && name == "expCommentsTeaser") { $("html").setAttribute("exp-comments-teaser", ""); } else if (value == true && name == "expSegmentedLtod") { $("html").setAttribute("exp-segmented-ltod", ""); } else if (value == true && name == "expRoundedSubscribe") { $("html").setAttribute("exp-rounded-subscribe", ""); } else if (value == true && name == "expBlackSubscribe") { $("html").setAttribute("exp-black-subscribe", ""); } else if (value == true && name == "expRoundedThumbs") { $("html").setAttribute("exp-rounded-thumbs", ""); } else if (value == true && name == "expRoundedPlayer") { $("html").setAttribute("exp-rounded-player", ""); } else if (value == true && name == "expRoundedSearch") { $("html").setAttribute("exp-rounded-search", ""); } else if (value == true && name == "expRoundedGuide") { $("html").setAttribute("exp-rounded-guide", ""); } else if (value == true && name == "expRoundedStyles") { $("html").setAttribute("exp-rounded-styles", ""); } else if (value == true && name == "expFrostedGlass") { $("html").setAttribute("exp-frosted-glass", ""); } else if (value == true && name == "expPolymerGen3Colors") { $("html").setAttribute("exp-polymer-gen3-colors", ""); } else if (value == true && name == "expYTSansTitle") { $("html").setAttribute("exp-yt-sans-title", ""); } else if (value == true && name == "expWMRButtonsLowercase") { $("html").setAttribute("exp-wmr-buttons-lowercase", ""); } else if (value == true && name == "expWMRAddTo") { $("html").setAttribute("exp-wmr-addto", ""); } else if (value == true && name == "expWMRNoSaveText") { $("html").setAttribute("exp-wmr-no-save-text", ""); } else if (value == true && name == "expWMRNoShareText") { $("html").setAttribute("exp-wmr-no-share-text", ""); } else if (value == true && name == "expOutlineIcons") { $("html").setAttribute("exp-outline-icons", ""); } else if (value == true && name == "expRoundedTopbarPfp") { $("html").setAttribute("exp-rounded-topbar-pfp", ""); } else if (value == true && name == "expUploadIcon") { $("html").setAttribute("exp-upload-icon", ""); createUploadIcon(); } else if (value == true && name == "expCreateIcon") { $("html").setAttribute("exp-create-icon", ""); createCreateIcon(); } else if (value == true && name == "expYouTubeApps") { $("html").setAttribute("exp-youtube-apps", ""); createYouTubeApps(); } else if (value == true && name == "expRingo2") { $("html").setAttribute("exp-ringo2", ""); doGuideIcons("ringo2"); } else if (value == true && name == "exp2024Favicon") { $("html").setAttribute("exp-2024-favicon", ""); replaceFavicon("2024"); } else if (value == true && name == "exp2024FaviconOld") { $("html").setAttribute("exp-2024-favicon-old", ""); replaceFavicon("2024_old"); } else if (value == true && name == "exp2017Favicon") { $("html").setAttribute("exp-2017-favicon", ""); replaceFavicon("2017"); } else if (value == true && name == "exp2015Favicon") { $("html").setAttribute("exp-2015-favicon", ""); replaceFavicon("2015"); } else if (value == true && name == "exp2012Favicon") { $("html").setAttribute("exp-2012-favicon", ""); replaceFavicon("2012"); } else if (value == true && name == "exp2010Favicon") { $("html").setAttribute("exp-2010-favicon", ""); replaceFavicon("2010"); } else if (value == true && name == "exp2005Favicon") { $("html").setAttribute("exp-2005-favicon", ""); replaceFavicon("2005"); } else if (value == true && name == "expHideYoodles") { $("html").setAttribute("exp-hide-yoodles", ""); hideYoodles(); } else if (value == true && name == "expFixedShareIcons") { $("html").setAttribute("exp-fixed-share-icons", ""); } else if (value == true && name == "expFixedXIcon") { $("html").setAttribute("exp-fixed-x-icon", ""); } else if (value == true && name == "expMaterialGbar") { $("html").setAttribute("exp-material-gbar", ""); } }); }); refreshCheck++; if ( $("#startube-new-settings-popup") === null && STS.show2point3 == 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.3.0
    Quality of life improvements
    Many QoL improvements have been made, such as a more accurate 2014 layout, the videos dropdown on the 2011 & 2012 layouts, more accurate right click menu on the 2016-2020 player, as well as most layouts being more accurate overall.
    Experimental new layout options
    Unfinished versions of the Stargazer layouts have been added, as well as a more accurate version of Epic Panda.
    `; container76.insertBefore(newElem76, container76.children[0]); $("#close-startube-new-settings-popup").addEventListener("click", function() { $("#startube-new-settings-popup").remove(); STS.show2point3 = false; applySettings(0); $("html").setAttribute("no-startube-popup",""); var elm = "#show2point3"; waitForElement10(elm).then(function(elm) { if (canGo != false) { $("#show2point3").setAttribute("checked","false"); } }); }); } } function createOOBEAccessBtn() { let container = document.querySelector('.jfk-oobe-page .tabs'); //let container = document.querySelector('#yt-masthead-content'); var newElem = document.createElement("span"); newElem.id = "st-settings-button"; newElem.classList = "tab startube-show-svgs startube-oobe-access-btn"; newElem.innerHTML = `
    StarTube Settings
    `; container.insertBefore(newElem, container.children[4]); $("#st-settings-button").addEventListener("click", showHideSettings); } function createExpandedFooter() { let container = document.querySelector('.smartadd.selected .smartadd_content .internal-config'); //let container = document.querySelector('#yt-masthead-content'); var newElem = document.createElement("div"); newElem.id = "startube-astro-settings"; newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[0]); $("#st-settings-button").addEventListener("click", showHideSettings); } function createSettingsMenu() { container = document.querySelector('.spitfire-body-container.v3'); newElem = document.createElement("div"); newElem.id = "startube-settings-window-entity"; newElem.classList = "hid astronomical-settings-refresh astro-settings"; newElem.innerHTML = `
    StarTube Settings Version ${currStarVer}
    Your changes were automatically saved. Refresh the page for them to apply.

    Misc

    Config

    Site

    Layout
    Misc
    Topbar
    Guide
    Player
    Watch page
    Channel page
    Advanced

    Config

    General site layout options.

    Config overview

    Config is from StarTube version ${STS.importantInfo.startubeVersion}
    Config is from the ${STS.importantInfo.startubeChannel} channel

    Reset config

    Turn off all StarTube options (will not affect locked settings)

    Layout

    General site layout options.

    Layout mode

    Manual
    Adaptive

    Adaptive layout is on. Switch to manual layout mode to choose your layout.

    Layout select

    Custom (don't enforce any specific layout, ideal for making use of V3's config options)
    Amsterdam
    2024 (Custom ver)
    Polymer
    2022
    2021
    2020
    2019
    2018
    2017
    2016 (prototype layout)
    Hitchhiker
    2024 (unofficial legacy layout, uses the pinkish Ringo2 rebrand)
    2018-2020 (legacy layout)
    2017 (legacy layout)
    Early 2017
    Late 2016
    Mid 2016
    Early 2016
    2015
    Early 2015
    2014
    Late 2013
    Mid 2013
    Early 2013
    Epic Panda (prototype layout)
    Mid-Late 2012 (prototype layout)
    Mid-Late 2012 (prototype layout, custom ver)
    Cosmic Panda
    Late 2012
    Mid 2012
    Early 2012
    Aozora
    2011
    Stargazer
    Late 2009
    Very unfinished
    Early 2009
    Very unfinished
    2008
    Very unfinished

    Misc

    General site layout options.

    Favicon select

    Choose which little icon appears on the tabs. Note that these don't work 100% of the time.
    Auto
    2024
    2024 (Old)
    2017-2024
    2015-2017
    2012-2015 (V3 default)
    2010-2011
    2005-2010

    Topbar

    General site layout options.

    Gbar version

    Use the modern Gbar on all layouts.
    Use the classic Gbar on all layouts.
    Use the material Gbar on all layouts.
    Always off
    None of the above; do not allow StarTube to change V3's Gbar settings (will not undo previous changes made by StarTube)

    Account menu

    Auto
    Masthead Expanded (2014 and earlier)
    Hitchhiker Menu (2015 onwards Hitchhiker layouts)
    Polymer Menu (2017-present)

    Guide

    Guide (left sidebar) options.

    Guide item link

    Choose whether channel links on the guide (left sidebar) take you to their channel, or their feed. [This setting just changes the existing V3 setting GUIDE_NAVIGATE_TO_CHANNEL_FEED.]
    Auto
    Channel
    Feed (V3 default)

    Guide always pinned

    Keep the guide visible on all pages, including the watch page. Only affects layouts from 2014 and later.
    On
    Off

    Player

    General site layout options.

    Player version

    Automatically decide based on layout
    2016-2020
    2015-2016
    2013-2015 (V3 default)
    Flash7
    Embed Player (use this if the player isn't working)
    None of the above; do not allow StarTube to change V3's player settings (will not undo previous changes made by StarTube)

    Player size

    Choose the set of player sizes to use across different resolutions.
    Auto (stable)
    Sticks to the basic V3 player sizes. If you don't want bugs, use this
    Auto (high accuracy, less stable)
    More accurate, but uses the custom player sizes, and therefore breaks theater mode on most layouts
    Non-flexwatch [always 640x360]
    Flexwatch Mini (V3 default)
    Flexwatch Mini Version 2 (~2015 onwards) [Same player sizes, but they happen at different resoltions]
    Breaks theater mode
    Flexwatch Medium (Custom, bigger sizes) [640x360, 1024x576, 1600x900]
    Breaks theater mode
    Flexwatch Large (Custom, even bigger sizes, closer to modern YouTube) [854x480, 1280x720, 1920x1080]
    Breaks theater mode

    Watch page

    General site layout options.

    Watch layout select

    Auto
    Auto (use alt-watch9 for Hitchhiker layouts)
    Alt-watch9 (works best on the hitchhiker layouts)
    Fancy Alt-watch9 (works best on the hitchhiker layouts)

    Related tabs

    A component of alt-watch9 that can also be used in other layouts. If you disable this while using alt-watch9, you will get alt-watch9's original three-column layout.
    Auto (only enabled when alt-watch9 is enabled)
    On
    On (don't move subscribe button)
    Off

    Related grid

    On (only works with 2013 and later)
    Off

    Related video size

    Auto
    Smaller (2011 and below)
    Small (2012-2016)
    Medium (custom middleground)
    Large (2016-present)
    Huge (based on a Polymer experiment)

    Show dates on related videos

    Auto
    Always show
    Show on hover (V3 default)
    Never show

    Channel page

    General site layout options.

    Channel version

    Auto
    Channels4 (2013-present)
    Channels3 (Late 2011-Early 2013)

    Colorful channels

    Makes the rest of the page use the colors of the channel banner. Only works with Channels4.
    Auto (on for 2016 Polymer)
    Auto (on for all Polymer layouts)
    On
    On (V3 implementation, doesn't change the guide or topbar)
    Off

    Advanced

    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(); }); $("#astro-v3-settings-access-btn").addEventListener("click", openV3Settings); $("#cancelJSON").addEventListener("click", function() { $("#startube-settings-window").setAttribute("loading-config","false"); }); $("#json-upload").addEventListener("cancel", () => { $("#startube-settings-window").setAttribute("loading-config","false"); }); $("#json-upload").addEventListener("change", () => { $("#startube-settings-window").setAttribute("loading-config","true"); }); $("#st-load-file button").addEventListener("click", function() { if ($("#st-load-file input").files[0]) { var theFile = $("#st-load-file input").files[0].type; if (theFile == "application/json") { var file = $("#st-load-file input").files[0]; actionFile(file); } else { alert("Invalid file type. Please upload a JSON file."); } } else { alert("Please select a file."); } }); $("#RTD").addEventListener("click", function() { localStorage.removeItem(theSets); localStorage.removeItem("starTubeConfigCreated"); window.location.reload(); }); $("#DAO").addEventListener("click", function() { var settingArray = document.querySelectorAll('.astro-checkbox-setting[value="true"][iron="false"] .astro-checkbox'); settingArray.forEach(item => { item.click(); }); window.location.reload(); }); doRadioSettings(); $("#refreshPage").addEventListener("click", function() { window.location.reload(); }); $("#exitSettings").addEventListener("click", showHideSettings); $("#startube-settings-fence").addEventListener("click", showHideSettings); $("#astro-micro-filter-button").addEventListener("click", showHideMicroFilter); $("#astro-micro-filter-fence").addEventListener("click", showHideMicroFilter); $("#astro-mc-all").addEventListener("click",function() { $("#astro-micro-filter-button").setAttribute("state","all"); $("#astro-micro-filter-menu").setAttribute("state","all"); $("#startube-microconfigs-dump").setAttribute("filter","none"); showHideMicroFilter(); /*let resultCount = 0; setTimeout(function() { var arraySettings = document.querySelectorAll(".astro-checkbox-setting[hide='false']"); arraySettings.forEach(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-misc") { i.addEventListener("click", function() { $("#startube-settings-content > div").setAttribute("state","misc"); $(".astro-sidebar-item.active").classList.remove("active"); $("#st-astro-misc").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-channel") { i.addEventListener("click", function() { $("#startube-settings-content > div").setAttribute("state","channel"); $(".astro-sidebar-item.active").classList.remove("active"); $("#st-astro-channel").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(theSets); 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(".accountMenu").forEach(i => { let value = i.getAttribute("value"); if (value == STS.radioSettings.accountMenu) { i.setAttribute("checked","true"); } i.addEventListener("click",function() { $(".accountMenu[checked]").removeAttribute("checked"); value == i.getAttribute("value"); i.setAttribute("checked","true"); STS.radioSettings.accountMenu = value; executeRadios("accountMenu",value); applySettings(); }); }); document.querySelectorAll(".faviconSelect").forEach(i => { let value = i.getAttribute("value"); if (value == STS.radioSettings.faviconSelect) { i.setAttribute("checked","true"); } i.addEventListener("click",function() { $(".faviconSelect[checked]").removeAttribute("checked"); value == i.getAttribute("value"); i.setAttribute("checked","true"); STS.radioSettings.faviconSelect = value; executeRadios("faviconSelect",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(".guideAlwaysPinned").forEach(i => { let value = i.getAttribute("value"); if (value == STS.radioSettings.guideAlwaysPinned) { i.setAttribute("checked","true"); } i.addEventListener("click",function() { $(".guideAlwaysPinned[checked]").removeAttribute("checked"); value == i.getAttribute("value"); i.setAttribute("checked","true"); STS.radioSettings.guideAlwaysPinned = value; executeRadios("guideAlwaysPinned",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(); }); }); document.querySelectorAll(".channelVersion").forEach(i => { let value = i.getAttribute("value"); if (value == STS.radioSettings.channelVersion) { i.setAttribute("checked","true"); } i.addEventListener("click",function() { $(".channelVersion[checked]").removeAttribute("checked"); value == i.getAttribute("value"); i.setAttribute("checked","true"); STS.radioSettings.channelVersion = value; executeRadios("channelVersion",value); applySettings(); }); }); document.querySelectorAll(".colorfulChannels").forEach(i => { let value = i.getAttribute("value"); if (value == STS.radioSettings.colorfulChannels) { i.setAttribute("checked","true"); } i.addEventListener("click",function() { $(".colorfulChannels[checked]").removeAttribute("checked"); value == i.getAttribute("value"); i.setAttribute("checked","true"); STS.radioSettings.colorfulChannels = value; executeRadios("colorfulChannels",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 = `
    Comments
    Add a comment...
    `; container.insertBefore(altWatch9, container.children[number]); container = $("#watch7-sidebar"); var altWatch9 = document.createElement("div"); altWatch9.id = "watch-panels"; altWatch9.innerHTML = `
    Comments
    `; container.insertBefore(altWatch9, container.children[0]); $("#wmr-actions-container").innerHTML = STH.WMR_ACTIONS; createPopups(); var elm = "#watch10-container"; waitForElement(elm).then(function(elm) { if (canGo != false) { addIcons(); if (STS.expWatch10 == true) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector("#watch10-owner"); var newHome = document.querySelector('#watch10-owner-actions-row'); newHome.insertBefore(thePanel, newHome.children[0]); thePanel = document.querySelector("#watch10-actions"); newHome.insertBefore(thePanel, newHome.children[1]); thePanel = document.querySelector("#watch10-description"); newHome = $("#watch10-desc-teaser-row"); newHome.insertBefore(thePanel, newHome.children[0]); thePanel = document.querySelector("#watch10-comment-teaser"); newHome.insertBefore(thePanel, newHome.children[1]); } }); } if (document.querySelector("#watch10-sentiment-actions #watch7-sentiment-actions") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector("#watch7-sentiment-actions"); var newHome5 = document.querySelector('#watch10-sentiment-actions'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if (document.querySelector("#watch10-desc #watch-description") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector("#watch-description"); var newHome5 = document.querySelector('#watch10-desc'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if (document.querySelector("#watch10-owner #watch7-subscription-container") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector("#watch7-subscription-container"); var newHome5 = document.querySelector('#watch10-subscribe'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if (document.querySelector("#watch10-container .video-extras-sparkbars") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector(".video-extras-sparkbars"); var newHome5 = document.querySelector('#watch7-sentiment-actions'); newHome5.insertBefore(thePanel, newHome5.children[1]); } }); } if (document.querySelector("#watch10-desc #watch10-views-info") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { let container = $("#eow-description"); let newElem = document.createElement("span"); newElem.id = "watch10-views-info"; newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[0]); } }); } if (document.querySelector("#watch10-container .watch-view-count") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector(".watch-view-count"); var newHome5 = document.querySelector('#watch10-view-count'); newHome5.insertBefore(thePanel, newHome5.children[1]); } }); } if (document.querySelector("#watch10-container .watch-title") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector(".watch-title"); var newHome5 = document.querySelector('#watch10-title'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if (document.querySelector("#watch10-container .yt-user-photo") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector(".yt-user-photo"); var newHome5 = document.querySelector('#watch10-pfp'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if (document.querySelector("#watch10-container .yt-user-name") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector("#watch7-user-header"); var newHome5 = document.querySelector('#watch10-channel-name'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if ($("#yt-masthead-user .yt-masthead-user-icon img")) { let yourPfp = $("#yt-masthead-user .yt-masthead-user-icon img").src; $("#comment-teaser-your-pfp img").src = yourPfp; } $("#watch-description-expand span").textContent = "...more"; var elm = ".distiller_content"; waitForElement10(elm).then(function(elm) { if (canGo != false && $(".comment")) { $("#watch10-comment-teaser").setAttribute("has-comment",""); var elm = ".distiller_yt_headline"; waitForElement10(elm).then(function(elm) { if (canGo != false) { let count = gdp.commentCount; let comment = $(".comment"); let pfp = comment.querySelector(".distiller_yt-thread_avatar").src; let text = comment.querySelector(".text-content span").textContent; $("#comment-count span").textContent = count; $("#comment-teaser-pfp img").src = pfp; $("#comment-teaser-text span").textContent = text; $("#comment-panel .watch-panel-subtitle").textContent = count; } }); } }); $("#watch10-comment-teaser").addEventListener("click", function() { handoffComments("forward"); }); $("#comment-panel-close").addEventListener("click", function() { handoffComments("backward"); }); /*moreActions.addEventListener("click", function() { if (document.querySelector("#watch8-more[visible='false']") != null) { document.querySelector("#watch8-more").setAttribute("visible", "true"); document.querySelector("#nonfloater").setAttribute("visible", "true"); document.querySelector("#watch8-container").setAttribute("more-visible", "true"); } else { document.querySelector("#watch8-more").setAttribute("visible", "false"); document.querySelector("#nonfloater").setAttribute("visible", "false"); document.querySelector("#watch8-container").setAttribute("more-visible", "false"); } }); stats.addEventListener("click", function() { document.querySelector("#watch8-more").setAttribute("visible", "false"); document.querySelector("#nonfloater").setAttribute("visible", "false"); document.querySelector("#watch8-container").setAttribute("more-visible", "false"); if (document.querySelector("#watch8-container[state='stats']") != null) { document.querySelector("#watch8-container").setAttribute("state", "none"); } else { document.querySelector("#watch8-container").setAttribute("state", "stats"); } }); stats2.addEventListener("click", function() { if (document.querySelector("#watch8-container[state='stats']") != null) { document.querySelector("#watch8-container").setAttribute("state", "none"); } else { document.querySelector("#watch8-container").setAttribute("state", "stats"); } }); transcript.addEventListener("click", function() { document.querySelector("#watch8-more").setAttribute("visible", "false"); document.querySelector("#nonfloater").setAttribute("visible", "false"); document.querySelector("#watch8-container").setAttribute("more-visible", "false"); if (document.querySelector("#watch8-container[state='transcript']") != null) { document.querySelector("#watch8-container").setAttribute("state", "none"); } else { document.querySelector("#watch8-container").setAttribute("state", "transcript"); } }); transcript2.addEventListener("click", function() { if (document.querySelector("#watch8-container[state='transcript']") != null) { document.querySelector("#watch8-container").setAttribute("state", "none"); } else { document.querySelector("#watch8-container").setAttribute("state", "transcript"); } }); close.addEventListener("click", function() { document.querySelector("#watch8-container").setAttribute("state", "none"); }); /*if (document.querySelector("#watch9-share #action-panel-share") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(2)").click(); } if (document.querySelector("#watch8-desc #action-panel-share") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector("#action-panel-share"); var newHome5 = document.querySelector('#watch8-share'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if (document.querySelector("#watch7-secondary-actions .hid.yt-uix-button:nth-child(4)") == null) { if (document.querySelector("#watch9-share #action-panel-transcript") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(4)").click(); } if (document.querySelector("#watch8-desc #action-panel-transcript") == null) { var elm = ".watch-transcript"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector("#action-panel-transcript"); var newHome5 = document.querySelector('#watch8-transcript'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } } if (document.querySelector("#watch9-share #action-panel-stats") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(5)").click(); } if (document.querySelector("#watch8-desc #action-panel-stats") == null) { var elm = ".metric-label"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector("#action-panel-stats"); var newHome5 = document.querySelector('#watch8-stats'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if (document.querySelector("#watch9-addto #action-panel-addto") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(3)").click(); } if (document.querySelector("#watch8-addto #action-panel-addto") == null) { var elm = ".playlist-items"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector("#action-panel-addto"); var newHome5 = document.querySelector('#watch8-addto'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } var nonfloater = document.querySelector("#nonfloater"); var addTo = document.querySelector("#addto.watch8-action"); var share = document.querySelector("#share.watch8-action"); var stats = document.querySelector("#stats.watch8-menuitem"); var stats2 = document.querySelector("#stats.watch8-button"); var transcript = document.querySelector("#transcript.watch8-menuitem"); var transcript2 = document.querySelector("#transcript.watch8-button"); var moreActions = document.querySelector("#more-actions.watch8-action"); var showScroller = document.querySelector("#channel-videos.watch8-action"); var close = document.querySelector("#watch8-close button"); if (document.querySelector("#watch7-secondary-actions .hid.yt-uix-button:nth-child(4)") != null) { document.querySelector("#transcript.watch8-button").classList.add("hid"); document.querySelector("#transcript.watch8-menuitem").setAttribute("visible","false"); } nonfloater.addEventListener("click", function() { document.querySelector("#watch8-addto").setAttribute("visible", "false"); document.querySelector("#watch8-more").setAttribute("visible", "false"); document.querySelector("#nonfloater").setAttribute("visible", "false"); document.querySelector("#watch8-container").setAttribute("addto-visible", "false"); document.querySelector("#watch8-container").setAttribute("more-visible", "false"); }); addTo.addEventListener("click", function() { if (document.querySelector("#watch8-addto[visible='false']") != null) { document.querySelector("#watch8-addto").setAttribute("visible", "true"); document.querySelector("#nonfloater").setAttribute("visible", "true"); document.querySelector("#watch8-container").setAttribute("addto-visible", "true"); } else { document.querySelector("#watch8-addto").setAttribute("visible", "false"); document.querySelector("#nonfloater").setAttribute("visible", "false"); document.querySelector("#watch8-container").setAttribute("addto-visible", "false"); } }); share.addEventListener("click", function() { if (document.querySelector("#watch8-container[state='share']") != null) { document.querySelector("#watch8-container").setAttribute("state", "none"); } else { document.querySelector("#watch8-container").setAttribute("state", "share"); } }); moreActions.addEventListener("click", function() { if (document.querySelector("#watch8-more[visible='false']") != null) { document.querySelector("#watch8-more").setAttribute("visible", "true"); document.querySelector("#nonfloater").setAttribute("visible", "true"); document.querySelector("#watch8-container").setAttribute("more-visible", "true"); } else { document.querySelector("#watch8-more").setAttribute("visible", "false"); document.querySelector("#nonfloater").setAttribute("visible", "false"); document.querySelector("#watch8-container").setAttribute("more-visible", "false"); } }); stats.addEventListener("click", function() { document.querySelector("#watch8-more").setAttribute("visible", "false"); document.querySelector("#nonfloater").setAttribute("visible", "false"); document.querySelector("#watch8-container").setAttribute("more-visible", "false"); if (document.querySelector("#watch8-container[state='stats']") != null) { document.querySelector("#watch8-container").setAttribute("state", "none"); } else { document.querySelector("#watch8-container").setAttribute("state", "stats"); } }); stats2.addEventListener("click", function() { if (document.querySelector("#watch8-container[state='stats']") != null) { document.querySelector("#watch8-container").setAttribute("state", "none"); } else { document.querySelector("#watch8-container").setAttribute("state", "stats"); } }); transcript.addEventListener("click", function() { document.querySelector("#watch8-more").setAttribute("visible", "false"); document.querySelector("#nonfloater").setAttribute("visible", "false"); document.querySelector("#watch8-container").setAttribute("more-visible", "false"); if (document.querySelector("#watch8-container[state='transcript']") != null) { document.querySelector("#watch8-container").setAttribute("state", "none"); } else { document.querySelector("#watch8-container").setAttribute("state", "transcript"); } }); transcript2.addEventListener("click", function() { if (document.querySelector("#watch8-container[state='transcript']") != null) { document.querySelector("#watch8-container").setAttribute("state", "none"); } else { document.querySelector("#watch8-container").setAttribute("state", "transcript"); } }); close.addEventListener("click", function() { document.querySelector("#watch8-container").setAttribute("state", "none"); });*/ var elm = "#watch-uploader-info"; waitForElement(elm).then(function(elm) { if (canGo != false) { applyMetadata(); } }); function applyMetadata() { if (document.querySelector(".yt-subscription-button-subscriber-count-branded-horizontal") != null) { var subCount = document.querySelector(".yt-subscription-button-subscriber-count-branded-horizontal").textContent; document.querySelector("#watch10-sub-count").textContent = subCount + " subscribers"; } if (document.querySelector("#watch-uploader-info") != null) { var date = document.querySelector("#watch-uploader-info").textContent; if (date.includes("on")) { date = date.split("on ")[1]; } document.querySelector("#watch10-upload-date").textContent = date; } /*if (document.querySelector("#watch9-container") != null) { var viewCount = document.querySelector(".watch-view-count").textContent; document.querySelector("#watch9-views-info #watch9-view-count span").textContent = viewCount; var videoLikes = document.querySelector("#watch8-action-buttons .video-extras-sparkbar-likes").getAttribute("style"); var videoDislikes = document.querySelector("#watch8-action-buttons .video-extras-sparkbar-dislikes").getAttribute("style"); document.querySelector("#watch9-info .video-extras-sparkbar-likes").setAttribute("style", videoLikes); document.querySelector("#watch9-info .video-extras-sparkbar-dislikes").setAttribute("style", videoDislikes); var ltodBar = document.querySelector("#watch9-info .video-extras-sparkbars"); var likesPercent = ltodBar.querySelector("#watch9-info .video-extras-sparkbar-likes").style.width; ltodBar.setAttribute("data-tooltip-text", likesPercent + " of viewers like this video"); ltodBar.style.display = "block"; ltodBar.style.padding = "5px 0"; ltodBar.style.marginBottom = "-5px"; document.querySelector(".watch-view-count").style.marginBottom = "-3px"; } if (document.querySelector("#watch-uploader-info") != null) { var uploadDateRaw = document.querySelector("#watch-uploader-info").textContent; let notNeedNewString = uploadDateRaw.includes("Published"); if (notNeedNewString == true) { var cutString = uploadDateRaw.split('on '); var uploadDate = cutString[1]; document.querySelector("#first-part").style.display = "inline"; document.querySelector("#third-part").style.display = "none"; } else { var uploadDate = uploadDateRaw; document.querySelector("#first-part").style.display = "none"; document.querySelector("#third-part").style.display = "inline"; } document.querySelector(".watch9-upload-date .upload-date").textContent = uploadDate; } if (document.querySelector("#eow-description") != null) { var descElem = document.querySelector("#watch-description-text"); var newHome = document.querySelector('#watch9-description .description-inner'); newHome.insertBefore(descElem, newHome.children[0]); var descHTML = document.querySelector("#eow-description").innerHTML; document.querySelector(".desc-snippet .description-inner").innerHTML = descHTML; //document.querySelector("#watch9-description .description-inner").innerHTML = descHTML; }*/ } } }); } function handoffComments(dir) { if (dir == "forward") { var thePanel = document.querySelector(".comments-iframe-container"); var newHome = document.querySelector("#comment-panel [js-destination]"); newHome.insertBefore(thePanel, newHome.children[0]); $("html").setAttribute("comment-panel-open","true"); } if (dir == "backward") { var thePanel = document.querySelector(".comments-iframe-container"); var newHome = document.querySelector("#watch-discussion"); newHome.insertBefore(thePanel, newHome.children[0]); $("html").setAttribute("comment-panel-open","false"); } } //EXfunct function addIcons() { if (document.querySelector("#watch-like svg") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { let container = $("#watch-like .yt-uix-button-icon-wrapper"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); } }); } if (document.querySelector("#watch-dislike svg") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { let container = $("#watch-dislike .yt-uix-button-icon-wrapper"); let newElem = document.createElement("div"); newElem.setAttribute("class","startube-svg"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); } }); } } function createWatch9(number) { let container = document.querySelector('#watch7-content.watch-content'); var altWatch9 = document.createElement("div"); altWatch9.id = "alt-watch9-container"; altWatch9.innerHTML = `
    Uploaded by ???? on ??? ??, ???? by ????
    Show more
    Show less
    Description
    Show less
    Add to playlist
    This feature is unavailable.
    See all
    `; container.insertBefore(altWatch9, container.children[number]); var elm = ".watch9"; waitForElement(elm).then(function(elm) { if (canGo != false) { if (STS.expWatch9NoOwner == true) { document.querySelector(".watch9").setAttribute("show-owner", "false"); } if (document.querySelector("#watch9-addto #action-panel-addto") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(3)").click(); } if (document.querySelector("#watch9-addto #action-panel-addto") == null) { var elm = ".playlist-items"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var theAddToBtn = document.querySelector("#action-panel-addto"); var newHome = document.querySelector('#watch9-addto .slider-inner'); newHome.appendChild(theAddToBtn); } }); } if (document.querySelector("#watch9-share #action-panel-share") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(2)").click(); } if (document.querySelector("#alt-watch9-container #action-panel-share") == null) { setTimeout(() => { var theSharePanel = document.querySelector("#action-panel-share"); var newHome5 = document.querySelector('#watch9-share .slider-inner'); newHome5.insertBefore(theSharePanel, newHome5.children[1]); }, "1000"); } if (document.querySelector("#watch9-stats #action-panel-stats") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(5)").click(); } if (document.querySelector("#watch9-stats #action-panel-stats") == null) { var elm = ".metric-label"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var theAddToBtn = document.querySelector("#action-panel-stats"); var newHome = document.querySelector('#watch9-stats .slider-inner'); newHome.appendChild(theAddToBtn); } }); } if (document.querySelector("#watch7-secondary-actions .hid.yt-uix-button:nth-child(4)") == null) { if (document.querySelector("#watch9-stats #action-panel-transcript") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(4)").click(); } if (document.querySelector("#watch9-stats #action-panel-transcript") == null) { var elm = ".watch-transcript"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var theAddToBtn = document.querySelector("#action-panel-transcript"); var newHome = document.querySelector('#watch9-transcript .slider-inner'); newHome.appendChild(theAddToBtn); } }); } } else { document.querySelector("#transcript.sidebar-item").classList.add("hid"); $(".watch9").setAttribute("no-transcript",""); } var elm = "#watch-uploader-info"; waitForElement(elm).then(function(elm) { if (canGo != false) { applyMetadata(); } }); function applyMetadata() { if (document.querySelector("#watch9-container .watch-title") == null) { var elm = "#eow-description"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var thePanel = document.querySelector("#watch7-headline"); var newHome5 = document.querySelector('#watch9-title'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if (document.querySelector("#watch-uploader-info") != null) { var uploadDateRaw = document.querySelector("#watch-uploader-info").textContent; let notNeedNewString = uploadDateRaw.includes("Published"); if (notNeedNewString == true) { var cutString = uploadDateRaw.split('on '); var uploadDate = cutString[1]; document.querySelector("#first-part").style.display = "inline"; document.querySelector("#third-part").style.display = "none"; } else { var uploadDate = uploadDateRaw; document.querySelector("#first-part").style.display = "none"; document.querySelector("#third-part").style.display = "inline"; } document.querySelector(".watch9-upload-date .upload-date").textContent = uploadDate; } if (document.querySelector("#eow-description") != null) { var descElem = document.querySelector("#watch-description-text"); var newHome = document.querySelector('#watch9-description .description-inner'); newHome.insertBefore(descElem, newHome.children[0]); var descHTML = document.querySelector("#eow-description").innerHTML; document.querySelector(".desc-snippet .description-inner").innerHTML = descHTML; //document.querySelector("#watch9-description .description-inner").innerHTML = descHTML; } if (document.querySelector(".yt-user-name") != null) { var authorElem = document.querySelector("#watch7-user-header .yt-user-name"); var authorName = authorElem.textContent; var authorLink = document.querySelector(".yt-user-photo").getAttribute("href"); //var authorPfp = document.querySelector(".yt-user-photo img").getAttribute("data-thumb"); document.querySelector(".author-link").textContent = authorName; document.querySelector(".author-link").setAttribute("href", authorLink); document.querySelector("#third-part .author-link").textContent = authorName; document.querySelector("#third-part .author-link").setAttribute("href", authorLink); document.querySelector(".owner-videos-scroller a").setAttribute("href", authorLink + "/videos"); document.querySelector(".owner-videos-scroller a").setAttribute("data-tooltip-text", "View " + authorName + "'s videos"); authorElem.classList.add("yt-uix-tooltip"); authorElem.setAttribute("data-tooltip-text", "View " + authorName + "'s channel"); } if (document.querySelector("#watch8-action-buttons") != null) { var viewCount = document.querySelector("#watch8-action-buttons .watch-view-count").textContent; document.querySelector("#watch9-views-info .watch-view-count").textContent = viewCount; var videoLikes = document.querySelector("#watch8-action-buttons .video-extras-sparkbar-likes").getAttribute("style"); var videoDislikes = document.querySelector("#watch8-action-buttons .video-extras-sparkbar-dislikes").getAttribute("style"); document.querySelector("#watch9-info .video-extras-sparkbar-likes").setAttribute("style", videoLikes); document.querySelector("#watch9-info .video-extras-sparkbar-dislikes").setAttribute("style", videoDislikes); var ltodBar = document.querySelector("#watch9-info .video-extras-sparkbars"); var likesPercent = ltodBar.querySelector("#watch9-info .video-extras-sparkbar-likes").style.width; ltodBar.setAttribute("data-tooltip-text", likesPercent + " of viewers like this video"); ltodBar.style.display = "block"; ltodBar.style.padding = "5px 0"; ltodBar.style.marginBottom = "-5px"; document.querySelector(".watch-view-count").style.marginBottom = "-3px"; } var theViewsInfo = document.querySelector("#watch7-views-info"); var newHome0 = document.querySelector('#watch9-sentiment-actions'); newHome0.insertBefore(theViewsInfo, newHome0.children[0]); var music = document.querySelector("#watch-description-extra-info"); var newHome1 = document.querySelector('.watch9-extra'); newHome1.insertBefore(music, newHome1.children[0]); var theOwner = document.querySelector("#watch7-user-header"); var newHome2 = document.querySelector('#watch9-owner .owner-inner'); newHome2.insertBefore(theOwner, newHome2.children[0]); var theExtras = document.querySelector("#watch-description-extras"); var newHome3 = document.querySelector('.watch9-category'); newHome3.insertBefore(theExtras, newHome3.children[0]); var theLtod = document.querySelector("#watch7-sentiment-actions"); var newHome4 = document.querySelector('#ltod'); newHome4.insertBefore(theLtod, newHome4.children[0]); if (document.querySelector("#watch9-owner .owner-inner") != null) { var ownerHTML = document.querySelector("#watch9-owner .owner-inner").innerHTML; document.querySelector("#watch9-owner-slider .slider-inner").innerHTML = ownerHTML; } var creator = document.querySelector("#creator.sidebar-item"); var videoInfo = document.querySelector("#video-info.sidebar-item"); var description = document.querySelector("#description.sidebar-item"); var addTo = document.querySelector("#add-to.sidebar-item"); var share = document.querySelector("#share.sidebar-item"); var stats = document.querySelector("#stats.sidebar-item"); var transcript = document.querySelector("#transcript.sidebar-item"); var moreActions = document.querySelector("#more-actions.sidebar-item"); var showMore = document.querySelector("#watch9-info .watch9-expand"); var showLess = document.querySelector("#watch9-description .watch9-expand"); var showLess2 = document.querySelector("#watch9-info #collapse"); var addToBtn = document.querySelector(".addto-button"); var showScroller = document.querySelector(".owner-videos-scroller button"); var showScroller2 = document.querySelector("#watch9-owner .owner-videos-scroller button"); var infoHeight = $("#watch9-info.slider").offsetHeight; var descHeight = $(".description-inner").offsetHeight; descHeight = descHeight + 60; $("#watch9-slider").setAttribute("desc-height",descHeight); creator.addEventListener("click", function() { creatorClicked(); }); videoInfo.addEventListener("click", function() { if ($("#watch9-slider[desc-is-long]")) { $("#watch9-slider[desc-is-long]").removeAttribute("desc-is-long"); } vidInfoClicked(); }); description.addEventListener("click", function() { descClicked(); }); showMore.addEventListener("click", function() { if (STS.expWatch9TrueExpander == true) { expand(); } else { descClicked(); } }); showLess.addEventListener("click", function() { if ($("#watch9-slider[desc-is-long]")) { $("#watch9-slider[desc-is-long]").removeAttribute("desc-is-long"); } vidInfoClicked(); }); showLess2.addEventListener("click", function() { collapse(); }); function creatorClicked() { document.querySelector("#watch9-slider").setAttribute("state", "creator"); document.querySelector(".watch9").setAttribute("state", "creator"); document.querySelector(".sidebar-item.active").classList.remove("active"); document.querySelector("#creator.sidebar-item").classList.add("active"); setTimeout(checkIfShowOwner, 10); } function vidInfoClicked() { document.querySelector("#watch9-slider").setAttribute("state", "video-info"); document.querySelector(".watch9").setAttribute("state", "video-info"); document.querySelector(".sidebar-item.active").classList.remove("active"); document.querySelector("#video-info.sidebar-item").classList.add("active"); setTimeout(checkIfShowOwner, 10); } function expand() { document.querySelector("#watch9-slider").setAttribute("state", "video-info"); document.querySelector(".watch9").setAttribute("state", "video-info"); document.querySelector(".sidebar-item.active").classList.remove("active"); document.querySelector("#video-info.sidebar-item").classList.add("active"); $("#watch9-slider").setAttribute("description-expanded",""); setTimeout(checkIfShowOwner, 10); } function collapse() { document.querySelector("#watch9-slider").setAttribute("state", "video-info"); document.querySelector(".watch9").setAttribute("state", "video-info"); document.querySelector(".sidebar-item.active").classList.remove("active"); document.querySelector("#video-info.sidebar-item").classList.add("active"); $("#watch9-slider").removeAttribute("description-expanded"); setTimeout(checkIfShowOwner, 10); } function descClicked() { $("#watch9-slider").setAttribute("desc-is-long",""); document.querySelector("#watch9-slider").setAttribute("state", "description"); document.querySelector(".watch9").setAttribute("state", "description"); document.querySelector(".sidebar-item.active").classList.remove("active"); document.querySelector("#description.sidebar-item").classList.add("active"); setTimeout(checkIfShowOwner, 10); if ($("#startubestyle1") == null) { var container = $("#alt-watch9-container"); var newElem = document.createElement("style"); newElem.setAttribute("id", "startubestyle1"); newElem.innerHTML = ` [exp-vertical-watch9] [state="description"][desc-is-long] #watch9-description, [exp-vertical-watch9] [state="description"][desc-is-long] .slider-container-inner { min-height: ${descHeight}px !important; max-height: ${descHeight}px !important; height: ${descHeight}px !important; } [exp-vertical-watch9] [state="description"][desc-is-long] .slider-container-inner { transform: translateY(-${infoHeight}px) !important; } ` container.insertBefore(newElem, container.children[0]); } setTimeout(function() { $("#watch9-slider").setAttribute("desc-is-long",""); // $(".slider-container-inner").style.transform = "translateY(-" + infoHeight + "px)"; /* $(".slider-container-inner").style.height = descHeight + "px"; $(".slider-container-inner").style.minHeight = descHeight + "px"; $(".slider-container-inner").style.maxHeight = descHeight + "px"; $("#watch9-description").style.height = descHeight + "px"; $("#watch9-description").style.minHeight = descHeight + "px"; $("#watch9-description").style.maxHeight = descHeight + "px";*/ }, 500); } addTo.addEventListener("click", function() { setTimeout(function() { if ($("#watch9-slider[desc-is-long]")) { $("#watch9-slider[desc-is-long]").removeAttribute("desc-is-long"); } }, 500); document.querySelector("#watch9-slider").setAttribute("state", "add-to"); document.querySelector(".watch9").setAttribute("state", "add-to"); document.querySelector(".sidebar-item.active").classList.remove("active"); document.querySelector("#add-to.sidebar-item").classList.add("active"); setTimeout(checkIfShowOwner, 10); }); share.addEventListener("click", function() { setTimeout(function() { if ($("#watch9-slider[desc-is-long]")) { $("#watch9-slider[desc-is-long]").removeAttribute("desc-is-long"); } }, 500); document.querySelector("#watch9-slider").setAttribute("state", "share"); document.querySelector(".watch9").setAttribute("state", "share"); document.querySelector(".sidebar-item.active").classList.remove("active"); document.querySelector("#share.sidebar-item").classList.add("active"); setTimeout(checkIfShowOwner, 10); }); stats.addEventListener("click", function() { setTimeout(function() { if ($("#watch9-slider[desc-is-long]")) { $("#watch9-slider[desc-is-long]").removeAttribute("desc-is-long"); } }, 500); document.querySelector("#watch9-slider").setAttribute("state", "stats"); document.querySelector(".watch9").setAttribute("state", "stats"); document.querySelector(".sidebar-item.active").classList.remove("active"); document.querySelector("#stats.sidebar-item").classList.add("active"); setTimeout(checkIfShowOwner, 10); }); transcript.addEventListener("click", function() { setTimeout(function() { if ($("#watch9-slider[desc-is-long]")) { $("#watch9-slider[desc-is-long]").removeAttribute("desc-is-long"); } }, 500); document.querySelector("#watch9-slider").setAttribute("state", "transcript"); document.querySelector(".watch9").setAttribute("state", "transcript"); document.querySelector(".sidebar-item.active").classList.remove("active"); document.querySelector("#transcript.sidebar-item").classList.add("active"); setTimeout(checkIfShowOwner, 10); }); moreActions.addEventListener("click", function() { setTimeout(function() { if ($("#watch9-slider[desc-is-long]")) { $("#watch9-slider[desc-is-long]").removeAttribute("desc-is-long"); } }, 500); document.querySelector("#watch9-slider").setAttribute("state", "more-actions"); document.querySelector(".watch9").setAttribute("state", "more-actions"); document.querySelector(".sidebar-item.active").classList.remove("active"); document.querySelector("#more-actions.sidebar-item").classList.add("active"); setTimeout(checkIfShowOwner, 10); }); showScroller.addEventListener("click", function() { if (document.querySelector(".watch9[scroller-visible='false']") != null) { document.querySelector(".watch9").setAttribute("scroller-visible", "true"); } else { document.querySelector(".watch9").setAttribute("scroller-visible", "false"); } }); showScroller2.addEventListener("click", function() { if (document.querySelector(".watch9[scroller-visible='false']") != null) { document.querySelector(".watch9").setAttribute("scroller-visible", "true"); } else { document.querySelector(".watch9").setAttribute("scroller-visible", "false"); } }); setTimeout(checkIfShowOwner, 200); window.addEventListener("resize", checkIfShowOwner); function checkIfShowOwner() { setTimeout(check, 200); function check() { if (document.querySelector(".watch video") != null) { var playerHeight = document.querySelector("video").style.height; if (STS.expWatch9NoOwner == false) { if (playerHeight == "360px") { document.querySelector(".section-items.watch9").setAttribute("show-owner", "false"); } else { document.querySelector(".section-items.watch9").setAttribute("show-owner", "true"); if (document.querySelector("#creator.sidebar-item.active") != null) { vidInfoClicked(); } } } else { document.querySelector(".section-items.watch9").setAttribute("show-owner", "false"); } } if ( document.querySelector(".appbar-flexwatch-mini") == null && $(".section-items.watch9") ) { document.querySelector(".section-items.watch9").setAttribute("show-owner", "false"); } } } if (STS.expWatch9NoOwner == false) { requestData(); } function requestData() { const location = window.location; var vidLink = location.href; var cutString1 = vidLink.split('v='); var vidLink2 = cutString1[1]; if (vidLink2.includes('&')) { var cutString2 = vidLink2.split('&'); var vidId = cutString2[0]; } else { var vidId = vidLink2; } setTimeout(doData, 1); function doData() { fetch("https://www.youtube.com/youtubei/v1/next?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8", { "headers": { "accept": "application/json, text/plain, /", "accept-language": "en-US,en;q=0.9", "Content-type": "application/json", "sec-ch-ua-mobile": "?0", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "x-goog-authuser": "0", "x-origin": "https://www.youtube.com/" }, "referrer": "https://www.youtube.com/", "referrerPolicy": "strict-origin-when-cross-origin", "body": JSON.stringify({ "context": { "client": { "clientName": "WEB", "clientVersion": "2.20230301.00.00", "hl": "en", "gl": "US" } }, "videoId": vidId }), "method": "POST", "mode": "cors", "credentials": "include" }).then(response => response.json()).then(data => { var dataFromAPI = data; doChannelDataPrep(); function doChannelDataPrep() { if (dataFromAPI.contents.twoColumnWatchNextResults.results.results.contents[0].videoPrimaryInfoRenderer != null) { var channelUrl = dataFromAPI.contents.twoColumnWatchNextResults.results.results.contents[1].videoSecondaryInfoRenderer.owner.videoOwnerRenderer.navigationEndpoint.browseEndpoint.browseId; } else if (dataFromAPI.contents.twoColumnWatchNextResults.results.results.contents[1].videoPrimaryInfoRenderer != null) { var channelUrl = dataFromAPI.contents.twoColumnWatchNextResults.results.results.contents[2].videoSecondaryInfoRenderer.owner.videoOwnerRenderer.navigationEndpoint.browseEndpoint.browseId; } setTimeout(doChannelData, 1); function doChannelData() { fetch("https://www.youtube.com/youtubei/v1/browse?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8", { "headers": { "accept": "application/json, text/plain, /", "accept-language": "en-US,en;q=0.9", "Content-type": "application/json", "sec-ch-ua-mobile": "?0", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "x-goog-authuser": "0", "x-origin": "https://www.youtube.com/" }, "referrer": "https://www.youtube.com/", "referrerPolicy": "strict-origin-when-cross-origin", "body": JSON.stringify({ "context": { "client": { "clientName": "WEB", "clientVersion": "2.20230301.00.00", "hl": "en", "gl": "US" } }, "browseId": channelUrl, "params": "EgZ2aWRlb3PyBgQKAjoA" }), "method": "POST", "mode": "cors", "credentials": "include" }).then(response => response.json()).then(data => { var dataFromAPI2 = data; //console.log(dataFromAPI2); if (dataFromAPI2.header != null) { if (dataFromAPI2.header.c4TabbedHeaderRenderer != null) { if (dataFromAPI2.header.c4TabbedHeaderRenderer.videosCountText != null) { var videoCount = dataFromAPI2.header.c4TabbedHeaderRenderer.videosCountText.runs[0].text; //console.log(videoCount); if (dataFromAPI2.header.c4TabbedHeaderRenderer.videosCountText.runs[1] != null) { var videoCountString = dataFromAPI2.header.c4TabbedHeaderRenderer.videosCountText.runs[1].text; document.querySelector(".owner-videos-scroller button span").textContent = videoCount + videoCountString; document.querySelector("#watch9-owner .owner-videos-scroller button span").textContent = videoCount + videoCountString; } else { document.querySelector(".owner-videos-scroller button span").textContent = videoCount; document.querySelector("#watch9-owner .owner-videos-scroller button span").textContent = videoCount; } if (document.querySelector(".owner-videos-scroller button[disabled]") != null) { document.querySelector(".owner-videos-scroller button").removeAttribute("disabled"); document.querySelector("#watch9-owner .owner-videos-scroller button").removeAttribute("disabled"); } } else { document.querySelector(".owner-videos-scroller button span").textContent = "No videos"; document.querySelector(".owner-videos-scroller button").setAttribute("disabled", ""); document.querySelector("#watch9-owner .owner-videos-scroller button span").textContent = "No videos"; document.querySelector("#watch9-owner .owner-videos-scroller button").setAttribute("disabled", ""); } var newChannelLink = dataFromAPI2.header.c4TabbedHeaderRenderer.channelId; if (dataFromAPI2.contents.twoColumnBrowseResultsRenderer.tabs[1] != null) { if (dataFromAPI2.contents.twoColumnBrowseResultsRenderer.tabs[1].tabRenderer.content != null) { var richGrid = dataFromAPI2.contents.twoColumnBrowseResultsRenderer.tabs[1].tabRenderer.content.richGridRenderer; var richItemNo = 0; richGridGet(); function richGridGet() { if (richGrid.contents[richItemNo].richItemRenderer != null) { var richItem = richGrid.contents[richItemNo].richItemRenderer.content.videoRenderer; var itemTitle = richItem.title.runs[0].text; var itemThumbnail = richItem.thumbnail.thumbnails[0].url; var itemLink = richItem.videoId; let container = document.querySelector('.scroller-inner'); var newElem = document.createElement("a"); newElem.classList.add("st-super-compact-video"); newElem.classList.add("spf-link"); newElem.innerHTML = `
    ???,??? views
    `; container.insertBefore(newElem, container.children[richItemNo]); let container2 = document.querySelector('#watch9-owner .scroller-inner'); var newElem2 = document.createElement("a"); newElem2.classList.add("st-super-compact-video"); newElem2.classList.add("spf-link"); newElem2.innerHTML = `
    ???,??? views
    `; container2.insertBefore(newElem2, container2.children[richItemNo]); var w9o = document.querySelector("#watch9-owner"); var w9os = document.querySelector("#watch9-owner-slider"); var theSCVid = w9o.querySelectorAll(".st-super-compact-video")[richItemNo]; theSCVid.querySelector(".title span").textContent = itemTitle; theSCVid.querySelector("img").src = itemThumbnail; theSCVid.setAttribute("href", "/watch?v=" + itemLink); theSCVid = w9os.querySelectorAll(".st-super-compact-video")[richItemNo]; theSCVid.querySelector(".title span").textContent = itemTitle; theSCVid.querySelector("img").src = itemThumbnail; theSCVid.setAttribute("href", "/watch?v=" + itemLink); richItemNo++; richGridGet(); } else { //console.log("All available rich items gotten."); } } } else { document.querySelector(".owner-videos-scroller button span").textContent = "No videos"; document.querySelector(".owner-videos-scroller button").setAttribute("disabled", ""); document.querySelector("#watch9-owner .owner-videos-scroller button span").textContent = "No videos"; document.querySelector("#watch9-owner .owner-videos-scroller button").setAttribute("disabled", ""); } } else { document.querySelector(".owner-videos-scroller button span").textContent = "No videos"; document.querySelector(".owner-videos-scroller button").setAttribute("disabled", ""); document.querySelector("#watch9-owner .owner-videos-scroller button span").textContent = "No videos"; document.querySelector("#watch9-owner .owner-videos-scroller button").setAttribute("disabled", ""); } } } else { document.querySelector(".owner-videos-scroller button span").textContent = "No videos"; document.querySelector(".owner-videos-scroller button").setAttribute("disabled", ""); document.querySelector("#watch9-owner .owner-videos-scroller button span").textContent = "No videos"; document.querySelector("#watch9-owner .owner-videos-scroller button").setAttribute("disabled", ""); } }); } } }); } } } } }); } function createWatch5(number, version) { let container = document.querySelector('#watch7-content.watch-content'); var newElem = document.createElement("div"); newElem.id = "watch5-container"; newElem.innerHTML = `
    Uploaded by ???? on ??? ??, ???? by ????
    `; container.insertBefore(newElem, container.children[number]); let container2 = document.querySelector('.watch'); var newElem2 = document.createElement("div"); newElem2.id = "watch5-above-container"; newElem2.innerHTML = `
    `; container2.insertBefore(newElem2, container2.children[0]); var elm = ".watch5"; waitForElement500(elm).then(function(elm) { if (canGo != false) { document.querySelectorAll("#videos-dd-pagination button").forEach(i => { i.addEventListener("click",function(){ let page = i.getAttribute("page"); let maxPages = $("#watch5-videos-dd").getAttribute("max-pages"); $("#watch5-videos-dd").setAttribute("page",page); $("#videos-dd-pagination .yt-uix-button-toggled").classList.remove("yt-uix-button-toggled"); i.classList.add("yt-uix-button-toggled"); if (page == maxPages) { $("#videos-dd-next").setAttribute("disabled",""); } else if ($("#videos-dd-next[disabled]")) { $("#videos-dd-next").removeAttribute("disabled"); } if (page == 1) { $("#videos-dd-prev").setAttribute("disabled",""); } else if ($("#videos-dd-prev[disabled]")) { $("#videos-dd-prev").removeAttribute("disabled"); } }); }); $("#videos-dd-next").addEventListener("click",function(){ if ($("#videos-dd-next[disabled]") == null) { let page = $("#watch5-videos-dd").getAttribute("page"); let maxPages = $("#watch5-videos-dd").getAttribute("max-pages"); page++; $("#watch5-videos-dd").setAttribute("page",page); if (page == maxPages) { $("#videos-dd-next").setAttribute("disabled",""); } if ($("#videos-dd-prev[disabled]")) { $("#videos-dd-prev").removeAttribute("disabled"); } $("#videos-dd-pagination .yt-uix-button-toggled").classList.remove("yt-uix-button-toggled"); document.querySelector("#videos-dd-pagination [page='" + page + "']").classList.add("yt-uix-button-toggled"); } }); $("#videos-dd-prev").addEventListener("click",function(){ if ($("#videos-dd-prev[disabled]") == null) { let page = $("#watch5-videos-dd").getAttribute("page"); page--; $("#watch5-videos-dd").setAttribute("page",page); if ($("#videos-dd-next[disabled]")) { $("#videos-dd-next").removeAttribute("disabled"); } if (page == 1) { $("#videos-dd-prev").setAttribute("disabled",""); } $("#videos-dd-pagination .yt-uix-button-toggled").classList.remove("yt-uix-button-toggled"); document.querySelector("#videos-dd-pagination [page='" + page + "']").classList.add("yt-uix-button-toggled"); } }); $("#watch5-videos-dd-button").addEventListener("click",function(){ if ($("#watch5-videos-dd-button[disabled]") == null) { if ($("#watch5-videos-dd.hid")) { $("#watch5-videos-dd").classList.remove("hid"); $("#watch5-videos-dd-button").classList.add("yt-uix-button-toggled"); } else { $("#watch5-videos-dd").classList.add("hid"); $("#watch5-videos-dd-button").classList.remove("yt-uix-button-toggled"); } } }); if (document.querySelector("#watch5-addto #action-panel-addto") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(3)").click(); } if (document.querySelector("#watch5-addto #action-panel-addto") == null) { var elm = ".playlist-items"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var theAddToBtn = document.querySelector("#action-panel-addto"); var newHome = document.querySelector('#watch5-addto .watch5-panel-inner'); newHome.appendChild(theAddToBtn); } }); } if (document.querySelector("#watch5-share #action-panel-share") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(2)").click(); } if (document.querySelector("#watch5-container #action-panel-share") == null) { setTimeout(() => { var theSharePanel = document.querySelector("#action-panel-share"); var newHome5 = document.querySelector('#watch5-share .watch5-panel-inner'); newHome5.insertBefore(theSharePanel, newHome5.children[1]); }, "1000"); } if (document.querySelector("#watch5-stats #action-panel-stats") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(5)").click(); } if (document.querySelector("#watch5-stats #action-panel-stats") == null) { var elm = ".metric-label"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var theAddToBtn = document.querySelector("#action-panel-stats"); var newHome = document.querySelector('#watch5-stats .watch5-panel-inner'); newHome.appendChild(theAddToBtn); } }); } if (document.querySelector("#watch7-secondary-actions .hid.yt-uix-button:nth-child(4)") == null) { if (document.querySelector("#watch5-stats #action-panel-transcript") == null) { document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(4)").click(); } if (document.querySelector("#watch5-transcript #action-panel-transcript") == null) { var elm = ".watch-transcript"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var theAddToBtn = document.querySelector("#action-panel-transcript"); var newHome = document.querySelector('#watch5-transcript .watch5-panel-inner'); newHome.appendChild(theAddToBtn); } }); } } else { document.querySelector("#watch5-transcript-button").classList.add("hid"); $(".watch5").setAttribute("no-transcript",""); } if (document.querySelector("#watch7-views-info") != null) { var viewCount = document.querySelector("#watch7-views-info .watch-view-count").textContent; document.querySelector("#watch5-views .watch-view-count").textContent = viewCount; } if (document.querySelector("#watch-uploader-info") != null) { var uploadDateRaw = document.querySelector("#watch-uploader-info").textContent; let notNeedNewString = uploadDateRaw.includes("Published"); if (notNeedNewString == true) { var cutString = uploadDateRaw.split('on '); var uploadDate = cutString[1]; document.querySelector("#first-part").style.display = "inline"; document.querySelector("#third-part").style.display = "none"; } else { var uploadDate = uploadDateRaw; document.querySelector("#first-part").style.display = "none"; document.querySelector("#third-part").style.display = "inline"; } document.querySelector("#watch5-upload-date .upload-date").textContent = uploadDate; } if (document.querySelector(".yt-user-name") != null) { var authorElem = document.querySelector("#watch7-user-header .yt-user-name"); var authorName = authorElem.textContent; var authorLink = document.querySelector(".yt-user-photo").getAttribute("href"); //var authorPfp = document.querySelector(".yt-user-photo img").getAttribute("data-thumb"); document.querySelector(".author-link").textContent = authorName; document.querySelector(".author-link").setAttribute("href", authorLink); document.querySelector("#third-part .author-link").textContent = authorName; document.querySelector("#third-part .author-link").setAttribute("href", authorLink); authorElem.classList.add("yt-uix-tooltip"); authorElem.setAttribute("data-tooltip-text", "View " + authorName + "'s channel"); } var theViewsInfo = document.querySelector("#watch7-views-info"); var newHome0 = document.querySelector("#watch5-views-info"); newHome0.insertBefore(theViewsInfo, newHome0.children[0]); var music = document.querySelector("#watch-headline-title"); var newHome1 = document.querySelector('#watch5-title'); newHome1.insertBefore(music, newHome1.children[0]); var theOwner = document.querySelector("#watch7-user-header"); var newHome2 = document.querySelector('#watch5-owner'); newHome2.insertBefore(theOwner, newHome2.children[0]); var theSub = document.querySelector("#watch7-subscription-container"); var newHome23 = document.querySelector('#watch5-owner'); newHome23.insertBefore(theSub, newHome23.children[1]); var theExtras = document.querySelector("#watch-description"); var newHome3 = document.querySelector('#watch5-description'); newHome3.insertBefore(theExtras, newHome3.children[0]); var theLtod = document.querySelector("#watch7-sentiment-actions"); var newHome4 = document.querySelector('#ltod'); newHome4.insertBefore(theLtod, newHome4.children[0]); var addTo = document.querySelector("#watch5-addto-button"); var share = document.querySelector("#watch5-share-button"); var stats = document.querySelector("#watch5-stats-button"); var transcript = document.querySelector("#watch5-transcript-button"); addTo.addEventListener("click", function() { if ($(".watch5[state='add-to']")) { document.querySelector("#watch5-container .watch5").setAttribute("state", "none"); if ($("#watch5-other-actions .yt-uix-button-toggled")) { document.querySelector("#watch5-other-actions .yt-uix-button-toggled").classList.remove("yt-uix-button-toggled"); } else if ($("#watch5-stats-button.yt-uix-button-toggled")) { document.querySelector("#watch5-stats-button").classList.remove("yt-uix-button-toggled"); } } else { document.querySelector("#watch5-container .watch5").setAttribute("state", "add-to"); if ($("#watch5-other-actions .yt-uix-button-toggled")) { document.querySelector("#watch5-other-actions .yt-uix-button-toggled").classList.remove("yt-uix-button-toggled"); } else if ($("#watch5-stats-button.yt-uix-button-toggled")) { document.querySelector("#watch5-stats-button").classList.remove("yt-uix-button-toggled"); } document.querySelector("#watch5-addto-button").classList.add("yt-uix-button-toggled"); } }); share.addEventListener("click", function() { if ($(".watch5[state='share']")) { document.querySelector("#watch5-container .watch5").setAttribute("state", "none"); if ($("#watch5-other-actions .yt-uix-button-toggled")) { document.querySelector("#watch5-other-actions .yt-uix-button-toggled").classList.remove("yt-uix-button-toggled"); } else if ($("#watch5-stats-button.yt-uix-button-toggled")) { document.querySelector("#watch5-stats-button").classList.remove("yt-uix-button-toggled"); } } else { document.querySelector("#watch5-container .watch5").setAttribute("state", "share"); if ($("#watch5-other-actions .yt-uix-button-toggled")) { document.querySelector("#watch5-other-actions .yt-uix-button-toggled").classList.remove("yt-uix-button-toggled"); } else if ($("#watch5-stats-button.yt-uix-button-toggled")) { document.querySelector("#watch5-stats-button").classList.remove("yt-uix-button-toggled"); } document.querySelector("#watch5-share-button").classList.add("yt-uix-button-toggled"); } }); stats.addEventListener("click", function() { if ($(".watch5[state='stats']")) { document.querySelector("#watch5-container .watch5").setAttribute("state", "none"); if ($("#watch5-other-actions .yt-uix-button-toggled")) { document.querySelector("#watch5-other-actions .yt-uix-button-toggled").classList.remove("yt-uix-button-toggled"); } else if ($("#watch5-stats-button.yt-uix-button-toggled")) { document.querySelector("#watch5-stats-button").classList.remove("yt-uix-button-toggled"); } } else { document.querySelector("#watch5-container .watch5").setAttribute("state", "stats"); if ($("#watch5-other-actions .yt-uix-button-toggled")) { document.querySelector("#watch5-other-actions .yt-uix-button-toggled").classList.remove("yt-uix-button-toggled"); } else if ($("#watch5-stats-button.yt-uix-button-toggled")) { document.querySelector("#watch5-stats-button").classList.remove("yt-uix-button-toggled"); } document.querySelector("#watch5-stats-button").classList.add("yt-uix-button-toggled"); } }); transcript.addEventListener("click", function() { if ($(".watch5[state='transcript']")) { document.querySelector("#watch5-container .watch5").setAttribute("state", "none"); if ($("#watch5-other-actions .yt-uix-button-toggled")) { document.querySelector("#watch5-other-actions .yt-uix-button-toggled").classList.remove("yt-uix-button-toggled"); } else if ($("#watch5-stats-button.yt-uix-button-toggled")) { document.querySelector("#watch5-stats-button").classList.remove("yt-uix-button-toggled"); } } else { document.querySelector("#watch5-container .watch5").setAttribute("state", "transcript"); if ($("#watch5-other-actions .yt-uix-button-toggled")) { document.querySelector("#watch5-other-actions .yt-uix-button-toggled").classList.remove("yt-uix-button-toggled"); } else if ($("#watch5-stats-button.yt-uix-button-toggled")) { document.querySelector("#watch5-stats-button").classList.remove("yt-uix-button-toggled"); } document.querySelector("#watch5-transcript-button").classList.add("yt-uix-button-toggled"); } }); let container3 = document.querySelector('#watch-description-toggle'); var newElem3 = document.createElement("div"); newElem3.id = "watch5-horizontal-rule"; newElem3.innerHTML = `
    `; container3.insertBefore(newElem3, container3.children[0]); var elm = "#watch7-sidebar"; waitForElement10(elm).then(function(elm) { if (canGo != false) { let container4 = document.querySelector("#watch7-sidebar"); var newElem4 = document.createElement("div"); newElem4.id = "sidebar-panda-rules"; newElem4.innerHTML = ` `; container4.insertBefore(newElem4, container4.children[0]); } }); } }); } function createRelatedTabs(number) { if (document.querySelector("#related-tabs") != null) { document.querySelector("#related-tabs").remove(); } let container = document.querySelector('#watch7-sidebar-contents'); let newElem = document.createElement("div"); newElem.setAttribute("id", "related-tabs"); newElem.classList.add("watch-sidebar-section"); newElem.classList.add("new"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[number]); document.querySelector("#watch7-sidebar").setAttribute("state", "related"); if (STS.expRelatedTabsHoldsSubscribe == true) { var elm = "#watch7-subscription-container"; waitForElement10(elm).then(function(elm) { if (canGo != false) { var elem = document.querySelector("#watch7-subscription-container"); var newHome = document.querySelector('.related-user-lower'); newHome.appendChild(elem); } }); } var theHref = document.querySelector("#watch7-user-header .yt-user-name").getAttribute("href"); var cutString1 = theHref.split('l/'); theHref = cutString1[1]; fetch("https://www.youtube.com/youtubei/v1/browse?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8", { "headers": { "accept": "application/json, text/plain, /", "accept-language": "en-US,en;q=0.9", "Content-type": "application/json", "sec-ch-ua-mobile": "?0", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "x-goog-authuser": "0", "x-origin": "https://www.youtube.com/" }, "referrer": "https://www.youtube.com/", "referrerPolicy": "strict-origin-when-cross-origin", "body": JSON.stringify({ "context": { "client": { "clientName": "WEB", "clientVersion": "2.20230301.00.00", "hl": "en", "gl": "US" } }, "browseId": theHref, "params": "EgZ2aWRlb3PyBgQKAjoA" }), "method": "POST", "credentials": "include" }).then(response => response.json()).then(data => { //console.log(data); if (data.header.c4TabbedHeaderRenderer) { if (data.header.c4TabbedHeaderRenderer.banner != null) { var banner = data.header.c4TabbedHeaderRenderer.banner.thumbnails[0].url; document.querySelector(".related-banner-bg img").src = banner; } else if (data.header.c4TabbedHeaderRenderer.banner == null) { document.querySelector(".related-banner").style.background = "url(https://s.ytimg.com/yts/img/channels/c4/default_banner-vfl7DRgTn.png)"; } var pfp = data.header.c4TabbedHeaderRenderer.avatar.thumbnails[2].url; //var name = data.header.c4TabbedHeaderRendereeeeer.title; var name = data.header.c4TabbedHeaderRenderer.title; } else if (data.header.pageHeaderRenderer) { if (data.header.pageHeaderRenderer.content.pageHeaderViewModel.banner != null) { var banner = data.header.pageHeaderRenderer.content.pageHeaderViewModel.banner.imageBannerViewModel.image.sources[0].url; document.querySelector(".related-banner-bg img").src = banner; } else if (data.header.pageHeaderRenderer.content.pageHeaderViewModel.banner == null) { document.querySelector(".related-banner").style.background = "url(https://s.ytimg.com/yts/img/channels/c4/default_banner-vfl7DRgTn.png)"; } var pfp = data.header.pageHeaderRenderer.content.pageHeaderViewModel.image.decoratedAvatarViewModel.avatar.avatarViewModel.image.sources[0].url; //var name = data.header.c4TabbedHeaderRendereeeeer.title; var name = data.header.pageHeaderRenderer.pageTitle; } var videoCount = document.querySelector(".yt-user-videos").textContent; var link = document.querySelector(".yt-user-name").getAttribute("href"); var link2 = document.querySelector(".yt-user-videos").getAttribute("href"); document.querySelector(".related-banner-pfp img").src = pfp; document.querySelector(".related-user .channel-name span").textContent = name; document.querySelector(".related-user .channel-video-count span").textContent = videoCount; document.querySelector(".related-user .channel-name").setAttribute("href", link); document.querySelector(".related-banner-pfp").setAttribute("href", link); document.querySelector(".related-user .channel-video-count").setAttribute("href", link2); document.querySelector("#related-channel-about-name").textContent = "About " + name; createChannelVideos(data); createChannelAbout(data); document.querySelector("#related-related").addEventListener("click", function() { document.querySelector("#watch7-sidebar").setAttribute("state", "related"); document.querySelector(".related-tab[active]").removeAttribute("active"); document.querySelector("#related-related").setAttribute("active", ""); }); document.querySelector("#related-channel-videos").addEventListener("click", function() { document.querySelector("#watch7-sidebar").setAttribute("state", "channel-videos"); document.querySelector(".related-tab[active]").removeAttribute("active"); document.querySelector("#related-channel-videos").setAttribute("active", ""); }); document.querySelector("#related-channel-about").addEventListener("click", function() { document.querySelector("#watch7-sidebar").setAttribute("state", "channel-about"); document.querySelector(".related-tab[active]").removeAttribute("active"); document.querySelector("#related-channel-about").setAttribute("active", ""); }); }); } function createChannelVideos(data) { let container = document.querySelector('#watch7-sidebar-contents'); let newElem = document.createElement("div"); newElem.setAttribute("id", "related-channel-videos-page"); newElem.classList.add("watch-sidebar-section"); newElem.classList.add("new"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[3]); $("#related-tabs-sort-btn").addEventListener("click",function(){ if ($("#related-tabs-filter-menu.hid")){ $("#related-tabs-filter-menu").classList.remove("hid"); $("#related-tabs-sort-fence").classList.remove("hid"); }else{ $("#related-tabs-filter-menu").classList.add("hid"); $("#related-tabs-sort-fence").classList.add("hid"); } }); $("#related-tabs-sort-fence").addEventListener("click",function(){ $("#related-tabs-filter-menu").classList.add("hid"); $("#related-tabs-sort-fence").classList.add("hid"); }); $("#related-tabs-newest").addEventListener("click",function(){ $("#watch-channel-videos").innerHTML = ``; $("#related-tabs-filter-menu").classList.add("hid"); $("#related-tabs-sort-fence").classList.add("hid"); $("#related-tabs-filter-menu").setAttribute("state","newest"); $("#related-tabs-sort-btn").setAttribute("state","newest"); fillVideoList("channelVideosList","videosTabCompactVideo"); }); $("#related-tabs-popular").addEventListener("click",function(){ $("#watch-channel-videos").innerHTML = ``; $("#related-tabs-filter-menu").classList.add("hid"); $("#related-tabs-sort-fence").classList.add("hid"); $("#related-tabs-filter-menu").setAttribute("state","popular"); $("#related-tabs-sort-btn").setAttribute("state","popular"); if (gdp.currWatchData.channelPopularList) { fillVideoList("channelPopularList","videosTabCompactVideo"); } else { $("#related-tabs-loading").classList.remove("hid"); EXFetch("none","double","browse","browseId",gdp.currWatchData.channelId,"params","EgZ2aWRlb3PyBgQKAjoA","continuation",gdp.currWatchData.popularToken).then(result => { if (result.onResponseReceivedActions) { let richGrid = result.onResponseReceivedActions[1].reloadContinuationItemsCommand.continuationItems; gdp.currWatchData.channelPopularList = richGrid; fillVideoList("channelPopularList","videosTabCompactVideo"); $("#related-tabs-loading").classList.add("hid"); } }); } }); $("#related-tabs-oldest").addEventListener("click",function(){ $("#watch-channel-videos").innerHTML = ``; $("#related-tabs-filter-menu").classList.add("hid"); $("#related-tabs-sort-fence").classList.add("hid"); $("#related-tabs-filter-menu").setAttribute("state","oldest"); $("#related-tabs-sort-btn").setAttribute("state","oldest"); if (gdp.currWatchData.channelOldestList) { fillVideoList("channelOldestList","videosTabCompactVideo"); } else { $("#related-tabs-loading").classList.remove("hid"); EXFetch("none","double","browse","browseId",gdp.currWatchData.channelId,"params","EgZ2aWRlb3PyBgQKAjoA","continuation",gdp.currWatchData.oldestToken).then(result => { if (result.onResponseReceivedActions) { let richGrid = result.onResponseReceivedActions[1].reloadContinuationItemsCommand.continuationItems; gdp.currWatchData.channelOldestList = richGrid; fillVideoList("channelOldestList","videosTabCompactVideo"); $("#related-tabs-loading").classList.add("hid"); } }); } }); //doChannelVidsTab("firstLoad", data, 0, 0, 0); } function doChannelVidsTab(purpose, data, apiItemNo, htmlItemNo, pageNo) { if (purpose == "firstLoad") { if (data.contents.twoColumnBrowseResultsRenderer.tabs[1] != null) { if (data.contents.twoColumnBrowseResultsRenderer.tabs[1].tabRenderer.content != null) { var itemContainer = data.contents.twoColumnBrowseResultsRenderer.tabs[1].tabRenderer.content.richGridRenderer.contents; if (itemContainer[apiItemNo] != null) { if (itemContainer[apiItemNo].richItemRenderer != null) { var item = itemContainer[apiItemNo].richItemRenderer.content; if (item.adSlotRenderer != null) { apiItemNo++; doChannelVidsTab(purpose, data, apiItemNo, htmlItemNo, pageNo); } else if (item.videoRenderer != null) { createCompactVideo(itemContainer, apiItemNo, htmlItemNo, pageNo); apiItemNo++; htmlItemNo++; doChannelVidsTab(purpose, data, apiItemNo, htmlItemNo, pageNo); } } else if (itemContainer[apiItemNo].continuationItemRenderer != null) { var token = itemContainer[apiItemNo].continuationItemRenderer.continuationEndpoint.continuationCommand.token; createLoadMoreButton(htmlItemNo, token); } else { apiItemNo++; doChannelVidsTab(purpose, data, apiItemNo, htmlItemNo, pageNo); } } else { //Done } } } } if (purpose == "continuation") { if (data.onResponseReceivedActions[0].appendContinuationItemsAction.continuationItems != null) { var itemContainer = data.onResponseReceivedActions[0].appendContinuationItemsAction.continuationItems; if (itemContainer[apiItemNo] != null) { if (itemContainer[apiItemNo].richItemRenderer != null) { var item = itemContainer[apiItemNo].richItemRenderer.content; if (item.adSlotRenderer != null) { apiItemNo++; doChannelVidsTab(purpose, data, apiItemNo, htmlItemNo, pageNo); } else if (item.videoRenderer != null) { createCompactVideo(itemContainer, apiItemNo, htmlItemNo, pageNo); apiItemNo++; htmlItemNo++; doChannelVidsTab(purpose, data, apiItemNo, htmlItemNo, pageNo); } } else if (itemContainer[apiItemNo].continuationItemRenderer != null) { var token = itemContainer[apiItemNo].continuationItemRenderer.continuationEndpoint.continuationCommand.token; createLoadMoreButton(htmlItemNo, token); } else { apiItemNo++; doChannelVidsTab(purpose, data, apiItemNo, htmlItemNo, pageNo); } } else { //Done } } } } function createLoadMoreButton(htmlItemNo, token) { var container = document.querySelector("#watch-channel-videos"); var newElem = document.createElement("span"); newElem.setAttribute("class", "continuation_item_wrapper"); newElem.innerHTML = ` `; container.insertBefore(newElem, container.children[htmlItemNo]); newElem.addEventListener("click", function() { newElem.querySelector(".loading").classList.remove("hid"); newElem.querySelector(".run").classList.add("hid"); newElem.querySelector("button").setAttribute("disabled", "True"); var theHref = document.querySelector("#watch7-user-header .yt-user-name").getAttribute("href"); var cutString1 = theHref.split('l/'); theHref = cutString1[1]; fetch("https://www.youtube.com/youtubei/v1/browse?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8", { "headers": { "accept": "application/json, text/plain, /", "accept-language": "en-US,en;q=0.9", "Content-type": "application/json", "sec-ch-ua-mobile": "?0", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "x-goog-authuser": "0", "x-origin": "https://www.youtube.com/" }, "referrer": "https://www.youtube.com/", "referrerPolicy": "strict-origin-when-cross-origin", "body": JSON.stringify({ "context": { "client": { "clientName": "WEB", "clientVersion": "2.20230301.00.00", "hl": "en", "gl": "US" } }, "browseId": theHref, "params": "EgZ2aWRlb3PyBgQKAjoA", "continuation": token }), "method": "POST", "credentials": "include" }).then(response => response.json()).then(data => { //console.log(data); doChannelVidsTab("continuation", data, 0, htmlItemNo, 0); newElem.remove(); } ); }); } function createCompactVideo(itemContainer, apiItemNo, htmlItemNo, pageNo) { var container = document.querySelector("#watch-channel-videos"); var newElem = document.createElement("li"); newElem.setAttribute("class", "video-list-item related-list-item"); newElem.setAttribute("unpopulated", ""); newElem.innerHTML = ` Thumbnail `; container.insertBefore(newElem, container.children[htmlItemNo]); var htmlElem = document.querySelector(".video-list-item[unpopulated]"); var apiElem = itemContainer[apiItemNo].richItemRenderer.content.videoRenderer; var navigationEndpoint = itemContainer[apiItemNo].richItemRenderer.content.videoRenderer.navigationEndpoint; htmlElem.querySelector("a").data = { abstractVorElement: { navigationEndpoint: navigationEndpoint } } if (apiElem.thumbnail.thumbnails[3] != null) { var vidThumbnail = apiElem.thumbnail.thumbnails[3].url; } else if (apiElem.thumbnail.thumbnails[2] != null) { var vidThumbnail = apiElem.thumbnail.thumbnails[2].url; } else if (apiElem.thumbnail.thumbnails[1] != null) { var vidThumbnail = apiElem.thumbnail.thumbnails[1].url; } else { var vidThumbnail = apiElem.thumbnail.thumbnails[0].url; } if (apiElem.lengthText != null) { var vidTime = apiElem.lengthText.simpleText; } else { var vidTime = ""; } if (apiElem.title.runs != null) { var vidTitle = apiElem.title.runs[0].text; } else { var vidTitle = apiElem.title.simpleText; } if (apiElem.publishedTimeText != null) { var vidDate = apiElem.publishedTimeText.simpleText; } else { var vidDate = ""; } if (apiElem.viewCountText.runs != null) { if (apiElem.viewCountText.runs[1] != null) { var vidViewCount = apiElem.viewCountText.runs[0].text; var vidViewCountExtension = apiElem.viewCountText.runs[1].text; htmlElem.querySelector(".view-count .view-count").textContent = vidViewCount + " " + vidViewCountExtension; } } else if (apiElem.viewCountText.runs == null) { var vidViewCount = apiElem.viewCountText.simpleText; htmlElem.querySelector(".view-count .view-count").textContent = vidViewCount; } var vidId = apiElem.videoId; htmlElem.querySelector(".yt-thumb-clip-inner img").src = vidThumbnail; htmlElem.querySelector(".title").textContent = vidTitle; htmlElem.querySelector(".title").setAttribute("title", vidTitle); htmlElem.querySelector("a").setAttribute("href", "/watch?v=" + vidId); htmlElem.querySelector(".video-time").textContent = vidTime; htmlElem.querySelector(".extra").textContent = vidDate; htmlElem.removeAttribute("unpopulated"); } function createChannelAbout(data) { if (data.header.c4TabbedHeaderRenderer) { var continuation = data.header.c4TabbedHeaderRenderer.tagline.channelTaglineRenderer.moreEndpoint.showEngagementPanelEndpoint.engagementPanel.engagementPanelSectionListRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer.contents[0].continuationItemRenderer.continuationEndpoint.continuationCommand.token; } else { var continuation = data.header.pageHeaderRenderer.content.pageHeaderViewModel.description.descriptionPreviewViewModel.rendererContext.commandContext.onTap.innertubeCommand.showEngagementPanelEndpoint.engagementPanel.engagementPanelSectionListRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer.contents[0].continuationItemRenderer.continuationEndpoint.continuationCommand.token; } let container = document.querySelector('#watch7-sidebar-contents'); let newElem = document.createElement("div"); newElem.setAttribute("id", "related-channel-about-page"); newElem.classList.add("watch-sidebar-section"); newElem.classList.add("new"); newElem.innerHTML = `

    About

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