// ==UserScript== // @name StarTube Beta // @namespace http://tampermonkey.net/ // @version 2.4.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; function getTranslateXY(element) { const style = window.getComputedStyle(element); const matrix = new DOMMatrixReadOnly(style.transform); return { translateX: matrix.m41, translateY: matrix.m42 } } 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 loadWithoutV3(){ window.location = document.URL + "?v3cv=0"; } 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); GM_registerMenuCommand("Load page without V3",loadWithoutV3); (function(){ 'use strict'; let isPopstate=false; var SRS = ""; let currStarVer = "2.4.0 Beta 1 Patch 1"; let currStarChan = "beta" let STUID="st2401b1"; let STDELAY=300; 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; let CWD; let headers; 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 == "nomodtv"){ //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.20241113.07.00", "hl": "en", "gl": "US" } }, [avar]: id }), "method": "POST", "mode": "cors", "credentials": "include" }).then(response => response.json()).then(data => { resolve(data); }); } else if(type == "nomod"){ //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.20241113.07.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.20241113.07.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.20241113.07.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.20241113.07.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 == "doubleLoggedIn2"){ //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.20241113.07.00", "hl": "en", "gl": "US" } }, "params": modContent, "target": { "videoId": mod2Content }, }), "method": "POST", "mode": "cors", "credentials": "include" }).then(response => response.json()).then(data => { resolve(data); }); } // } } }); } let usedLang="en"; var langEn={ upload:"Upload", create:"Create", search:"Search" } var lang={ en:{ upload:langEn.upload, create:langEn.create, search:langEn.search }, ja:{ upload:"アップロード", create:"作成する", search:"検索" } } var svgDefs={ upload:{ f:"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z", o:"M17,18v1H6V18ZM6.49,9l.71.71L11,5.91V16h1V5.91l3.8,3.81L16.51,9l-5-5Z" }, create:{ f:"M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4zM14 13h-3v3H9v-3H6v-2h3V8h2v3h3v2z", o:"M14 13h-3v3H9v-3H6v-2h3V8h2v3h3v2zm3-7H3v12h14v-6.39l4 1.83V8.56l-4 1.83V6m1-1v3.83L22 7v8l-4-1.83V19H2V5h16z", oa:"M18,8.83V5H2v14h16v-5.83L22,15V7L18,8.83z M14,13h-3v3H9v-3H6v-2h3V8h2v3h3V13z" }, share:{ f:"M14 9V5l7 7-7 7v-4.1c-5 0-8.5 1.6-11 5.1 1-5 4-10 11-11z", o:"M15,5.63L20.66,12L15,18.37V15v-1h-1c-3.96,0-7.14,1-9.75,3.09c1.84-4.07,5.11-6.4,9.89-7.1L15,9.86V9V5.63 M14,3v6 C6.22,10.13,3.11,15.33,2,21c2.78-3.97,6.44-6,12-6v6l8-9L14,3L14,3z" }, addTo:{ f:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z", o:"M20,12h-8v8h-1v-8H3v-1h8V3h1v8h8V12z" }, save:{ f:"M14 10H2v2h12v-2zm0-4H2v2h12V6zm4 8v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zM2 16h8v-2H2v2z", o:"M22,13h-4v4h-2v-4h-4v-2h4V7h2v4h4V13z M14,7H2v1h12V7z M2,12h8v-1H2V12z M2,16h8v-1H2V16z" }, more:{ o:"M7.5,12c0,0.83-0.67,1.5-1.5,1.5S4.5,12.83,4.5,12s0.67-1.5,1.5-1.5S7.5,11.17,7.5,12z M12,10.5c-0.83,0-1.5,0.67-1.5,1.5 s0.67,1.5,1.5,1.5s1.5-0.67,1.5-1.5S12.83,10.5,12,10.5z M18,10.5c-0.83,0-1.5,0.67-1.5,1.5s0.67,1.5,1.5,1.5s1.5-0.67,1.5-1.5 S18.83,10.5,18,10.5z" }, like:{ f:"M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-1.91l-.01-.01L23 10z", o:"M18.77,11h-4.23l1.52-4.94C16.38,5.03,15.54,4,14.38,4c-0.58,0-1.14,0.24-1.52,0.65L7,11H3v10h4h1h9.43 c1.06,0,1.98-0.67,2.19-1.61l1.34-6C21.23,12.15,20.18,11,18.77,11z M7,20H4v-8h3V20z M19.98,13.17l-1.34,6 C18.54,19.65,18.03,20,17.43,20H8v-8.61l5.6-6.06C13.79,5.12,14.08,5,14.38,5c0.26,0,0.5,0.11,0.63,0.3 c0.07,0.1,0.15,0.26,0.09,0.47l-1.52,4.94L13.18,12h1.35h4.23c0.41,0,0.8,0.17,1.03,0.46C19.92,12.61,20.05,12.86,19.98,13.17z", oa:"M3,11h3v10H3V11z M18.77,11h-4.23l1.52-4.94C16.38,5.03,15.54,4,14.38,4c-0.58,0-1.14,0.24-1.52,0.65L7,11v10h10.43 c1.06,0,1.98-0.67,2.19-1.61l1.34-6C21.23,12.15,20.18,11,18.77,11z" }, dislike:{ f:"M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v1.91l.01.01L1 14c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm4 0v12h4V3h-4z", o:"M17,4h-1H6.57C5.5,4,4.59,4.67,4.38,5.61l-1.34,6C2.77,12.85,3.82,14,5.23,14h4.23l-1.52,4.94C7.62,19.97,8.46,21,9.62,21 c0.58,0,1.14-0.24,1.52-0.65L17,14h4V4H17z M10.4,19.67C10.21,19.88,9.92,20,9.62,20c-0.26,0-0.5-0.11-0.63-0.3 c-0.07-0.1-0.15-0.26-0.09-0.47l1.52-4.94l0.4-1.29H9.46H5.23c-0.41,0-0.8-0.17-1.03-0.46c-0.12-0.15-0.25-0.4-0.18-0.72l1.34-6 C5.46,5.35,5.97,5,6.57,5H16v8.61L10.4,19.67z M20,13h-3V5h3V13z", oa:"M18,4h3v10h-3V4z M5.23,14h4.23l-1.52,4.94C7.62,19.97,8.46,21,9.62,21c0.58,0,1.14-0.24,1.52-0.65L17,14V4H6.57 C5.5,4,4.59,4.67,4.38,5.61l-1.34,6C2.77,12.85,3.82,14,5.23,14z" }, rChev:{ f:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z", o:"M9.4,18.4l-0.7-0.7l5.6-5.6L8.6,6.4l0.7-0.7l6.4,6.4L9.4,18.4z" }, lChev:{ f:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z", o:"M14.6,18.4L8.3,12l6.4-6.4l0.7,0.7L9.7,12l5.6,5.6L14.6,18.4z" }, x:{ f:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z", o:"M12.7,12l6.6,6.6l-0.7,0.7L12,12.7l-6.6,6.6l-0.7-0.7l6.6-6.6L4.6,5.4l0.7-0.7l6.6,6.6l6.6-6.6l0.7,0.7L12.7,12z" }, report:{ f:"M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z", o:"M13.18,4l0.24,1.2L13.58,6h0.82H19v7h-5.18l-0.24-1.2L13.42,11H12.6H6V4H13.18 M14,3H5v18h1v-9h6.6l0.4,2h7V5h-5.6L14,3 L14,3z" }, transcript:{ f:"M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM4 12h4v2H4v-2zm10 6H4v-2h10v2zm6 0h-4v-2h4v2zm0-4H10v-2h10v2z", o:"M5,11h2v2H5V11z M15,15H5v2h10V15z M19,15h-2v2h2V15z M19,11H9v2h10V11z M22,6H2v14h20V6z M3,7h18v12H3V7z" }, sub:{ o:"M10,9.35,15,12l-5,2.65ZM12,6a54.36,54.36,0,0,0-7.56.38A1.53,1.53,0,0,0,3.38,7.44,24.63,24.63,0,0,0,3,12a24.63,24.63,0,0,0,.38,4.56,1.53,1.53,0,0,0,1.06,1.06A54.36,54.36,0,0,0,12,18a54.36,54.36,0,0,0,7.56-.38,1.53,1.53,0,0,0,1.06-1.06A24.63,24.63,0,0,0,21,12a24.63,24.63,0,0,0-.38-4.56,1.53,1.53,0,0,0-1.06-1.06A54.36,54.36,0,0,0,12,6h0m0-1s6.25,0,7.81.42a2.51,2.51,0,0,1,1.77,1.77A25.87,25.87,0,0,1,22,12a25.87,25.87,0,0,1-.42,4.81,2.51,2.51,0,0,1-1.77,1.77C18.25,19,12,19,12,19s-6.25,0-7.81-.42a2.51,2.51,0,0,1-1.77-1.77A25.87,25.87,0,0,1,2,12a25.87,25.87,0,0,1,.42-4.81A2.51,2.51,0,0,1,4.19,5.42C5.75,5,12,5,12,5Z" }, subbed:{ f:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z", o:"M9,18.7l-5.4-5.4l0.7-0.7L9,17.3L20.6,5.6l0.7,0.7L9,18.7z" } } var STH0={ ST_OWNER:`
( )
`, ST_POLY_OWNER:`
`, SVG:`
`, SVG_TOG:`
`, } var STH={ aboveTitleRow:`
`, aboveOwnerRow:`
`, aboveVideosRow:`
`, ratingsInfoRow:`
Rate:
ratings
Your rating:
Views: views
`, watchTabsRow:`
Sit tight! Feature is coming soon™
`, belowTitleRow:`
`, descActionsRow:`
`, actionsInfoRow:`
`, infoActionsRow:`
`, ownerActionsRow:`
${STH0.ST_POLY_OWNER}
`, ownerRow:`
${STH0.ST_POLY_OWNER}
`, ownerTeaserRow:`
${STH0.ST_POLY_OWNER}
Comments
Add a comment...
${STH0.SVG}
`, ownerInfoRow:`
${STH0.ST_OWNER}
`, actionsRow:`
`, descTeaserRow:`
Comments
Add a comment...
`, descRow:`
Uploaded by on by
`, sliderRow:`
Uploaded by on by
Description
Add to playlist
Share this video
Video Statistics
Transcript
Report Video
${STH0.ST_OWNER}
See all
`, extrasRow:`
`, floatersRow:`
`, panelsRow:`
`, popupsRow:`
`, belowTabsRow:`
`, sideBannerRow:`
`, sideTitleRow:`
`, sideOwnerRow:`
${STH0.ST_OWNER}
`, sideDescRow:`
`, sideTabsRow:`
`, sidePanelsRow:`

Uploads

    About

    subscribers
    views
    videos

    Live Chat

    Comments
    Transcript
    ` }; var STH2={ ST_SVG:`
    ${STH0.SVG}
    `, ST_SVG_TOG:`
    ${STH0.SVG_TOG}
    `, STARDUST_BTN:` ` }; 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); if (STS !== null) { SRS = STS.radioSettings; } window.addEventListener("resize",getVideoSize); var defaultConfigs = { "newConfig": true, "configNoCast": true, "configAccountMenuV3SettingsButton": true, "configPolymerMenuV3SettingsButton": true, "configCreateMenuV3SettingsButton": true, "expAdaptiveLayout2017Cap": false, "expAdaptiveLayout2018Cap": false, "expAdaptiveLayout2022Cap": false, "expAdaptiveLayout2024HH": false, "polymerWarningBanner": true, "showWelcomeBanner": true, "expAlwaysShowCompactDate": true, "expNeverShowCompactDate": false, "expMoveGuideMainSectionToTop": false, "expMoreTooltips": true, "expWatch9NoOwner": true, "expWatch9TrueExpander": false, "expWatch9SidebarBus": false, "expWatch9StickyColumns": false, "expRelatedGrid": false, "expWatch8NoMore": false, "expMoveCountsToButtons": false, "expSharrow": false, "expGuideAlwaysPinned": false, "expWatch7AboutTabRename": false, "expWatch7AboutTabRename2": false, "expTwoColumnSearchResults": false, "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, "modernCards": false, "sbStyles":false, "sbCardPhysics":false, "expLightChannelBar": false, "expModernNotifIcon": false, "expModernTopbar": false, "expModernUpload": false, "expModernGuideButton": false, "expModernSearchIcon": false, "expModernTitle": false, "expModernGuide": false, "expModernHome": false, "expModernPlaylists": false, "expModernPlaylistThumbnails": false, "expPlaylistRedBorder": false, "expPlaylistTimestamps": true, "expTrueScrollableGuide": false, "materialSpinner": false, "expViewsString": true, "expGoogleApps": false, "expCommentsFullWidth": true, "expNoByText": false, "expAccountMenu": false, "expStaticSite": false, "expStaticSiteForcesSmallPlayer": true, "expHideAppbar": 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, "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, "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, "polymerGen2Comments": false, "simpleReply": false, "typographySpacing": false, "expPolymerSubscribe": false, "expPolymerGen2Subscribe": false, "expPolymerStyles": false, "expBetaPolymerStyles": false, "expPolymerChannels": false, "expColorfulChannels": false, "expPolymerComments": false, "expPolymerTooltips": false, "expTopbarShadow": false, "expMaterialSignIn": 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, "expRingo2Gradients": true, "favi24": false, "favi24O": false, "favi17": false, "favi15": false, "favi12": false, "favi10": false, "favi05": false, "STPresetsAlsoSetV3Settings": true, "show2point4": true, "expHideYoodles": false, "expFixedShareIcons": true, "expFixedXIcon": true, "expMaterialGbar": false, "ironSettings": {}, "inputSettings":{ favsPlaylist:{ name:"favsPlaylist", tValue:"", visValue:"" } }, "radioSettings":{ layoutMode:{ name:"layoutMode", tValue:"manual", visValue:"manual" }, layoutSelect:{ name:"layoutSelect", tValue:"hh2024", visValue:"hh2024" }, faviconSelect:{ name:"faviconSelect", tValue:"2024", visValue:"auto" }, gbarVersion:{ name:"gbarVersion", tValue:"off", visValue:"off" }, searchText:{ name:"searchText", tValue:"on", visValue:"auto" }, accountMenu:{ name:"accountMenu", tValue:"mhh", visValue:"auto" }, playerVersion:{ name:"playerVersion", tValue:"modernV2", visValue:"auto" }, playerSpinner:{ name:"playerSpinner", tValue:"classic", visValue:"auto" }, homeRedir:{ name:"homeRedir", tValue:"off", visValue:"auto" }, logoLink:{ name:"logoLink", tValue:"home", visValue:"auto" }, subsGrid:{ name:"subsGrid", tValue:"on", visValue:"auto" }, watchLayout:{ name:"watchLayout", tValue:"watch8", visValue:"auto" }, relatedTabs:{ name:"relatedTabs", tValue:"off", visValue:"auto" }, relatedGrid:{ name:"relatedGrid", tValue:"off", visValue:"off" }, relatedSize:{ name:"relatedSize", tValue:"large", visValue:"auto" }, compactDate:{ name:"compactDate", tValue:"on", visValue:"on" }, playerSizerules:{ name:"playerSizerules", tValue:"passive", visValue:"passive" }, guideNavToFeed:{ name:"guideNavToFeed", tValue:"off", visValue:"auto" }, guideAlwaysPinned:{ name:"guideAlwaysPinned", tValue:"off", visValue:"off" }, channelVersion:{ name:"channelVersion", tValue:"c4", visValue:"auto" }, colorfulChannels:{ name:"colorfulChannels", tValue:"off", visValue:"auto" }, outlineIcons:{ name:"outlineIcons", tValue:"off", visValue:"auto" }, newStructure2:"true" }, "importantInfo": { startubeVersion: currStarVer, startubeChannel: currStarChan } }; if(STS == null){ STS = defaultConfigs; }else{ try { STS = JSON.parse(STS); applyNewSettings(); } catch(err){ console.log(err); console.log("It looks like you had a bad config. Your settings have been reset."); STS = defaultConfigs; applySettings(); } } 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.show2point4 == null){ STS.show2point4 = true; } if(STS.radioSettings.newStructure2==null){ if(STS.newConfig==false){ STS.radioSettings={ layoutMode:{ name:"layoutMode", tValue:STS.radioSettings.layoutMode, visValue:STS.radioSettings.layoutMode }, layoutSelect:{ name:"layoutSelect", tValue:STS.radioSettings.layoutSelect, visValue:STS.radioSettings.layoutSelect }, faviconSelect:{ name:"faviconSelect", tValue:STS.radioSettings.faviconSelect, visValue:STS.radioSettings.faviconSelect }, gbarVersion:{ name:"gbarVersion", tValue:STS.radioSettings.gbarVersion, visValue:STS.radioSettings.gbarVersion }, accountMenu:{ name:"accountMenu", tValue:STS.radioSettings.accountMenu, visValue:STS.radioSettings.accountMenu }, playerVersion:{ name:"playerVersion", tValue:STS.radioSettings.playerVersion, visValue:STS.radioSettings.playerVersion }, watchLayout:{ name:"watchLayout", tValue:STS.radioSettings.watchLayout, visValue:STS.radioSettings.watchLayout }, relatedTabs:{ name:"relatedTabs", tValue:STS.radioSettings.relatedTabs, visValue:STS.radioSettings.relatedTabs }, relatedGrid:{ name:"relatedGrid", tValue:STS.radioSettings.relatedGrid, visValue:STS.radioSettings.relatedGrid }, relatedSize:{ name:"relatedSize", tValue:STS.radioSettings.relatedSize, visValue:STS.radioSettings.relatedSize }, compactDate:{ name:"compactDate", tValue:STS.radioSettings.compactDate, visValue:STS.radioSettings.compactDate }, playerSizerules:{ name:"playerSizerules", tValue:STS.radioSettings.playerSizerules, visValue:STS.radioSettings.playerSizerules }, guideNavToFeed:{ name:"guideNavToFeed", tValue:STS.radioSettings.guideNavToFeed, visValue:STS.radioSettings.guideNavToFeed }, guideAlwaysPinned:{ name:"guideAlwaysPinned", tValue:STS.radioSettings.guideAlwaysPinned, visValue:STS.radioSettings.guideAlwaysPinned }, channelVersion:{ name:"channelVersion", tValue:STS.radioSettings.channelVersion, visValue:STS.radioSettings.channelVersion }, colorfulChannels:{ name:"colorfulChannels", tValue:STS.radioSettings.colorfulChannels, visValue:STS.radioSettings.colorfulChannels }, newStructure2:"true" } } } //console.log(STS.radioSettings); if(STS.inputSettings==null){ STS.inputSettings={ favsPlaylist:{ name:"favsPlaylist", tValue:"", visValue:"" } } } if(STS.radioSettings.playerSpinner==null){ STS.radioSettings.playerSpinner={ name:"playerSpinner", tValue:"off", visValue:"auto" } } if(STS.radioSettings.homeRedir==null){ STS.radioSettings.homeRedir={ name:"homeRedir", tValue:"off", visValue:"auto" } } if(STS.radioSettings.logoLink==null){ STS.radioSettings.logoLink={ name:"logoLink", tValue:"home", visValue:"auto" } } if(STS.radioSettings.subsGrid==null){ STS.radioSettings.subsGrid={ name:"subsGrid", tValue:"on", visValue:"auto" } } if(STS.radioSettings.searchText==null){ STS.radioSettings.searchText={ name:"searchText", tValue:"on", visValue:"auto" } } if(STS.radioSettings.outlineIcons==null){ STS.radioSettings.outlineIcons={ name:"outlineIcons", tValue:"off", visValue:"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; }); } } gdp.watchLayout=SRS.watchLayout.tValue; let arra=Object.entries(STS); let ScFa={ "configNoCast":{ name:"configNoCast", desc:"Remove the 'play on TV' button that appears in Chromium based browsers." }, "configAccountMenuV3SettingsButton":{ name:"configAccountMenuV3SettingsButton", desc:"Show the V3 settings and StarTube settings buttons on the account menu." }, "configPolymerMenuV3SettingsButton":{ name:"configPolymerMenuV3SettingsButton", desc:"Show the V3 settings and StarTube settings buttons on the Polymer account menu." }, "configCreateMenuV3SettingsButton":{ name:"configCreateMenuV3SettingsButton", desc:"Show the V3 settings button on the create menu." }, "expAdaptiveLayout2017Cap":{ name:"expAdaptiveLayout2017Cap", desc:"Makes 2017 Hitchhiker the newest possible layout selected by the adaptive layout. For example, a video uploaded in 2024 will give you the 2017 layout." }, "expAdaptiveLayout2018Cap":{ name:"expAdaptiveLayout2018Cap", desc:"Makes 2018-2020 Hitchhiker the newest possible layout selected by the adaptive layout. For example, a video uploaded in 2024 will give you the 2018 layout." }, "expAdaptiveLayout2022Cap":{ name:"expAdaptiveLayout2022Cap", desc:"Makes 2022 Polymer the newest possible layout selected by the adaptive layout. For example, a video uploaded in 2024 will give you the 2022 layout." }, "expAdaptiveLayout2024HH":{ name:"expAdaptiveLayout2024HH", desc:"(For the adaptive layout) Use 2024 Hitchhiker for videos uploaded in 2024." }, "show2point4":{ name:"show2point4", desc:"Show the 2.4.0 update card." }, "showWelcomeBanner":{ name:"showWelcomeBanner", desc:"Show the welcome to StarTube Beta banner." }, "polymerWarningBanner":{ name:"polymerWarningBanner", desc:"If V3 is disabled or not installed, StarTube will display a banner urging the user to install it." }, "expAlwaysShowCompactDate":{ name:"expAlwaysShowCompactDate", desc:"Display dates on related videos without having to hover over them." }, "expNeverShowCompactDate":{ name:"expNeverShowCompactDate", desc:"Never display dates on related videos, even when hovering over them." }, "expMoveGuideMainSectionToTop":{ name:"expMoveGuideMainSectionToTop", desc:"Only meant to be used with v3's regular 2013 guide." }, "expMoreTooltips":{ name:"expMoreTooltips", desc:"More tooltips when hovering over buttons" }, "expWatch9NoOwner":{ name:"expWatch9NoOwner", desc:'Removes the owner column from alt-watch9. Recommended if using "expRelatedTabs".' }, "expWatch9TrueExpander":{ name:"expWatch9TrueExpander", desc:"Makes the description work more like it does in watch7, and removes the Description tab." }, "expWatch9SidebarBus":{ name:"expWatch9SidebarBus", desc:"Makes alt-watch9's sidebar item selection move. Glitchy on some zoom levels." }, "expWatch9StickyColumns":{ name:"expWatch9StickyColumns", desc:"When on the description tab, the sidebar and owner column will stay on screen while you scroll." }, "expRelatedGrid":{ name:"expRelatedGrid", desc:"Use grid view for related videos." }, "expWatch8NoMore":{ name:"expWatch8NoMore", desc:"Remove the 'More' button in favor of showing all buttons at once. NOTE: V3's built-in Watch8 option would best be disabled." }, "expMoveCountsToButtons":{ name:"expMoveCountsToButtons", desc:"Moves like and dislike counts to the buttons." }, "expSharrow":{ name:"expSharrow", desc:"Use Late 2015-Onwards share icon in watch8" }, "expGuideAlwaysPinned":{ name:"expGuideAlwaysPinned", desc:"Always have guide pinned. Untested with 2013 guide." }, "expWatch7AboutTabRename":{ name:"expWatch7AboutTabRename", desc:'Change "About" to "Video info" on regular watch7.' }, "expWatch7AboutTabRename2":{ name:"expWatch7AboutTabRename2", desc:'Change "About" to "Details" on regular watch7.' }, "expTwoColumnSearchResults":{ name:"expTwoColumnSearchResults", desc:"*Currently does not work with the centered layout.* Makes search results 2 columns, instead of 1. Works best on 1920x1080 screens or better." }, "configWatch7SidebarCardShadow":{ name:"configWatch7SidebarCardShadow", desc:"Add a box shadow to the related videos section if indiviual cards watch is on" }, "expFlatLogo":{ name:"expFlatLogo", desc:"Use the 2015-2017 logo." }, "expInvertLogo":{ name:"expInvertLogo", desc:"Use the Ringo (2017-2024) logo, or the Ringo2 (2024-present) logo if you have expRingo2 enabled. Also makes many UI elements a brighter red." }, "expGlossyLogo":{ name:"expGlossyLogo", desc:"Use the pre-2012 logo. Designed for the Hitchhiker layouts only." }, "expClassicTitle":{ name:"expClassicTitle", desc:"Early 2013 video title" }, "expClassicGuide":{ name:"expClassicGuide", desc:"Early 2013 guide styling" }, "expClassicSubscribe":{ name:"expClassicSubscribe", desc:"Early 2013 subscribe button" }, "expClassicStyles":{ name:"expClassicStyles", desc:"General early 2013 styling" }, "expClassicLtod":{ name:"expClassicLtod", desc:"Early 2013 like to dislike bar and icons" }, "expClassicButtons":{ name:"expClassicButtons", desc:"Early 2013 uix button styling" }, "expBigSearchThumbs":{ name:"expBigSearchThumbs", desc:"Use the slightly bigger search thumbnails from around 2017-2019. Pfps also become centered if this is enabled." }, "expBiggerSearchThumbs":{ name:"expBiggerSearchThumbs", desc:"Use the much bigger search thumbnails from around 2020-2022. Pfps also become centered if this is enabled." }, "expNoVideosLink":{ name:"expNoVideosLink", desc:"Removes the videos link on watch7, watch8, and the related tabs." }, "expSkinnySubscribe":{ name:"expSkinnySubscribe", desc:"Use the skinnier subscribe button. (V3 by default uses a wider variant)" }, "expModernStyles":{ name:"expModernStyles", desc:"Enable ~2015 styling" }, "modernCards":{ name:"modernCards", desc:"Enable modern cardification padding and margins used from 2014 onwards. expModernStyles overrides some of this." }, "sbStyles":{ name:"sbStyles", desc:"Enable most Skybird styling." }, "sbCardPhysics":{ name:"sbCardPhysics", desc:"Use Skybird card rules." }, "expLightChannelBar":{ name:"expLightChannelBar", desc:"Enable the modern light bar that appears on your own channel" }, "expModernNotifIcon":{ name:"expModernNotifIcon", desc:"Change notification preference icon to a bell" }, "expModernTopbar":{ name:"expModernTopbar", desc:"Makes the topbar in general look more like 2015 onwards" }, "expModernUpload":{ name:"expModernUpload", desc:"Remove the icon on the upload button (intended to be used without promintent upload button)" }, "expModernGuideButton":{ name:"expModernGuideButton", desc:"Enable late 2015-Present guide button" }, "expModernSearchIcon":{ name:"expModernSearchIcon", desc:"Enable late 2015-Present search icon" }, "expModernTitle":{ name:"expModernTitle", desc:"Enable smaller title text from 2016-onwards" }, "expModernGuide":{ name:"expModernGuide", desc:"Make the guide look like it did in late 2015 onwards, also changes stuff like What to Watch to Home" }, "expModernHome":{ name:"expModernHome", desc:"Removes recommended channels and fixes thumbnail sizes on home" }, "expModernPlaylists":{ name:"expModernPlaylists", desc:"Modern Hitchhiker playlist styling" }, "expModernPlaylistThumbnails":{ name:"expModernPlaylistThumbnails", desc:"Modern Hitchhiker playlist thumbnail styling" }, "expPlaylistRedBorder":{ name:"expPlaylistRedBorder", desc:"Red border around currently playing video. From 2014-2015 ish." }, "expPlaylistTimestamps":{ name:"expPlaylistTimestamps", desc:"Add timestamps to playlist videos on the watch page, which mimicks CustomTube's playlist styling" }, "expTrueScrollableGuide":{ name:"expTrueScrollableGuide", desc:"Make the guide act like it did in 2015 onwards, removing the flyouts. Requires APPBAR_GUIDE_SCROLL to be disabled." }, "materialSpinner":{ name:"materialSpinner", desc:"Make the player use the material loading icon added in late 2017." }, "expViewsString":{ name:"expViewsString", desc:'Always show the "views" text on the view count.' }, "expGoogleApps":{ name:"expGoogleApps", desc:"Use apps button from 2015 Google. Was briefly tested on YouTube around 2013-2014." }, "expCommentsFullWidth":{ name:"expCommentsFullWidth", desc:"Make comments take up the full width of the section, rather than being limited 640px" }, "expNoByText":{ name:"expNoByText", desc:'Removes the "by" text on video elements.' }, "expAccountMenu":{ name:"expAccountMenu", desc:"Use Hitchhiker account menu from 2015 onwards." }, "expStaticSite":{ name:"expStaticSite", desc:"Forces the site to have a consistent width of 970 pixels. Center alignment required." }, "expStaticSiteForcesSmallPlayer":{ name:"expStaticSiteForcesSmallPlayer", desc:"If expStaticSite is enabled, the non-flexwatch (360p) player will be forced on." }, "expHideAppbar":{ name:"expHideAppbar", desc:"Hide appbar without disabling appbar guide" }, "expEpicWatch7Flat":{ name:"expEpicWatch7Flat", desc:"Removes the shadow on epic watch7." }, "expEpicHeader":{ name:"expEpicHeader", desc:"Use the scrapped Epic Panda topbar" }, "expEpicStyling":{ name:"expEpicStyling", desc:"Recommended for Epic Panda layout" }, "expEpicFeeds":{ name:"expEpicFeeds", desc:"Epic Panda feed header" }, "expCosmicHeader":{ name:"expCosmicHeader", desc:"Use the Cosmic Panda topbar" }, "expCosmicBG":{ name:"expCosmicBG", desc:"Makes the site use the Cosmic Panda background image" }, "expCosmicButtons":{ name:"expCosmicButtons", desc:"Makes the site use Cosmic Panda styled buttons" }, "expCosmicStyles":{ name:"expCosmicStyles", desc:"Makes the site use Cosmic Panda styling in general." }, "expCosmicBanners":{ name:"expCosmicBanners", desc:"Makes the site use the early 2012 alert banner styling." }, "expCosmicBannersV2":{ name:"expCosmicBannersV2", desc:"Makes the site use the mid-late 2012 alert banner styling." }, "expCosmicComments":{ name:"expCosmicComments", desc:"Use Cosmic Panda comments." }, "expCosmicGuideStyle":{ name:"expCosmicGuideStyle", desc:"Makes the site use the Cosmic Panda black guide." }, "expCosmicGuideLayout":{ name:"expCosmicGuideLayout", desc:"Makes the guide's structure similar to the Cosmic Panda one, with the browse channels button being on top for example." }, "expCosmicFeedsV1":{ name:"expCosmicFeedsV1", desc:"Makes feed video renderers use the late 2011-early 2012 style." }, "expCosmicFeedsV2":{ name:"expCosmicFeedsV2", desc:"Makes feed video renderers use the mid 2012 style." }, "expCosmicFeedsV3":{ name:"expCosmicFeedsV3", desc:"Makes feed video renderers use the late 2012 style." }, "expCosmicFeedsThirdColumn":{ name:"expCosmicFeedsThirdColumn", desc:"Adds a trending column to the feed pages." }, "expNotifSquare":{ name:"expNotifSquare", desc:"Use the old Google+ notification square instead of the bell." }, "expChannels3":{ name:"expChannels3", desc:"Use Channels3, the Cosmic Panda channel page." }, "expChannels3BGVerticalRepeat":{ name:"expChannels3BGVerticalRepeat", desc:"The channel background will repeat vertically. Use with expChannels3BGHorizontalRepeat to make it repeat in all directions." }, "expChannels3BGHorizontalRepeat":{ name:"expChannels3BGHorizontalRepeat", desc:"The channel background will repeat horizontally. Use with expChannels3BGVericalRepeat to make it repeat in all directions." }, "expChannels3TimeVisible":{ name:"expChannels3TimeVisible", desc:"Show the timestamp on Channels3's homepage thumbnails." }, "expChannels3DateVisible":{ name:"expChannels3DateVisible", desc:"Always show the the date on Channels3's homepage videos." }, "expChannels3DateHidden":{ name:"expChannels3DateHidden", desc:"Never show the the date on Channels3's homepage videos." }, "expNoGuide":{ name:"expNoGuide", desc:"Removes the guide (center alignment required)" }, "expGuideOnFeedsOnly":{ name:"expGuideOnFeedsOnly", desc:"Makes the guide only appear on feeds (such as subscriptions page) (center alignment required)" }, "expAozoraHome":{ name:"expAozoraHome", desc:"Arranges the homepage like the 2011 layout." }, "expAozoraHeader":{ name:"expAozoraHeader", desc:"Makes the topbar look like the 2011 layout." }, "expAozoraBG":{ name:"expAozoraBG", desc:"Pure white site background." }, "expAozoraStyles":{ name:"expAozoraStyles", desc:"Styles many things to look like the Aozora (2010-2011) layout." }, "expAozoraComments":{ name:"expAozoraComments", desc:"Use Aozora comments." }, "expAozoraSubscribe":{ name:"expAozoraSubscribe", desc:"White subscribe button" }, "expAozoraTopbarLinks":{ name:"expAozoraTopbarLinks", desc:"Adds the browse, movies, and upload links to the topbar. Hides the default upload button." }, "expAozoraSearch":{ name:"expAozoraSearch", desc:"Use the Aozora search layout, used from 2010-Early 2012." }, "expStargazerTabbedHeader":{ name:"expStargazerTabbedHeader", desc:"Use the 2008 header/topbar. Will overwrite any other topbar settings." }, "expStargazerBarHeader":{ name:"expStargazerBarHeader", desc:"Use the Early/Mid 2009 header/topbar. Will overwrite any other topbar settings." }, "expStargazerSimpleHeader":{ name:"expStargazerSimpleHeader", desc:"Use the Late 2009 header/topbar. Will overwrite any other topbar settings." }, "expStargazerSubscribe":{ name:"expStargazerSubscribe", desc:"Use the old yellow subscribe button from 2008-2009." }, "expHomeTab":{ name:"expHomeTab", desc:"Gives the channel page a regular home tab, instead of the icon tab." }, "expRoboto":{ name:"expRoboto", desc:"Makes the site use the Roboto font." }, "expCenteredSearch":{ name:"expCenteredSearch", desc:"Centers the searchbar. Intended to be used with the Polymer layout recreation." }, "expBigSearch":{ name:"expBigSearch", desc:"Taller search bar from certain eras of Polymer." }, "expSecondarySearchIcon":{ name:"expSecondarySearchIcon", desc:"Adds that weird redundant search icon that appears on the left side of the search bar when it is focused, which was added in 2022 and still exists today." }, "expMaterialSearch":{ name:"expMaterialSearch", desc:"Material search bar from 2016 Polymer, and some Hitchhiker experiements." }, "expPolymerAccountMenu":{ name:"expPolymerAccountMenu", desc:"Use the account menu from Polymer." }, "expPolymerShell":{ name:"expPolymerShell", desc:"Changes the topbar, guide, and some other things to look like they did in Polymer Gen 1 (2017-2019)." }, "expEarlyPolymerShell":{ name:"expEarlyPolymerShell", desc:"Changes the topbar, guide, and some other things to look like they did in the Polymer Beta/Polymer Gen 0 (2016-2017)." }, "expEarlyPolymerGuide":{ name:"expEarlyPolymerGuide", desc:"Makes the guide items 48px tall." }, "expPolymerGen2Colors":{ name:"expPolymerGen2Colors", desc:"Makes the site use the colors it did in Polymer Gen 2 (2020-2022)." }, "polymerGen2Comments":{ name:"polymerGen2Comments", desc:"Makes the site use 2019-present comments." }, "simpleReply":{ name:"simpleReply", desc:"'3 REPLIES' instead of 'View all 3 replies'. Lowercase when using Amsterdam." }, "typographySpacing":{ name:"typographySpacing", desc:"Very subtle letter spacing effect used in 2021-2022." }, "expPolymerSubscribe":{ name:"expPolymerSubscribe", desc:"Makes the subscribe button use the Polymer Gen 1 style (sub count inside the button)" }, "expPolymerGen2Subscribe":{ name:"expPolymerGen2Subscribe", desc:"Makes the subscribe button use the Polymer Gen 2 style (sub count not inside the button)" }, "expPolymerStyles":{ name:"expPolymerStyles", desc:"Makes video renderers and other things look like Polymer." }, "expBetaPolymerStyles":{ name:"expBetaPolymerStyles", desc:"Styles some things to look like 2016 Polymer." }, "expPolymerChannels":{ name:"expPolymerChannels", desc:"2017 onwards channels." }, "expColorfulChannels":{ name:"expColorfulChannels", desc:"Colorful material channels from the 2016 polymer beta. Requires MATERIAL_C4 to be enabled." }, "expPolymerComments":{ name:"expPolymerComments", desc:"Polymer comments." }, "expPolymerTooltips":{ name:"expPolymerTooltips", desc:"Polymer tooltips." }, "expTopbarShadow":{ name:"expTopbarShadow", desc:"Use the topbar shadow, which was used from 2016-2019 in Polymer." }, "expMaterialSignIn":{ name:"expMaterialSignIn", desc:"Red Material sign in button." }, "expRichGridHome":{ name:"expRichGridHome", desc:"Makes the homepage videos really big." }, "expCommentsTeaser":{ name:"expCommentsTeaser", desc:"Watch10 comments button." }, "expSegmentedLtod":{ name:"expSegmentedLtod", desc:"Watch10 like and dislike buttons will be together instead of separate." }, "expRoundedSubscribe":{ name:"expRoundedSubscribe", desc:"Use the rounded subscribe button from Late 2022 onwards." }, "expBlackSubscribe":{ name:"expBlackSubscribe", desc:"Use the black (or white in dark mode) subscribe button from Late 2022 onwards." }, "expRoundedThumbs":{ name:"expRoundedThumbs", desc:"Use rounded thumbnails from Late 2022 onwards." }, "expRoundedPlayer":{ name:"expRoundedPlayer", desc:"Use rounded player from Mid 2023 onwards." }, "expRoundedSearch":{ name:"expRoundedSearch", desc:"Use the rounded searchbar from Late 2022 onwards." }, "expRoundedGuide":{ name:"expRoundedGuide", desc:"Use the Amsterdam Guide from Late 2022 onwards." }, "expRoundedStyles":{ name:"expRoundedStyles", desc:"Rounded (Amsterdam) styles in general." }, "expFrostedGlass":{ name:"expFrostedGlass", desc:"Use the semi-transparent frosted glass topbar that was being tested in late 2024." }, "expPolymerGen3Colors":{ name:"expPolymerGen3Colors", desc:"Use the all-white color scheme of Amsterdam." }, "expYTSansTitle":{ name:"expYTSansTitle", desc:"The video title will use the YouTube Sans font, like it did in watch10 beta, and final watch10 until late 2023." }, "expWMRButtonsLowercase":{ name:"expWMRButtonsLowercase", desc:"Makes the Polymer watch layouts use lowercase buttons." }, "expWMRAddTo":{ name:"expWMRAddTo", desc:"Makes the Polymer watch layouts use a plus icon for the add-to/save button." }, "expWMRNoSaveText":{ name:"expWMRNoSaveText", desc:"Makes the Polymer watch layouts' save/addto button show the icon only." }, "expWMRNoShareText":{ name:"expWMRNoShareText", desc:"Makes the Polymer watch layouts' share button show the icon only." }, "expOutlineIcons":{ name:"expOutlineIcons", desc:"Use the outline icons from 2021" }, "expRoundedTopbarPfp":{ name:"expRoundedTopbarPfp", desc:"Makes the topbar pfp round like it was in 2016 onwards" }, "expUploadIcon":{ name:"expUploadIcon", desc:"Replace the upload button with the upload icon from 2016-2018" }, "expCreateIcon":{ name:"expCreateIcon", desc:"Replace the upload button with the create icon from 2018-present." }, "expYouTubeApps":{ name:"expYouTubeApps", desc:"Add the YouTube apps button, used in Polymer until it was removed in 2022." }, "expRingo2":{ name:"expRingo2", desc:"Use YouTube's Ringo2 rebrand, which makes the logo slightly pink. Also applies the ringo2 coloring to red buttons and other red elements." }, "expRingo2Gradients":{ name:"expRingo2Gradients", desc:"Use the red to pink gradients for stuff like the progessbar." }, "expHideYoodles":{ name:"expHideYoodles", desc:"Hide YouTube Doodles because they break the styling of the logo on some layouts." }, "expFixedShareIcons":{ name:"expFixedShareIcons", desc:"Some share options incorrectly appear as Facebook. This option fixes some of them." }, "expFixedXIcon":{ name:"expFixedXIcon", desc:"Makes the X share option use the modern icon, as opposed to the pre-2023 icon." }, "expMaterialGbar":{ name:"expMaterialGbar", desc:"Gives the modern gbar a Material-ish skin. Requires V3's MODERN_GBAR_DELEGATION to be enabled." } }; function executeRadios(i, x, K){ if(K == true){ x = x.visValue; } if(x!=="auto"&&x!=="passive"&&x!=="autoPreferAltW9"){ SRS[i].tValue=SRS[i].visValue; } if(i=="layoutMode"){ if(x=="manual"){ SRS.layoutMode.tValue="manual"; }else{ SRS.layoutMode.tValue="adaptive"; } }else if(i=="layoutSelect"){ if(x == "amst2024c"){ ST2019Settings(); ST2020Settings(); ST2021Settings(); ST2022Settings(); STAmsterdamSettings(); }else if(x == "amst2023_1"){ ST2019Settings(); ST2020Settings(); ST2021Settings(); ST2022Settings(); STAmsterdamSettings(); STEarly2023Settings(); }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=="polyE2017"){ ST2019Settings(); ST2018PolySettings(); ST2017PolySettings(); ST2017PolyEarlySettings(); }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 == "hh2014alt_1"){ STModernHitchhikerSettings(); ST2014Settings(); ST2013Settings(); ST2013AltSettings(); ST2014AltSettings(); STWatch7(); }else if(x == "hh2013alt_3"){ STModernHitchhikerSettings(); ST2014Settings(); ST2013Settings(); ST2013AltSettings(); 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 == "aozora2011_1"){ STCosmicPandaSettings(); STAozoraSettings(); STEarly2011Settings(); }else if(x == "aozora2010_1"){ STCosmicPandaSettings(); STAozoraSettings(); ST2010Settings(); }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(x == "sb2016"){ STSkybirdSettings(); } }else if(i == "faviconSelect"){ if(x == "2024"){ STS.favi24 = true; STS.favi24O = false; STS.favi17 = false; STS.favi15 = false; STS.favi12 = false; STS.favi10 = false; STS.favi05 = false; }else if(x == "2024_old"){ STS.favi24 = false; STS.favi24O = true; STS.favi17 = false; STS.favi15 = false; STS.favi12 = false; STS.favi10 = false; STS.favi05 = false; }else if(x == "2017"){ STS.favi24 = false; STS.favi24O = false; STS.favi17 = true; STS.favi15 = false; STS.favi12 = false; STS.favi10 = false; STS.favi05 = false; }else if(x == "2015"){ STS.favi24 = false; STS.favi24O = false; STS.favi17 = false; STS.favi15 = true; STS.favi12 = false; STS.favi10 = false; STS.favi05 = false; }else if(x == "2012"){ STS.favi24 = false; STS.favi24O = false; STS.favi17 = false; STS.favi15 = false; STS.favi12 = true; STS.favi10 = false; STS.favi05 = false; }else if(x == "2010"){ STS.favi24 = false; STS.favi24O = false; STS.favi17 = false; STS.favi15 = false; STS.favi12 = false; STS.favi10 = true; STS.favi05 = false; }else if(x == "2005"){ STS.favi24 = false; STS.favi24O = false; STS.favi17 = false; STS.favi15 = false; STS.favi12 = false; STS.favi10 = false; STS.favi05 = 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"||x=="modernV1"||x=="modernV2"||x=="modernV3"||x=="modernV4"||x=="default2014"){ setV3Settings("defaultPlayer"); }else if(x=="flash7"){ setV3Settings("flash7Player"); }else if(x=="embed"){ setV3Settings("embedPlayer"); } }else if(i=="playerSpinner"){ if(x=="auto"){ }else if(x=="classic"){ STS.materialSpinner=false; }else if(x=="material"){ STS.materialSpinner=true; } }else if(i=="playerSizerules"){ if(STS.expStaticSite==true&&STS.expStaticSiteForcesSmallPlayer==true){ setV3Settings("noFlexwatch"); }else{ if(x=="passive"){ setV3Settings("flexwatchMini"); }else if(x=="auto"){ if( SRS.layoutSelect.visValue=="hh2013_1"|| SRS.layoutSelect.visValue=="hh2013_2"|| SRS.layoutSelect.visValue=="hh2013_3"|| SRS.layoutSelect.visValue=="hh2014" ){ setV3Settings("noFlexwatch"); }else if( SRS.layoutSelect.visValue=="hhE2015"|| SRS.layoutSelect.visValue=="hh2015"|| SRS.layoutSelect.visValue=="hhE2016"|| SRS.layoutSelect.visValue=="hhM2016"|| SRS.layoutSelect.visValue=="hh2016"|| SRS.layoutSelect.visValue=="hhE2017"|| SRS.layoutSelect.visValue=="hh2017"|| SRS.layoutSelect.visValue=="hh2018"|| SRS.layoutSelect.visValue=="hh2024"|| SRS.layoutSelect.visValue=="poly2016" ){ setV3Settings("flexwatchMiniV2"); }else if( SRS.layoutSelect.visValue=="poly2017"|| SRS.layoutSelect.visValue=="poly2018"|| SRS.layoutSelect.visValue=="poly2019"|| SRS.layoutSelect.visValue=="poly2020"|| SRS.layoutSelect.visValue=="poly2021"|| SRS.layoutSelect.visValue=="poly2022"|| SRS.layoutSelect.visValue=="amst2023_1"|| SRS.layoutSelect.visValue=="amst2024c" ){ setV3Settings("flexwatchLarge"); }else if( SRS.layoutSelect.visValue=="sb2016" ){ setV3Settings("flexwatchMedium"); }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.visValue=="hh2013_1"|| SRS.layoutSelect.visValue=="hh2013_2"|| SRS.layoutSelect.visValue=="hh2013_3"|| SRS.layoutSelect.visValue=="hh2014"|| SRS.layoutSelect.visValue=="hhE2015"|| SRS.layoutSelect.visValue=="hh2015"|| SRS.layoutSelect.visValue=="hhE2016"|| SRS.layoutSelect.visValue=="hhM2016"|| SRS.layoutSelect.visValue=="hh2016"|| SRS.layoutSelect.visValue=="hhE2017"|| SRS.layoutSelect.visValue=="hh2017"|| SRS.layoutSelect.visValue=="hh2018"|| SRS.layoutSelect.visValue=="hh2024"){ STAltWatch9(); } }else if(x=="altWatch9"){ STAltWatch9(); }else if(x=="altWatch9Fancy"){ STAltWatch9Fancy(); }else if( x=="watch9a"|| x=="watch9b"|| x=="watch9c"|| x=="watch10beta" ){ STWatch9(); STWatch10Teaser(); SRS.watchLayout.tValue=x; }else if( x=="watch10teaser" ){ STWatch10Teaser(); SRS.watchLayout.tValue=x; }else if( x=="watch10" ){ STWatch10(); SRS.watchLayout.tValue=x; }else if(x=="watch8"){ STWatch8(); }else if(x=="watch7"){ STWatch7(); }else if(x=="watch7beta"){ STWatch7Beta(); }else if(x=="watch6"){ STWatch6(); }else if(x=="watch5d"){ //STWatch5d(); SRS.watchLayout.tValue="watch5d"; }else{ SRS.watchLayout.tValue=x; } }else if(i == "relatedTabs"){ if(x == "on"){ SRS.relatedTabs.tValue="on"; }else if(x == "onNoSub"){ SRS.relatedTabs.tValue="onNoSub"; }else if(x == "off"){ SRS.relatedTabs.tValue="off"; STS.expWatch9NoOwner=false; } }else if(i == "relatedGrid"){ if(x == "on"){ STS.expRelatedGrid = true; }else if(x == "off"){ STS.expRelatedGrid = false; } }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.visValue=="cosmic2012_1"|| SRS.layoutSelect.visValue=="cosmic2012_2"|| SRS.layoutSelect.visValue=="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.visValue=="poly2016" ){ STS.expColorfulChannels=true; setV3Settings("colorfulChannels"); }else{ STS.expColorfulChannels=false; setV3Settings("normalChannels"); } }else if(x=="polymer"){ if( SRS.layoutSelect.visValue=="poly2016"|| SRS.layoutSelect.visValue=="polyE2017"|| SRS.layoutSelect.visValue=="poly2017"|| SRS.layoutSelect.visValue=="poly2018"|| SRS.layoutSelect.visValue=="poly2019"|| SRS.layoutSelect.visValue=="poly2020"|| SRS.layoutSelect.visValue=="poly2021"|| SRS.layoutSelect.visValue=="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"); } }else if(i == "outlineIcons"){ if(x == "poly"){ if( SRS.layoutSelect.visValue=="sb2016"|| SRS.layoutSelect.visValue=="poly2016"|| SRS.layoutSelect.visValue=="polyE2017"|| SRS.layoutSelect.visValue=="poly2017"|| SRS.layoutSelect.visValue=="poly2018"|| SRS.layoutSelect.visValue=="poly2019"|| SRS.layoutSelect.visValue=="poly2020"|| SRS.layoutSelect.visValue=="poly2021"|| SRS.layoutSelect.visValue=="poly2022"|| SRS.layoutSelect.visValue=="amst2023_1"|| SRS.layoutSelect.visValue=="amst2024c" ){ STS.expOutlineIcons=true; }else{ STS.expOutlineIcons=false; } }else if(x == "off"){ STS.expOutlineIcons=false; } } applySettings(); } executeRadiosParent(SRS); function executeRadiosParent(text){ //console.log(text); executeRadios("layoutMode", text.layoutMode, true); executeRadios("layoutSelect", text.layoutSelect, true); executeRadios("faviconSelect", text.faviconSelect, true); executeRadios("gbarVersion", text.gbarVersion, true); executeRadios("searchText", text.searchText, true); executeRadios("accountMenu", text.accountMenu, true); executeRadios("playerVersion", text.playerVersion, true); executeRadios("playerSpinner", text.playerSpinner, 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("homeRedir",text.homeRedir,true); executeRadios("logoLink",text.logoLink,true); executeRadios("subsGrid", text.subsGrid, true); executeRadios("channelVersion", text.channelVersion, true); executeRadios("colorfulChannels", text.colorfulChannels, true); executeRadios("outlineIcons", text.outlineIcons, true); } getIronSettings(); function STAltWatch9(){ SRS.watchLayout.tValue="altWatch9"; SRS.relatedTabs.tValue="on"; STS.expWatch9NoOwner = true; STS.expWatch9TrueExpander = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expRelatedGrid = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = 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(){ SRS.watchLayout.tValue="altWatch9Fancy"; SRS.relatedTabs.tValue="on"; STS.expWatch9NoOwner = true; STS.expWatch9TrueExpander = false; STS.expWatch9SidebarBus = true; STS.expWatch9StickyColumns = true; STS.expRelatedGrid = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = 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 STWatch9(){ STS.expMoveCountsToButtons=true; STS.expYTSansTitle=false; } function STWatch10(){ STS.expCommentsTeaser=false; STS.expMoveCountsToButtons=true; } function STWatch10Teaser(){ STS.expCommentsTeaser=true; STS.expMoveCountsToButtons=true; } function STWatch8(){ SRS.watchLayout.tValue="watch8"; SRS.relatedTabs.tValue="off"; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expRelatedGrid = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = true; STS.expSharrow = true; 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 STWatch7(){ SRS.watchLayout.tValue="watch7"; SRS.relatedTabs.tValue="off"; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expRelatedGrid = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = 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 STWatch7Beta(){ SRS.watchLayout.tValue="watch7beta"; SRS.relatedTabs.tValue="off"; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expRelatedGrid = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = 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 STWatch6(){ SRS.watchLayout.tValue="watch6"; SRS.relatedTabs.tValue="off"; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expRelatedGrid = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = 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(){ SRS.layoutSelect.tValue="hh2015"; SRS.homeRedir.tValue="off"; SRS.logoLink.tValue="home"; SRS.searchText.tValue="off"; SRS.subsGrid.tValue="grid"; SRS.playerVersion.tValue="modernV1"; SRS.watchLayout.tValue="watch8"; SRS.relatedTabs.tValue="off"; SRS.relatedSize.tValue="small"; SRS.playerSpinner.tValue="classic"; STS.expAlwaysShowCompactDate = false; STS.expNeverShowCompactDate = false; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = false; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expRelatedGrid = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = true; STS.expSharrow = false; STS.expGuideAlwaysPinned = false; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = false; STS.expTwoColumnSearchResults = false; 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.modernCards = true; STS.sbStyles=false; STS.sbCardPhysics=false; STS.expLightChannelBar = true; STS.expModernNotifIcon = false; STS.expModernTopbar = true; STS.expModernUpload = true; STS.expModernGuideButton = false; STS.expModernSearchIcon = 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.materialSpinner = false; STS.expViewsString = false; STS.expGoogleApps = false; STS.expCommentsFullWidth = true; STS.expNoByText = false; STS.expAccountMenu = true; STS.expStaticSite = false; STS.expHideAppbar = 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.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.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.polymerGen2Comments = false; STS.simpleReply = false; STS.typographySpacing = 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.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.expRingo2Gradients = false; STS.favi24 = false; STS.favi24O = false; STS.favi17 = false; STS.favi15 = true; STS.favi12 = false; STS.favi10 = false; STS.favi05 = false; STS.expHideYoodles = false; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("nirvana15"); } } function STEarly2015Settings(){ SRS.layoutSelect.tValue="hhE2015"; SRS.playerVersion.tValue="default2014"; STS.expTrueScrollableGuide = false; STS.favi15 = false; STS.favi12 = true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("nirvana15Early"); } } function ST2016Settings(){ SRS.layoutSelect.tValue="hh2016"; SRS.playerVersion.tValue="modernV2"; SRS.searchText.tValue="on"; SRS.relatedSize.tValue="large"; STS.expSharrow = true; STS.expFlatLogo = true; STS.expModernNotifIcon = true; STS.expModernGuideButton = true; STS.expModernSearchIcon = true; STS.expModernTitle = true; STS.expModernGuide = true; STS.expModernHome = true; STS.expPlaylistRedBorder = false; STS.expTrueScrollableGuide = true; STS.materialSpinner = false; STS.expViewsString = true; STS.expNoByText = true; STS.expHomeTab = true; STS.expRoboto = true; STS.expRoundedTopbarPfp = true; STS.expHideYoodles = true; STS.favi15 = true; STS.favi12 = false; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("nirvana16"); } } function STEarly2016Settings(){ SRS.layoutSelect.tValue="hhE2016"; 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(){ SRS.layoutSelect.tValue="hhM2016"; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("nirvana16"); } } function STEarly2017Settings(){ SRS.layoutSelect.tValue="hhE2017"; STS.expBigSearchThumbs = true; STS.expUploadIcon = true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("nirvana16"); } } function ST2017Settings(){ SRS.layoutSelect.tValue="hh2017"; STS.expFlatLogo = false; STS.expInvertLogo = true; STS.expBigSearchThumbs = true; STS.expUploadIcon = true; STS.favi17 = true; STS.favi15 = false; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("nirvana16"); } } function ST2018Settings(){ SRS.layoutSelect.tValue="hh2018"; SRS.playerSpinner.tValue="material"; STS.expUploadIcon = false; STS.expCreateIcon = true; STS.materialSpinner = true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("nirvana16"); } } function STRingo2(){ SRS.layoutSelect.tValue="hh2024"; STS.expRingo2 = true; STS.expRingo2Gradients = true; STS.favi24 = true; STS.favi24O = false; STS.favi17 = false; } function STIdealLayout(){ STS.expWatch9SidebarBus = true; STS.expWatch9StickyColumns = true; STS.expRelatedGrid = true; STS.expGuideAlwaysPinned = true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("nirvana16"); } } function ST2014Settings(){ SRS.layoutSelect.tValue="hh2014"; SRS.playerVersion.tValue="default2014"; SRS.subsGrid.tValue="list"; SRS.watchLayout.tValue="watch7"; 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.materialSpinner = false; STS.expAccountMenu = false; STS.favi15 = false; STS.favi12 = true; STS.expHideYoodles = false; STS.expNoVideosLink = false; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("nirvana14"); } } function ST2013AltSettings(){ SRS.layoutSelect.tValue="hh2013alt_3"; STS.expModernUpload=false; STS.expModernTopbar=false; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("hitchhiker13centered"); } } function ST2014AltSettings(){ SRS.layoutSelect.tValue="hh2014alt_1"; STS.expModernUpload=false; STS.expModernTopbar=false; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("hitchhiker14centered"); } } function ST2013Settings(){ SRS.layoutSelect.tValue="hh2013_3"; STS.modernCards = 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(){ SRS.layoutSelect.tValue="hh2013_2"; STS.expSkinnySubscribe = false; STS.expAozoraHome = true; STS.expClassicLtod = true; STS.expNotifSquare = true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("hitchhiker13mid"); } } function STEarly2013Settings(){ SRS.layoutSelect.tValue="hh2013_1"; 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(){ SRS.layoutSelect.tValue="epic2012_1"; SRS.homeRedir.tValue="off"; SRS.logoLink.tValue="home"; SRS.searchText.tValue="off"; SRS.subsGrid.tValue="list"; SRS.playerVersion.tValue="default2014"; SRS.watchLayout.tValue="watch7beta"; SRS.relatedTabs.tValue="off"; SRS.relatedSize.tValue="small"; SRS.playerSpinner.tValue="classic"; STS.expAlwaysShowCompactDate = false; STS.expNeverShowCompactDate = false; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = true; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expRelatedGrid = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = false; STS.expGuideAlwaysPinned = false; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = true; STS.expTwoColumnSearchResults = false; 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.modernCards = false; STS.sbStyles=false; STS.sbCardPhysics=false; STS.expLightChannelBar = false; STS.expModernNotifIcon = false; STS.expModernTopbar = false; STS.expModernUpload = true; STS.expModernGuideButton = false; STS.expModernSearchIcon = false; STS.expModernTitle = false; STS.expModernGuide = false; STS.expModernHome = false; STS.expModernPlaylists = false; STS.expModernPlaylistThumbnails = false; STS.expPlaylistRedBorder = false; STS.expTrueScrollableGuide = false; STS.materialSpinner = false; STS.expViewsString = false; STS.expGoogleApps = false; STS.expCommentsFullWidth = true; STS.expNoByText = false; STS.expAccountMenu = false; STS.expStaticSite = true; STS.expHideAppbar = 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.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.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.polymerGen2Comments = false; STS.simpleReply = false; STS.typographySpacing = 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.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.expRingo2Gradients = false; STS.favi24 = false; STS.favi24O = false; STS.favi17 = false; STS.favi15 = false; STS.favi12 = true; STS.favi10 = false; STS.favi05 = false; STS.expHideYoodles = true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("cosmic"); } } function STEpicPandaRealSettings(){ SRS.layoutSelect.tValue="epic2012_2"; SRS.homeRedir.tValue="feedList"; SRS.logoLink.tValue="feedList"; SRS.subsGrid.tValue="list"; SRS.watchLayout.tValue="watch7beta"; SRS.relatedTabs.tValue="off"; SRS.relatedSize.tValue="small"; SRS.playerSpinner.tValue="classic"; 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(){ SRS.layoutSelect.tValue="cosmic2012_1"; SRS.homeRedir.tValue="feedList"; SRS.logoLink.tValue="feedList"; SRS.searchText.tValue="off"; SRS.subsGrid.tValue="list"; SRS.playerVersion.tValue="default2014"; SRS.watchLayout.tValue="watch5d"; SRS.relatedTabs.tValue="off"; SRS.relatedSize.tValue="small"; SRS.playerSpinner.tValue="classic"; STS.expAlwaysShowCompactDate = false; STS.expNeverShowCompactDate = false; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = true; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expRelatedGrid = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = false; STS.expGuideAlwaysPinned = false; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = false; STS.expTwoColumnSearchResults = false; 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.modernCards = false; STS.sbStyles=false; STS.sbCardPhysics=false; STS.expLightChannelBar = false; STS.expModernNotifIcon = false; STS.expModernTopbar = false; STS.expModernUpload = true; STS.expModernGuideButton = false; STS.expModernSearchIcon = 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.materialSpinner = false; STS.expViewsString = false; STS.expGoogleApps = false; STS.expCommentsFullWidth = true; STS.expNoByText = false; STS.expAccountMenu = false; STS.expStaticSite = true; STS.expHideAppbar = true; 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.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.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.polymerGen2Comments = false; STS.simpleReply = false; STS.typographySpacing = 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.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.expRingo2Gradients = false; STS.favi24 = false; STS.favi24O = false; STS.favi17 = false; STS.favi15 = false; STS.favi12 = true; STS.favi10 = false; STS.favi05 = false; STS.expHideYoodles = true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("cosmic"); } } function STCosmicPandaMidSettings(){ SRS.layoutSelect.tValue="cosmic2012_2"; 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(){ SRS.layoutSelect.tValue="cosmic2012_3"; STS.expCosmicFeedsV1 = false; STS.expCosmicFeedsV2 = false; STS.expCosmicFeedsV3 = true; STS.expChannels3TimeVisible = true; STS.expChannels3DateVisible = true; STS.expChannels3DateHidden = false; STS.expAozoraSearch = false; } function STAozoraSettings(){ SRS.layoutSelect.tValue="aozora2011_2"; SRS.homeRedir.tValue="off"; SRS.logoLink.tValue="home"; SRS.subsGrid.tValue="grid"; SRS.playerVersion.tValue="default2014"; SRS.watchLayout.tValue="watch5c"; SRS.relatedTabs.tValue="off"; SRS.relatedSize.tValue="smaller"; SRS.playerSpinner.tValue="classic"; 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.expChannels3TimeVisible = false; STS.expChannels3DateVisible = false; STS.expChannels3DateHidden = false; STS.expAozoraHeader = true; STS.expAozoraBG = true; STS.expAozoraStyles = true; STS.expAozoraComments = true; STS.expAozoraSubscribe = true; STS.favi12 = false; STS.favi10 = true; } function STEarly2011Settings(){ SRS.layoutSelect.tValue="aozora2011_1"; SRS.watchLayout.tValue="watch5b"; } function ST2010Settings(){ SRS.layoutSelect.tValue="aozora2010_1"; SRS.watchLayout.tValue="watch5a"; } function STStargazerSettings(){ SRS.layoutSelect.tValue="stargazer2009_3"; SRS.homeRedir.tValue="off"; SRS.logoLink.tValue="home"; SRS.searchText.tValue="off"; SRS.subsGrid.tValue="grid"; SRS.playerVersion.tValue="default2014"; SRS.watchLayout.tValue="watch4b"; SRS.relatedTabs.tValue="off"; SRS.relatedSize.tValue="smaller"; SRS.playerSpinner.tValue="classic"; STS.expAlwaysShowCompactDate = false; STS.expNeverShowCompactDate = false; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = true; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expRelatedGrid = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = false; STS.expGuideAlwaysPinned = false; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = false; STS.expTwoColumnSearchResults = false; 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.modernCards = false; STS.sbStyles=false; STS.sbCardPhysics=false; STS.expLightChannelBar = false; STS.expModernNotifIcon = false; STS.expModernTopbar = false; STS.expModernUpload = true; STS.expModernGuideButton = false; STS.expModernSearchIcon = 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.materialSpinner = false; STS.expViewsString = false; STS.expGoogleApps = false; STS.expCommentsFullWidth = true; STS.expNoByText = false; STS.expAccountMenu = false; STS.expStaticSite = true; STS.expHideAppbar = true; 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.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.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.polymerGen2Comments = false; STS.simpleReply = false; STS.typographySpacing = 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.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.expRingo2Gradients = false; STS.favi24 = false; STS.favi24O = false; STS.favi17 = false; STS.favi15 = false; STS.favi12 = false; STS.favi10 = false; STS.favi05 = true; STS.expHideYoodles = true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("cosmic"); } } function STStargazerMid2009Settings(){ SRS.layoutSelect.tValue="stargazer2009_2"; STS.expStargazerBarHeader = true; STS.expStargazerSimpleHeader = false; } function STStargazerEarly2009Settings(){ SRS.layoutSelect.tValue="stargazer2009_1"; STS.expStargazerBarHeader = true; STS.expStargazerSimpleHeader = false; } function STStargazer2008Settings(){ SRS.layoutSelect.tValue="stargazer2008_1"; STS.expStargazerTabbedHeader = true; STS.expStargazerBarHeader = false; } function ST2019Settings(){ SRS.layoutSelect.tValue="poly2019"; SRS.homeRedir.tValue="off"; SRS.logoLink.tValue="home"; SRS.searchText.tValue="on"; SRS.subsGrid.tValue="grid"; SRS.playerVersion.tValue="modernV2"; SRS.watchLayout.tValue="watch9a"; SRS.relatedTabs.tValue="off"; SRS.relatedSize.tValue="large"; SRS.playerSpinner.tValue="material"; STS.expAlwaysShowCompactDate = true; STS.expNeverShowCompactDate = false; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = true; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expRelatedGrid = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = true; STS.expSharrow = true; STS.expGuideAlwaysPinned = false; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = false; STS.expTwoColumnSearchResults = false; 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.modernCards = false; STS.sbStyles=false; STS.sbCardPhysics=false; STS.expLightChannelBar = true; STS.expModernNotifIcon = false; STS.expModernTopbar = true; STS.expModernUpload = true; STS.expModernGuideButton = true; STS.expModernSearchIcon = 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.materialSpinner = true; STS.expViewsString = true; STS.expGoogleApps = false; STS.expCommentsFullWidth = true; STS.expNoByText = true; STS.expAccountMenu = false; STS.expStaticSite = false; STS.expHideAppbar = true; 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.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.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.polymerGen2Comments = true; STS.simpleReply = false; STS.typographySpacing = false; 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.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.expRingo2Gradients = false; STS.favi24 = false; STS.favi24O = false; STS.favi17 = true; STS.favi15 = false; STS.favi12 = false; STS.favi10 = false; STS.favi05 = false; STS.expHideYoodles = true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("poly17"); } } function ST2018PolySettings(){ SRS.layoutSelect.tValue="poly2018"; STS.expCenteredSearch = true; STS.expPolymerGen2Colors = false; STS.polymerGen2Comments = false; STS.expEarlyPolymerShell = false; STS.expWMRNoSaveText = false; STS.expWMRNoShareText = false; STS.expTopbarShadow = true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("poly17"); } } function ST2017PolySettings(){ SRS.layoutSelect.tValue="poly2017"; SRS.playerSpinner.tValue="classic"; STS.materialSpinner = false; 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 ST2017PolyEarlySettings(){ SRS.layoutSelect.tValue="polyE2017"; STS.expInvertLogo=false; STS.expFlatLogo=true; STS.favi17 = false; STS.favi15 = true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("poly17"); } } function ST2016PolySettings(){ SRS.layoutSelect.tValue="poly2016"; STS.expFlatLogo = true; STS.expInvertLogo = false; STS.expBigSearch = true; STS.materialSpinner = false; 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.favi17 = false; STS.favi15 = true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("poly16"); } } function ST2020Settings(){ SRS.layoutSelect.tValue="poly2020"; SRS.homeRedir.tValue="feedGrid"; SRS.logoLink.tValue="feedGrid"; SRS.playerVersion.tValue="modernV3"; SRS.watchLayout.tValue="watch9b"; STS.expBigSearchThumbs=false; STS.expBiggerSearchThumbs=true; STS.expPolymerGen2Colors=true; STS.expPolymerGen2Subscribe=true; STS.expTopbarShadow=false; STS.expRichGridHome=true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("poly17"); } } function ST2021Settings(){ SRS.layoutSelect.tValue="poly2021"; SRS.playerVersion.tValue="modernV4"; STS.typographySpacing=true; STS.expBigSearch=true; STS.expOutlineIcons=true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("poly17"); } } function ST2022Settings(){ SRS.layoutSelect.tValue="poly2022"; SRS.watchLayout.tValue="watch10beta"; STS.simpleReply=true; STS.expSecondarySearchIcon=true; STS.expCommentsTeaser=true; STS.expYTSansTitle=true; STS.expWMRButtonsLowercase=true; STS.expYouTubeApps=false; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("poly17"); } } function STAmsterdamSettings(){ SRS.layoutSelect.tValue="amst2024c"; SRS.homeRedir.tValue="feedGrid"; SRS.logoLink.tValue="feedGrid"; SRS.subsGrid.tValue="grid"; SRS.playerVersion.tValue="modernV4"; SRS.watchLayout.tValue="watch10teaser"; STS.typographySpacing=false; 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.expRingo2Gradients=true; STS.favi24=true; STS.favi24O=false; STS.favi17=false; STS.favi15=false; STS.favi12=false; STS.favi10=false; STS.favi05=false; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("poly17"); } } function STEarly2023Settings(){ SRS.layoutSelect.tValue="amst2023_1"; SRS.watchLayout.tValue="watch10"; STS.expCommentsTeaser=false; STS.expBlackSubscribe=true; STS.expRoundedPlayer=false; STS.expFrostedGlass=false; STS.expYTSansTitle=true; STS.expRingo2=false; STS.expRingo2Gradients=false; STS.favi24=false; STS.favi17=true; if(STS.STPresetsAlsoSetV3Settings==true){ setV3Settings("poly17"); } } function STSkybirdSettings(){ SRS.layoutSelect.tValue="sb2016"; SRS.homeRedir.tValue="off"; SRS.logoLink.tValue="home"; SRS.searchText.tValue="on"; SRS.subsGrid.tValue="grid"; SRS.playerVersion.tValue="modernV2"; SRS.watchLayout.tValue="watch9b"; SRS.relatedTabs.tValue="off"; SRS.relatedSize.tValue="large"; SRS.playerSpinner.tValue="classic"; STS.expAlwaysShowCompactDate = false; STS.expNeverShowCompactDate = false; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = false; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expWatch9SidebarBus = false; STS.expWatch9StickyColumns = false; STS.expRelatedGrid = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = true; STS.expSharrow = false; STS.expGuideAlwaysPinned = false; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = false; STS.expTwoColumnSearchResults = false; STS.configWatch7SidebarCardShadow=false; STS.expFlatLogo=true; 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=true; STS.expBiggerSearchThumbs = false; STS.expNoVideosLink = true; STS.expSkinnySubscribe = true; STS.expModernStyles=false; STS.modernCards = true; STS.sbStyles=true; STS.sbCardPhysics=true; STS.expLightChannelBar = true; STS.expModernNotifIcon = false; STS.expModernTopbar = true; STS.expModernUpload = true; STS.expModernGuideButton=true; STS.expModernSearchIcon=true; STS.expModernTitle = false; STS.expModernGuide=true; STS.expModernHome = true; STS.expModernPlaylists = true; STS.expModernPlaylistThumbnails = true; STS.expPlaylistRedBorder = true; STS.expPlaylistTimestamps = true; STS.expTrueScrollableGuide = true; STS.materialSpinner = false; STS.expViewsString=true; STS.expGoogleApps = false; STS.expCommentsFullWidth = true; STS.expNoByText=true; STS.expAccountMenu = true; STS.expStaticSite = false; STS.expHideAppbar=true; 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.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.expStargazerTabbedHeader = false; STS.expStargazerBarHeader = false; STS.expStargazerSimpleHeader = false; STS.expStargazerSubscribe = false; STS.expHomeTab = true; STS.expRoboto=false; STS.expCenteredSearch=true; STS.expBigSearch = false; STS.expSecondarySearchIcon = false; STS.expMaterialSearch = false; STS.expPolymerAccountMenu=true; STS.expPolymerShell = false; STS.expEarlyPolymerShell = false; STS.expEarlyPolymerGuide = false; STS.expPolymerGen2Colors = false; STS.polymerGen2Comments = false; STS.simpleReply = false; STS.typographySpacing = false; STS.expPolymerSubscribe=true; STS.expPolymerGen2Subscribe=true; STS.expPolymerStyles = false; STS.expBetaPolymerStyles = false; STS.expPolymerChannels = false; STS.expColorfulChannels = false; STS.expPolymerComments=true; STS.expPolymerTooltips = false; STS.expTopbarShadow = false; STS.expMaterialSignIn = false; STS.expRichGridHome = 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=true; STS.expWMRAddTo=true; STS.expWMRNoSaveText = false; STS.expWMRNoShareText = false; STS.expOutlineIcons = false; STS.expRoundedTopbarPfp=true; STS.expUploadIcon=true; STS.expCreateIcon = false; STS.expYouTubeApps = false; STS.expRingo2 = false; STS.expRingo2Gradients = false; STS.favi24 = false; STS.favi24O = false; STS.favi17 = false; STS.favi15 = true; STS.favi12 = false; STS.favi10 = false; STS.favi05 = false; STS.expHideYoodles = false; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("nirvana16"); } } function setV3Settings(preset){ if(preset == "modernGbar" || preset == "materialGbar"){ V3_SETTINGS_CONF.USING_GBAR = true; V3_SETTINGS_CONF.MODERN_GBAR_DELEGATION = true; } if(preset == "dark"){ V3_SETTINGS_CONF.DARK_MOD = true; } if(preset == "light"){ V3_SETTINGS_CONF.DARK_MOD = false; } 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.EXPAND_DISTILLER_POST_ICON = false; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.USE_APPBAR_CONTEXT_CONTAINER = false; 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.EXPAND_DISTILLER_POST_ICON = false; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.USE_APPBAR_CONTEXT_CONTAINER = false; V3_SETTINGS_CONF.MASTHEAD_SHOW_RED_LOGO_FOR_REDUSER = false; V3_SETTINGS_CONF.MATERIAL_C4 = false; } if(preset == "hitchhiker13centered"){ 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 = true; V3_SETTINGS_CONF.APPBAR_GUIDE_BUTTON_SIMPLE_STYLE = false; 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 = 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 = true; V3_SETTINGS_CONF.LEFT_ALIGN_GUIDE_FIXED = false; V3_SETTINGS_CONF.EXPAND_DISTILLER_POST_ICON = true; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = false; V3_SETTINGS_CONF.USE_APPBAR_CONTEXT_CONTAINER = true; V3_SETTINGS_CONF.MATERIAL_C4 = false; } if(preset == "hitchhiker14centered"){ 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 = false; 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_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 = true; V3_SETTINGS_CONF.LEFT_ALIGN_GUIDE_FIXED = false; V3_SETTINGS_CONF.EXPAND_DISTILLER_POST_ICON = true; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = false; V3_SETTINGS_CONF.USE_APPBAR_CONTEXT_CONTAINER = true; 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.EXPAND_DISTILLER_POST_ICON = true; V3_SETTINGS_CONF.USE_APPBAR_CONTEXT_CONTAINER = 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.EXPAND_DISTILLER_POST_ICON = true; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.USE_APPBAR_CONTEXT_CONTAINER = false; 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.EXPAND_DISTILLER_POST_ICON = false; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.USE_APPBAR_CONTEXT_CONTAINER = false; 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.EXPAND_DISTILLER_POST_ICON = false; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.USE_APPBAR_CONTEXT_CONTAINER = false; 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.EXPAND_DISTILLER_POST_ICON = false; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.USE_APPBAR_CONTEXT_CONTAINER = false; 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.EXPAND_DISTILLER_POST_ICON = false; V3_SETTINGS_CONF.APPBAR_GUIDE_IS_PART_OF_MASTHEAD_POSITIONER = true; V3_SETTINGS_CONF.USE_APPBAR_CONTEXT_CONTAINER = false; 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(i => { if(i){ let name = i[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/" && SRS.homeRedir.tValue !== "off"){ if(SRS.homeRedir.tValue=="feedGrid"){ window.location = "https://www.youtube.com/feed/what_to_watch/recommended?flow=grid"; }else{ window.location = "https://www.youtube.com/feed/what_to_watch/recommended"; } } var canGo = false; var html = $('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); }); } setTimeout(function(){ var elm = "#page span"; waitForElement500(elm).then(function(elm){ if(canGo != false){ var actualCode = '(' + function() { var yt=window.yt; } + ')();'; var script = document.createElement('script'); script.textContent = actualCode; (document.head||document.documentElement).appendChild(script); script.remove(); } }); },1000); // EXfunct2 function cond(con, thenDo, elseDo){ if(con){ thenDo(); }else{ elseDo(); } } function fillVideosDD(){ let currPage = 0; let currNumb = 0; let pageVid = 0; CWD.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($(".st-video-dd-trigger[disabled]")){ $(".st-video-dd-trigger").removeAttribute("disabled"); $(".st-video-dd-trigger .run").textContent = CWD.videoCount; $(".st-video-count").textContent = CWD.videoCount; $(".st-video-count-link").href = "/channel/" + CWD.channelId + "/videos?view=0"; $(".st-video-count-link").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: CWD.channelId, canonicalBaseUrl: "/channel/" + CWD.channelId + "/videos?view=0", params: "EgZ2aWRlb3PyBgQKAjoA" }, commandMetadata: { webCommandMetadata: { url: "/channel/" + CWD.channelId + "/videos?view=0" } } } } } } currNumb++; pageVid++; }); }); } function createLoadMore(token, list, renderer, currNumb){ let container; if(renderer=="videosTabCompactVideo"){ container=$("#watch-channel-videos"); } if(renderer=="videosPanelCompactVideo"){ container=$("#videos-panel [js-destination]"); } if(renderer=="altWatch9SCVid"){ container=$(".st-scroller-inner"); } 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 CWD[list][currNumb]; EXFetch("none","double","browse","browseId",CWD.channelId,"params","EgZ2aWRlb3PyBgQKAjoA","continuation",token).then(result => { if(result.onResponseReceivedActions){ let richGrid = result.onResponseReceivedActions[0].appendContinuationItemsAction.continuationItems; richGrid.forEach(i => { CWD[list].push(i); }); fillVideoList(list,renderer,"continuation",currNumb); } }); }); } function fillVideoList(list, renderer, purpose, prevNumb){ let currNumb = 0; CWD[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 = CWD.videoCount; $("#watch9-owner .owner-videos-scroller-head span").textContent = CWD.videoCount; } if($(".st-video-dd-trigger[disabled]")){ $(".st-video-dd-trigger").removeAttribute("disabled"); $(".st-video-dd-trigger .run").textContent = CWD.videoCount; $(".st-video-count").textContent = CWD.videoCount; $(".st-video-count-link").href = "/channel/" + CWD.channelId + "/videos?view=0"; $(".st-video-count-link").data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: CWD.channelId, canonicalBaseUrl: "/channel/" + CWD.channelId + "/videos?view=0", params: "EgZ2aWRlb3PyBgQKAjoA" }, commandMetadata: { webCommandMetadata: { url: "/channel/" + CWD.channelId + "/videos?view=0" } } } } } } } currNumb++; }); } function getCVPagination(){ CWD.paginatedCVList = [ {"page":[]}, {"page":[]}, {"page":[]}, {"page":[]}, {"page":[]} ]; let currNumb = 0; let currPage = 0; let page = { "page":[] }; CWD.channelVideosList.forEach(i => { if(i.continuationItemRenderer){ }else{ CWD.paginatedCVList[currPage].page.push(i); } currNumb++; if(currNumb == 6 || currNumb == 12 || currNumb == 18 || currNumb == 24){ currPage++; } }); if(SRS.watchLayout.tValue=="watch5c"||SRS.watchLayout.tValue=="watch5d"){ if($("#watch5-videos-dd")){ fillVideosDD(); }else{ var elm = "#watch5-videos-dd"; waitForElement10(elm).then(function(elm){ if(canGo != false){ fillVideosDD(); } }); } } if(SRS.watchLayout.tValue=="altWatch9"||SRS.watchLayout.tValue=="altWatch9Fancy"){ if(SRS.relatedTabs.tValue=="off"){ if($(".st-scroller-inner")){ fillVideoList("channelVideosList", "altWatch9SCVid"); }else{ var elm = ".st-scroller-inner"; waitForElement10(elm).then(function(elm){ if(canGo != false){ fillVideoList("channelVideosList", "altWatch9SCVid"); } }); } } } if(SRS.relatedTabs.tValue!=="off"||SRS.watchLayout.tValue=="watch4a"||SRS.watchLayout.tValue=="watch4b"||SRS.watchLayout.tValue=="watch4c"){ if($("#watch-channel-videos")){ fillVideoList("channelVideosList", "videosTabCompactVideo"); }else{ var elm = "#watch-channel-videos"; waitForElement10(elm).then(function(elm){ if(canGo != false){ fillVideoList("channelVideosList", "videosTabCompactVideo"); } }); } } if(SRS.watchLayout.tValue=="watch10"||SRS.watchLayout.tValue=="watch10teaser"||SRS.watchLayout.tValue=="watch10beta"||SRS.watchLayout.tValue=="watch9c"||SRS.watchLayout.tValue=="watch9b"||SRS.watchLayout.tValue=="watch9a"){ if($("#videos-panel")){ fillVideoList("channelVideosList", "videosPanelCompactVideo"); }else{ var elm = "#videos-panel"; waitForElement10(elm).then(function(elm){ if(canGo != false){ fillVideoList("channelVideosList", "videosPanelCompactVideo"); } }); } } } function getChannelVideosList(){ let navData = ""; if(navData == ""){ let navData = $("#watch7-user-header").data.watch7UserHeader.originalNavigationEndpoint; let theHref = navData.browseEndpoint.browseId; CWD.channelId = theHref; EXFetch("none","single","browse","browseId",theHref,"params","EgZ2aWRlb3PyBgQKAjoA").then(result => { CWD.aboutCont=result.header.pageHeaderRenderer.content.pageHeaderViewModel.description.descriptionPreviewViewModel.rendererContext.commandContext.onTap.innertubeCommand.showEngagementPanelEndpoint.engagementPanel.engagementPanelSectionListRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer.contents[0].continuationItemRenderer.continuationEndpoint.continuationCommand.token; if(CWD.joinedDate==null){ createChannelAbout(); } if(result.header.pageHeaderRenderer.content.pageHeaderViewModel.banner){ let banner=result.header.pageHeaderRenderer.content.pageHeaderViewModel.banner; if(banner.imageBannerViewModel){ let banners=banner.imageBannerViewModel.image.sources; CWD.banner=banners[0].url; CWD.bannerHQ=banners[banners.length-1].url; } } //CWD.APIvideoCount = result.header.pageHeaderRenderer.content.pageHeaderViewModel.metadata.contentMetadataViewModel.metadataRows[1].metadataParts[1].text.content; CWD.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; CWD.newestToken = chip[0].chipCloudChipRenderer.navigationEndpoint.continuationCommand.token; CWD.popularToken = chip[1].chipCloudChipRenderer.navigationEndpoint.continuationCommand.token; CWD.oldestToken = chip[2].chipCloudChipRenderer.navigationEndpoint.continuationCommand.token; } }else{ CWD.noChannelSort = true; $("body").setAttribute("channel-sort","false"); } CWD.channelVideosList = richGrid.contents; CWD.videoCount = CWD.APIvideoCount; getCVPagination(); }else{ $("body").setAttribute("channel-sort","false"); CWD.channelVideosList = "Invalid"; CWD.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(); if(STS.sbStyles==true){ sideWidth = sideWidth.width + 60; }else{ 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 getUpdatedMetadata(isLive){ //return new Promise((resolve, reject) => { CWD.shortViewCount="????"; EXFetch("none","nomod","next","videoId",CWD.id).then(result=>{ //console.log(result); let meta=result.contents.twoColumnWatchNextResults.results.results.contents; let modifier=0; if(meta[1].videoPrimaryInfoRenderer){ modifier=1; } let primary=meta[modifier].videoPrimaryInfoRenderer; let secondary=meta[modifier+1].videoSecondaryInfoRenderer; //let relDate="????"; if(primary.relativeDateText){ let relDate=primary.relativeDateText.simpleText; CWD.relativeDate=relDate; } if(CWD.shortViewCount=primary.viewCount.videoViewCountRenderer.shortViewCount){ let viewC=primary.viewCount.videoViewCountRenderer.shortViewCount.simpleText; CWD.shortViewCount=viewC.split(" v")[0]; }else if(primary.viewCount.videoViewCountRenderer.extraShortViewCount){ CWD.shortViewCount=primary.viewCount.videoViewCountRenderer.extraShortViewCount.simpleText; } if(CWD.pfp==null){ CWD.pfp=secondary.videoSecondaryInfoRenderer.owner.videoOwnerRenderer.thumbnail.thumbnails[0].url; } if(CWD.isLive==true){ let viewC=primary.viewCount.videoViewCountRenderer.viewCount.runs; CWD.viewCount=viewC[0].text+viewC[1].text; //CWD.viewCount=viewC.split(" v")[0]; CWD.date=primary.dateText.simpleText; } if(gdp.watchLayout!=="watch7"){ applyWatchMetadata(CWD); } //resolve("done"); }); //}); } function getWatchMetadata(x){ var elm="#watch7-user-header"; waitForElement(elm).then(function(elm){ if(canGo != false){ if(window.location.href.includes("/watch")){ if(CWD.id == null){ CWD.id=document.URL.split('v=')[1].split("&")[0]; } } if(window.location.href.includes("/shorts")){ if(CWD.id == null){ CWD.id=document.URL.split('/shorts/')[1].split("&")[0]; } } CWD.owner=$("#watch7-user-header").data.watch7UserHeader.userName.title.simpleText; CWD.pfp=$("#watch7-user-header").data.watch7UserHeader.userPhoto.thumbnails.thumbnails[0].url; let subBtn=$("#watch7-user-header").data.watch7UserHeader.subscribeButton; if(subBtn.subscribeButtonRenderer){ subBtn=subBtn.subscribeButtonRenderer; CWD.subCount=subBtn.subscriberCountText.simpleText; CWD.subbed=subBtn.subscribed; } let hasNotifs="personalized"; if (CWD.subbed==true){ let notifPopup=subBtn.notificationPreferenceButton.buttonRenderer.command.signalServiceEndpoint.actions[0].openPopupAction.popup.formPopupRenderer.form.menuPopupRenderer.items; if(notifPopup[0].menuServiceItemRenderer.isSelected==true){ hasNotifs="yes"; } if(notifPopup[2].menuServiceItemRenderer.isSelected==true){ hasNotifs="no"; } } CWD.hasNotifs=hasNotifs; let viewC=$("#watch7-user-header").data.watch7UserHeader.sentimentBar.continuationItemRenderer.placeholder.sentimentBarRenderer.viewCount; CWD.viewCount=viewC.split(" v")[0]; //CWD.isLive=$("#watch7-user-header").data.watch7UserHeader.sentimentBar.continuationItemRenderer.placeholder.sentimentBarRenderer.isLive; CWD.isLive=false; if($(".past_stream")==null&&$(".header .now")){ CWD.isLive=true; } CWD.pubDate=$("#watch-description-content").data.watchDescription.clip.videoDate.simpleText; let theDate=CWD.pubDate; CWD.date=theDate; CWD.dateMode="special"; let navData = $("#watch7-user-header").data.watch7UserHeader.originalNavigationEndpoint; let theHref = navData.browseEndpoint.browseId; CWD.channelId=theHref; if(theDate.includes("Published")||theDate.includes("Uploaded")){ CWD.date=theDate.split("on ")[1]; CWD.dateMode="normal"; } if(theDate.includes("January")){ CWD.superDate="January"+theDate.split("Jan")[1]; } if(theDate.includes("Feb")){ CWD.superDate="February"+theDate.split("Feb")[1]; } if(theDate.includes("Mar")){ CWD.superDate="March"+theDate.split("Mar")[1]; } if(theDate.includes("Apr")){ CWD.superDate="April"+theDate.split("Apr")[1]; } if(theDate.includes("Jun")){ CWD.superDate="June"+theDate.split("Jun")[1]; } if(theDate.includes("Jul")){ CWD.superDate="July"+theDate.split("Jul")[1]; } if(theDate.includes("Aug")){ CWD.superDate="August"+theDate.split("Aug")[1]; } if(theDate.includes("Sep")){ CWD.superDate="September"+theDate.split("Sep")[1]; } if(theDate.includes("Oct")){ CWD.superDate="October"+theDate.split("Oct")[1]; } if(theDate.includes("Nov")){ CWD.superDate="November"+theDate.split("Nov")[1]; } if(theDate.includes("Dec")){ CWD.superDate="December"+theDate.split("Dec")[1]; } let chanLink="/channel/"+theHref; CWD.channelLink=chanLink; CWD.videosLink=chanLink+"/videos"; CWD.channelNav={ abstractVorElement:{ navigationEndpoint:{ browseEndpoint:{ browseId:theHref, canonicalBaseUrl:"/channel/"+theHref }, commandMetadata: { webCommandMetadata: { url:"/channel/"+theHref } } } } } CWD.videosNav={ abstractVorElement:{ navigationEndpoint:{ browseEndpoint:{ browseId:theHref, canonicalBaseUrl:"/channel/"+theHref+"/videos", params:"EgZ2aWRlb3PyBgQKAjoA" }, commandMetadata: { webCommandMetadata: { url:"/channel/"+theHref+"/videos" } } } } } CWD.videosNav2={ abstractVorElement:{ navigationEndpoint:{ browseEndpoint:{ browseId:theHref, canonicalBaseUrl:"/channel/"+theHref+"/videos?view=0", params:"EgZ2aWRlb3PyBgQKAjoA" }, commandMetadata: { webCommandMetadata: { url:"/channel/"+theHref+"/videos?view=0" } } } } } CWD.descSnippet=$("#eow-description").innerHTML; let sent=$("#watch7-user-header").data.watch7UserHeader.sentimentBar.continuationItemRenderer.placeholder.sentimentBarRenderer; CWD.avgRating=sent.averageRating; CWD.sentimentState=sent.sentimentState; let rate=Number(sent.averageRating); let simpRate; if(sent.averageRating==5){ simpRate=5; }else if(sent.averageRating>=4.5){ simpRate=4.5; }else if(sent.averageRating>=4){ simpRate=4.0; }else if(sent.averageRating>=3.5){ simpRate=3.5; }else if(sent.averageRating>=3){ simpRate=3.0; }else if(sent.averageRating>=2.5){ simpRate=2.5; }else if(sent.averageRating>=2){ simpRate=2.0; }else if(sent.averageRating>=1.5){ simpRate=1.5; }else if(sent.averageRating>=1){ simpRate=1.0; }else if(sent.averageRating>=0.5){ simpRate=0.5; }else if(sent.averageRating>=0){ simpRate=0.0; } CWD.starRating=simpRate; if(sent.dislikeCount!==null){ let lC=sent.likeCount; let dC=sent.dislikeCount; CWD.ratingCount=numberWithCommas(lC+dC); CWD.likeCount=numberWithCommas(lC); CWD.dislikeCount=numberWithCommas(dC); }else{ CWD.ratingCount="0"; CWD.likeCount="0"; CWD.dislikeCount="0"; } let ltod=$("#watch7-action-buttons").data.watch7ActionButtons.sentimentActions.buttonGroupRenderer.contents; let likeBtn=ltod[0].toggleButtonRenderer; let dislikeBtn=ltod[1].toggleButtonRenderer; CWD.likeParams=likeBtn.defaultServiceEndpoint.commandExecutorCommand.commands[1].likeEndpoint.likeParams; CWD.unlikeParams=likeBtn.toggledServiceEndpoint.commandExecutorCommand.commands[1].likeEndpoint.removeLikeParams; CWD.dislikeParams=dislikeBtn.defaultServiceEndpoint.commandExecutorCommand.commands[1].likeEndpoint.dislikeParams; CWD.undislikeParams=dislikeBtn.toggledServiceEndpoint.commandExecutorCommand.commands[1].likeEndpoint.removeLikeParams; applyWatchMetadata(CWD); if(CWD.isLive==true||CWD.shortViewCount==null){ getUpdatedMetadata(CWD.isLive); if(CWD.isLive==true){ var interval=setInterval(function(){ getUpdatedMetadata(CWD.isLive); },5000); } } } }); } function createChannelAbout(){ EXFetch("none","single","browse","browseId",CWD.channelId,"continuation",CWD.aboutCont).then(result => { CWD.channelDesc="No description available."; let subCount = "0"; let videoCount = "0"; let viewCount = "0"; CWD.joinedDate="Joined July 7, 1992 1"; let chanNavEnd = ""; let videosNavEnd = ""; if(result.onResponseReceivedEndpoints[0].appendContinuationItemsAction.continuationItems[0].aboutChannelRenderer.metadata.aboutChannelViewModel.description!=null){ let desc=result.onResponseReceivedEndpoints[0].appendContinuationItemsAction.continuationItems[0].aboutChannelRenderer.metadata.aboutChannelViewModel.description; CWD.channelDesc=desc.replace(/\n/g,"
    "); } if(result.onResponseReceivedEndpoints[0].appendContinuationItemsAction.continuationItems[0].aboutChannelRenderer.metadata.aboutChannelViewModel.subscriberCountText != null){ subCount = result.onResponseReceivedEndpoints[0].appendContinuationItemsAction.continuationItems[0].aboutChannelRenderer.metadata.aboutChannelViewModel.subscriberCountText; } videoCount = result.onResponseReceivedEndpoints[0].appendContinuationItemsAction.continuationItems[0].aboutChannelRenderer.metadata.aboutChannelViewModel.videoCountText; viewCount = result.onResponseReceivedEndpoints[0].appendContinuationItemsAction.continuationItems[0].aboutChannelRenderer.metadata.aboutChannelViewModel.viewCountText; CWD.joinedDate=result.onResponseReceivedEndpoints[0].appendContinuationItemsAction.continuationItems[0].aboutChannelRenderer.metadata.aboutChannelViewModel.joinedDateText.content; CWD.channelSubCount=subCount.split('s')[0]; CWD.channelVideoCount=videoCount.split('v')[0]; CWD.channelViewCount=viewCount.split(' v')[0]; applyWatchMetadata(CWD); }); } function moveWatchElements(){ let tM; let nH; if($("#watch7-secondary-actions .hid.yt-uix-button:nth-child(4)")){ CWD.hasTranscript=false; $("body .v3").setAttribute("has-ts","false"); }else{ CWD.hasTranscript=true; $("body .v3").setAttribute("has-ts","true"); } if(STS.expWatch9NoOwner==true&&$(".st-watch-owner-column")){ $(".st-watch-owner-column").remove(); $("#st-watch-below-container").setAttribute("no-owner","true"); }else{ $("#st-watch-below-container").setAttribute("no-owner","false"); } if($(".st-title")){ tM=$("#watch7-headline"); nH=$(".st-title"); nH.append(tM); } if($(".st-ltod-bar")){ tM=$(".video-extras-sparkbars"); nH=$(".st-ltod-bar"); nH.append(tM); tM=$(".video-extras-likes-dislikes"); nH.append(tM); } if($(".st-ltod-buttons")){ tM=$("#watch7-sentiment-actions"); nH=$(".st-ltod-buttons"); nH.append(tM); } if($(".st-sub-button")){ if(SRS.watchLayout.tValue!="watch7"&&SRS.watchLayout.tValue!="watch7beta"){ tM=$("#watch7-content #watch7-subscription-container"); nH=$(".st-sub-button"); nH.append(tM); } } if(SRS.watchLayout.tValue=="altWatch9"||SRS.watchLayout.tValue=="altWatch9Fancy"){ if(STS.expWatch9TrueExpander==true){ tM=$("#watch-description"); nH=$(".st-desc-snippet-content"); nH.append(tM); }else{ tM=$("#watch-description"); nH=$(".st-desc-content"); nH.append(tM); } }else if($(".st-desc-content")){ tM=$("#watch-description"); nH=$(".st-desc-content"); nH.append(tM); } if(SRS.watchLayout.tValue!=="watch7"&&SRS.watchLayout.tValue!=="watch7beta"){ $("#watch7-secondary-actions .yt-uix-button:nth-child(2)").click(); $("#watch7-secondary-actions .yt-uix-button:nth-child(3)").click(); $("#watch7-secondary-actions .yt-uix-button:nth-child(4)").click(); $("#watch7-secondary-actions .yt-uix-button:nth-child(5)").click(); if($("#watch7-secondary-actions .yt-uix-button:nth-child(6)")){ $("#watch7-secondary-actions .yt-uix-button:nth-child(6)").click(); } } if($(".st-share-content")){ tM=$("#action-panel-share"); nH=$(".st-share-content"); nH.insertBefore(tM,nH.children[0]); } if($(".st-addto-content")){ tM=$("#action-panel-addto"); nH=$(".st-addto-content"); nH.insertBefore(tM,nH.children[0]); } if($(".st-stats-content")){ tM=$("#action-panel-stats"); nH=$(".st-stats-content"); nH.insertBefore(tM,nH.children[0]); } if($(".st-report-content")){ tM=$("#action-panel-report"); nH=$(".st-report-content"); nH.insertBefore(tM,nH.children[0]); } if($("[wl^='w9'] .st-transcript-content")||$("[wl^='w10'] .st-transcript-content")){ tM=$("#action-panel-transcript"); nH=$(".st-side-panel .st-transcript-content"); nH.insertBefore(tM,nH.children[0]); } if($(".st-transcript-content")){ tM=$("#action-panel-transcript"); nH=$(".st-transcript-content"); nH.insertBefore(tM,nH.children[0]); } if(SRS.watchLayout.tValue=="watch8"||SRS.watchLayout.tValue=="watch9a"||SRS.watchLayout.tValue=="watch9b"||SRS.watchLayout.tValue=="watch9c"||SRS.watchLayout.tValue=="watch10beta"||SRS.watchLayout.tValue=="watch10teaser"||SRS.watchLayout.tValue=="watch10"){ tM=$("#watch-description-extra-info"); nH=$("#watch-description-clip"); nH.insertBefore(tM,nH.children[2]); } if($(".st-owner-name")){ if(SRS.watchLayout.tValue!="watch7"&&SRS.watchLayout.tValue!="watch7beta"){ tM=$("#watch7-main .yt-user-name"); nH=$(".st-owner-name"); nH.insertBefore(tM,nH.children[0]); } } setTimeout(function(){ if($("#watch-related-holder .watch-sidebar-section")==null&&$("#watch7-sidebar-contents > .watch-sidebar-section")){ if(SRS.watchLayout.tValue=="watch4a"||SRS.watchLayout.tValue=="watch4b"||SRS.watchLayout.tValue=="watch4c"){ if($(".live_chat_box_iframe_holder")){ tM=document.querySelectorAll("#watch7-sidebar-contents > .watch-sidebar-section")[1]; nH=$("#watch-related-holder"); nH.insertBefore(tM,nH.children[0]); tM=document.querySelectorAll("#watch7-sidebar-contents > .watch-sidebar-section")[1]; nH=$("#watch-related-holder"); nH.insertBefore(tM,nH.children[1]); if($("#watch7-sidebar-contents > .watch-sidebar-section")){ tM=$("#watch7-sidebar-contents > .watch-sidebar-section"); nH=$("#watch-chat-holder"); nH.insertBefore(tM,nH.children[2]); } $("#st-chat-panel").classList.remove("hid"); }else{ tM=$("#watch7-sidebar-contents > .watch-sidebar-section"); nH=$("#watch-related-holder"); nH.insertBefore(tM,nH.children[0]); if($("#watch7-sidebar-contents > .watch-sidebar-section")){ tM=$("#watch7-sidebar-contents > .watch-sidebar-section"); nH.insertBefore(tM,nH.children[1]); } } $("#st-related-panel").classList.remove("hid"); $("#st-videos-panel").classList.remove("hid"); } } },500); if(SRS.watchLayout.tValue=="watch4b"||SRS.watchLayout.tValue=="watch4c"){ $(".st-owner .st-sub-count").classList.add("hid"); $(".st-owner .st-upload-date").classList.remove("hid"); } if(SRS.watchLayout.tValue=="watch10beta"||SRS.watchLayout.tValue=="watch10teaser"||SRS.watchLayout.tValue=="watch10"){ tM=$(".st-desc-views-info"); nH=$("#eow-description"); nH.insertBefore(tM,nH.children[0]); } if($(".st-owner-icon")){ if($(".yt-user-name-icon-verified")){ tM=$(".yt-user-name-icon-verified"); nH=$(".st-owner-icon"); nH.insertBefore(tM,nH.children[0]); } if($(".yt-user-name-icon-autogenerated")){ tM=$(".yt-user-name-icon-autogenerated"); nH=$(".st-owner-icon"); nH.insertBefore(tM,nH.children[0]); } } if($(".st-watch-extras")&&$("[wl^='aw9']")){ tM=$("#watch-description-extras"); nH=$(".st-watch-extras"); nH.append(tM); tM=$("#watch-description-extra-info"); nH.append(tM); } if(SRS.relatedTabs.tValue=="onNoSub"){ $("#st-side-owner-row .st-owner-name-spec.hid").classList.remove("hid"); } if(SRS.relatedTabs.tValue=="on"){ if(SRS.watchLayout.tValue!="altWatch9"&&SRS.watchLayout.tValue!="altWatch9Fancy"){ let tM=$("#watch7-content #watch7-subscription-container"); let nH=$("#st-side-owner-row .st-sub-button"); nH.append(tM); $("#st-side-owner-row .st-owner-name-spec.hid").classList.remove("hid"); } } } function returnWatchElements(){ let tM; let nH; if($(".st-title #watch7-headline")){ tM=$(".st-title #watch7-headline"); nH=$("#content #watch7-content"); nH.append(tM); } if($(".st-sub-button #watch7-subscription-container")){ tM=$(".st-sub-button #watch7-subscription-container"); nH=$("#content #watch7-content"); nH.append(tM); } } // MOVE UP function EXcreate(mod,container,tag,id,classList,temp,numb,attrName,attrValue,attr2Name,attr2Value){ let cont=$(container); let nE=document.createElement(tag); nE.id=id; nE.setAttribute("class",classList); nE.innerHTML=temp; cont.insertBefore(nE,cont.children[numb]); return nE; } function doWatchVariables(){ if(SRS.watchLayout.tValue=="watch5a"||SRS.watchLayout.tValue=="watch5b"||SRS.watchLayout.tValue=="watch5d"){ if( SRS.layoutSelect.tValue=="cosmic2012_1"|| SRS.layoutSelect.tValue=="cosmic2012_2"|| SRS.layoutSelect.tValue=="cosmic2012_3"|| SRS.layoutSelect.tValue=="epic2012_1"|| SRS.layoutSelect.tValue=="epic2012_2" ){ if($(".st-sub-button")){ $(".st-sub-button").classList.add("st-cosmic-watch-sub"); } $("#watch7-subscription-container").classList.add("st-cosmic-watch-sub"); } } if(SRS.watchLayout.tValue=="watch9a"){ if($(".st-sub-button")){ $(".st-sub-button").classList.add("st-poly-sub"); } $("#watch7-subscription-container").classList.add("st-poly-sub"); if( SRS.layoutSelect.tValue=="amst2024c"|| SRS.layoutSelect.tValue=="amst2023_1" ){ if($(".st-sub-button")){ $(".st-sub-button").classList.add("st-round-sub"); } $("#watch7-subscription-container").classList.add("st-round-sub"); } if( SRS.layoutSelect.tValue=="sb2016" ){ if($(".st-sub-button")){ $(".st-sub-button").classList.add("st-skybird-sub"); } $("#watch7-subscription-container").classList.add("st-skybird-sub"); } } if(SRS.watchLayout.tValue=="watch9b"||SRS.watchLayout.tValue=="watch9c"||SRS.watchLayout.tValue=="watch10beta"||SRS.watchLayout.tValue=="watch10teaser"||SRS.watchLayout.tValue=="watch10"){ if($(".st-sub-button")){ $(".st-sub-button").classList.add("st-poly-sub"); $(".st-sub-button").classList.add("st-poly-g2-sub"); } $("#watch7-subscription-container").classList.add("st-poly-sub"); $("#watch7-subscription-container").classList.add("st-poly-g2-sub"); if( SRS.layoutSelect.tValue=="poly2020"|| SRS.layoutSelect.tValue=="poly2021"|| SRS.layoutSelect.tValue=="poly2022"|| STS.expPolymerGen2Subscribe==true ){ if($(".st-sub-button")){ $(".st-sub-button").classList.add("st-poly-g2-sub"); } $("#watch7-subscription-container").classList.add("st-poly-g2-sub"); } if( SRS.layoutSelect.tValue=="amst2024c"|| SRS.layoutSelect.tValue=="amst2023_1" ){ if($(".st-sub-button")){ $(".st-sub-button").classList.add("st-round-sub"); } $("#watch7-subscription-container").classList.add("st-round-sub"); } if( SRS.layoutSelect.tValue=="sb2016" ){ if($(".st-sub-button")){ $(".st-sub-button").classList.add("st-skybird-sub"); } $("#watch7-subscription-container").classList.add("st-skybird-sub"); } } if(SRS.watchLayout.tValue=="watch4a"||SRS.watchLayout.tValue=="watch4b"||SRS.watchLayout.tValue=="watch4c"||SRS.watchLayout.tValue=="watch5a"||SRS.watchLayout.tValue=="watch5b"||SRS.watchLayout.tValue=="watch5c"||SRS.watchLayout.tValue=="watch7"||SRS.watchLayout.tValue=="watch8"||SRS.watchLayout.tValue=="altWatch9"||SRS.watchLayout.tValue=="altWatch9Fancy"){ if( SRS.layoutSelect.tValue=="hhE2015"|| SRS.layoutSelect.tValue=="hh2015"|| SRS.layoutSelect.tValue=="hhE2016"|| SRS.layoutSelect.tValue=="hhM2016"|| SRS.layoutSelect.tValue=="hh2016"|| SRS.layoutSelect.tValue=="hhE2017"|| SRS.layoutSelect.tValue=="hh2017"|| SRS.layoutSelect.tValue=="hh2018"|| SRS.layoutSelect.tValue=="hh2024"|| SRS.layoutSelect.tValue=="sb2016"|| SRS.layoutSelect.tValue=="poly2016"|| SRS.layoutSelect.tValue=="polyE2017"|| SRS.layoutSelect.tValue=="poly2017"|| SRS.layoutSelect.tValue=="poly2018"|| SRS.layoutSelect.tValue=="poly2019"|| SRS.layoutSelect.tValue=="poly2020"|| SRS.layoutSelect.tValue=="poly2021"|| SRS.layoutSelect.tValue=="poly2022"|| SRS.layoutSelect.tValue=="amst2024c" ){ if($(".st-sub-button")){ $(".st-sub-button").classList.add("st-modern-sub"); } $("#watch7-subscription-container").classList.add("st-modern-sub"); }else if( SRS.layoutSelect.tValue=="hh2013_1" ){ if($(".st-sub-button")){ $(".st-sub-button").classList.add("st-classic-sub"); } $("#watch7-subscription-container").classList.add("st-classic-sub"); }else if( SRS.layoutSelect.tValue=="hh2013_3"|| SRS.layoutSelect.tValue=="hh2014"|| SRS.layoutSelect.tValue=="hh2013alt_3"|| SRS.layoutSelect.tValue=="hh2014alt_1" ){ if($(".st-sub-button")){ $(".st-sub-button").classList.add("st-skinny-sub"); } $("#watch7-subscription-container").classList.add("st-skinny-sub"); } else if( SRS.layoutSelect.tValue=="stargazer2008_1"|| SRS.layoutSelect.tValue=="stargazer2009_1"|| SRS.layoutSelect.tValue=="stargazer2009_2"|| SRS.layoutSelect.tValue=="stargazer2009_3" ){ if($(".st-sub-button")){ $(".st-sub-button").classList.add("st-stargazer-sub"); } $("#watch7-subscription-container").classList.add("st-stargazer-sub"); }else if( SRS.layoutSelect.tValue=="aozora2011_3"|| SRS.layoutSelect.tValue=="aozora2011_2"|| SRS.layoutSelect.tValue=="aozora2011_1"|| SRS.layoutSelect.tValue=="aozora2010_1" ){ if($(".st-sub-button")){ $(".st-sub-button").classList.add("st-aozora-sub"); } $("#watch7-subscription-container").classList.add("st-aozora-sub"); } } } function createWatchActions(){ let mS=$(".st-watch-multistate"); if($("#watch-like svg")==null){ let cont=$("#watch-like .yt-uix-button-icon-wrapper"); let nE=document.createElement("div"); nE.classList.add("st-svg"); nE.innerHTML=STH0.SVG_TOG; cont.insertBefore(nE,cont.children[0]); nE.querySelector(".filled-icon path").setAttribute("d",svgDefs.like.f); nE.querySelector(".outline-icon path").setAttribute("d",svgDefs.like.o); nE.querySelector(".active-icon path").setAttribute("d",svgDefs.like.oa); } if($("#watch-dislike svg")==null){ let cont=$("#watch-dislike .yt-uix-button-icon-wrapper"); let nE=document.createElement("div"); nE.classList.add("st-svg"); nE.innerHTML=STH0.SVG_TOG; cont.insertBefore(nE,cont.children[0]); nE.querySelector(".filled-icon path").setAttribute("d",svgDefs.dislike.f); nE.querySelector(".outline-icon path").setAttribute("d",svgDefs.dislike.o); nE.querySelector(".active-icon path").setAttribute("d",svgDefs.like.oa); } if($(".st-report-trigger-2")){ let nE=$(".st-report-trigger-2"); nE.querySelector(".filled-icon path").setAttribute("d",svgDefs.report.f); nE.querySelector(".outline-icon path").setAttribute("d",svgDefs.report.o); nE=$(".st-transcript-trigger-2"); nE.querySelector(".filled-icon path").setAttribute("d",svgDefs.transcript.f); nE.querySelector(".outline-icon path").setAttribute("d",svgDefs.transcript.o); } if($(".st-addto-button-holder")){ let btn=$(".st-addto-button-holder"); btn.innerHTML=STH2.STARDUST_BTN; btn=btn.querySelector("button"); btn.id="st-addto-button"; btn.querySelector(".st-btn-text").textContent="Add to"; if(gdp.watchLayout=="watch8"){ btn.classList.add("st-addto-floater-trigger"); }else{ btn.classList.add("st-addto-trigger"); } btn.setAttribute("data-tooltip-text","Add to"); btn.querySelector(".st-svg").innerHTML=STH0.SVG; btn.querySelector(".filled-icon path").setAttribute("d",svgDefs.addTo.f); btn.querySelector(".outline-icon path").setAttribute("d",svgDefs.addTo.o); if(SRS.layoutSelect.tValue=="cosmic2012_1"||SRS.watchLayout.tValue=="watch5a"||SRS.watchLayout.tValue=="watch5b"||SRS.watchLayout.tValue=="watch5c"){ btn.querySelector(".st-btn-after-icon").classList.remove("hid"); btn.querySelector(".st-btn-after-icon").classList.add("yt-uix-button-arrow"); } } if($(".st-share-button-holder")){ let btn=$(".st-share-button-holder"); btn.innerHTML=STH2.STARDUST_BTN; btn=btn.querySelector("button"); btn.id="st-share-button"; btn.querySelector(".st-btn-text").textContent="Share"; btn.classList.add("st-share-trigger"); btn.setAttribute("data-tooltip-text","Share"); btn.querySelector(".st-svg").innerHTML=STH0.SVG; btn.querySelector(".filled-icon path").setAttribute("d",svgDefs.share.f); btn.querySelector(".outline-icon path").setAttribute("d",svgDefs.share.o); } if($(".st-save-button-holder")){ let btn=$(".st-save-button-holder"); btn.innerHTML=STH2.STARDUST_BTN; btn=btn.querySelector("button"); btn.id="st-save-button"; btn.querySelector(".st-btn-text").textContent="Save"; if(gdp.watchLayout=="watch8"||gdp.watchLayout=="watch9a"||gdp.watchLayout=="watch9b"||gdp.watchLayout=="watch9c"){ btn.classList.add("st-addto-floater-trigger"); }else{ btn.classList.add("st-addto-trigger"); } btn.setAttribute("data-tooltip-text","Save"); btn.querySelector(".st-svg").innerHTML=STH0.SVG; btn.querySelector(".filled-icon path").setAttribute("d",svgDefs.save.f); btn.querySelector(".outline-icon path").setAttribute("d",svgDefs.save.o); btn.addEventListener("click",function(){ if($("[state='addto']")){ mS.setAttribute("state","normal"); }else{ mS.setAttribute("state","addto"); } }); } if($(".st-transcript-button-holder")){ let btn=$(".st-transcript-button-holder"); btn.innerHTML=STH2.STARDUST_BTN; btn=btn.querySelector("button"); btn.id="st-transcript-button"; btn.querySelector(".st-btn-text").textContent="Transcript"; btn.classList.add("st-transcript-trigger"); btn.setAttribute("data-tooltip-text","Transcript"); } if($(".st-report-button-holder")){ let btn=$(".st-report-button-holder"); btn.innerHTML=STH2.STARDUST_BTN; btn=btn.querySelector("button"); btn.id="st-report-button"; btn.querySelector(".st-btn-text").textContent="Report"; btn.classList.add("st-report-trigger"); btn.setAttribute("data-tooltip-text","Report"); } if($(".st-stats-button-holder")){ let btn=$(".st-stats-button-holder"); btn.innerHTML=STH2.STARDUST_BTN; btn=btn.querySelector("button"); btn.id="st-stats-button"; btn.querySelector(".st-btn-text").textContent="Statistics"; btn.classList.add("st-stats-trigger"); btn.setAttribute("data-tooltip-text","Statistics"); } if($(".st-more-button-holder")){ let btn=$(".st-more-button-holder"); btn.innerHTML=STH2.STARDUST_BTN; btn=btn.querySelector("button"); btn.id="st-more-button"; if(gdp.watchLayout=="watch8"||gdp.watchLayout=="watch9a"||gdp.watchLayout=="watch9b"||gdp.watchLayout=="watch9c"||gdp.watchLayout=="watch10beta"||gdp.watchLayout=="watch10teaser"||gdp.watchLayout=="watch10"){ btn.classList.add("st-more-floater-trigger"); } btn.querySelector(".st-btn-text").textContent="More"; btn.setAttribute("data-tooltip-text","More actions"); btn.querySelector(".st-svg").innerHTML=STH0.SVG; btn.querySelector(".filled-icon svg").innerHTML=` `; btn.querySelector(".outline-icon path").setAttribute("d",svgDefs.more.o); } if($("#st-comments-panel .st-side-panel-close svg")){ let icon=$("#st-comments-panel .st-side-panel-close"); icon.querySelector(".filled-icon path").setAttribute("d",svgDefs.x.f); icon.querySelector(".outline-icon path").setAttribute("d",svgDefs.x.o); icon=$("#st-transcript-panel .st-side-panel-close"); icon.querySelector(".filled-icon path").setAttribute("d",svgDefs.x.f); icon.querySelector(".outline-icon path").setAttribute("d",svgDefs.x.o); $("#st-videos-panel").classList.add("hid"); $("#st-about-panel").classList.add("hid"); $("#st-transcript-panel").classList.add("hid"); } if($(".st-teaser svg")){ let icon=$(".st-teaser .st-svg"); icon.querySelector(".filled-icon path").setAttribute("d",svgDefs.rChev.f); icon.querySelector(".outline-icon path").setAttribute("d",svgDefs.rChev.o); $("#st-videos-panel").classList.add("hid"); $("#st-about-panel").classList.add("hid"); } if($(".st-watch-trigger")){ document.querySelectorAll(".st-watch-trigger").forEach(i=>{ i.addEventListener("click",function(){ let trigger=i.getAttribute("trigger"); if(!i.classList.contains("st-trigger-no-style")){ if($(".st-watch-trigger:not([trigger='"+trigger+"']).active")){ $(".st-watch-trigger:not([trigger='"+trigger+"']).active").classList.remove("active"); } if(i.classList.contains("active")&&!i.classList.contains("st-tab-trigger")){ i.classList.remove("active"); }else{ i.classList.add("active"); } }else{ $(".st-watch-trigger:not(.st-trigger-no-style).active").classList.remove("active"); $("[trigger='"+trigger+"']").classList.add("active"); } if($("[state='"+trigger+"']")&&!i.classList.contains("st-tab-trigger")){ mS.setAttribute("state","normal"); }else{ mS.setAttribute("state",trigger); } if($(".st-slider.active")){ $(".st-slider.active").classList.remove("active"); $("#"+trigger+"-slider").classList.add("active"); setTimeout(function(){ let height=$("#"+trigger+"-slider > div").offsetHeight; $(".st-watch-slider").style.height=height+"px"; $("body .v3").style.setProperty("--slider-height",height+"px"); },10); } }); }); } if($(".st-video-dd-trigger")){ $(".st-video-dd-trigger").addEventListener("click",function(){ if($(".st-video-dd-trigger.yt-uix-button-toggled")){ $(".st-video-dd-trigger.yt-uix-button-toggled").classList.remove("yt-uix-button-toggled"); $("#st-watch-below").setAttribute("videos-dd","off"); $("#st-watch-above").setAttribute("videos-dd","off"); if($("#st-above-owner-row")){ changeTitleOnTopHeight(); } }else{ $(".st-video-dd-trigger").classList.add("yt-uix-button-toggled"); $("#st-watch-below").setAttribute("videos-dd","on"); $("#st-watch-above").setAttribute("videos-dd","on"); if($("#st-above-owner-row")){ changeTitleOnTopHeight(); } } if($("#st-slider-row")){ setTimeout(function(){ let trigger=$("#st-watch-below").getAttribute("state"); let height=$("#"+trigger+"-slider > div").offsetHeight; $(".st-watch-slider").style.height=height+"px"; $("body .v3").style.setProperty("--slider-height",height+"px"); },10); } }); } if($(".st-share-trigger")){ $(".st-share-trigger").addEventListener("click",function(){ if($(".st-btn:not(.st-share-trigger).active")){ $(".st-btn:not(.st-share-trigger).active").classList.remove("active"); } if($(".st-watch-tab:not(.st-share-trigger).active")){ $(".st-watch-tab:not(.st-share-trigger).active").classList.remove("active"); } if($(".st-share-trigger.active")){ $(".st-share-trigger").classList.remove("active"); }else{ $(".st-share-trigger").classList.add("active"); } if($("[state='share']")){ mS.setAttribute("state","normal"); }else{ mS.setAttribute("state","share"); } }); } if($(".st-addto-trigger")){ $(".st-addto-trigger").addEventListener("click",function(){ if($(".st-btn:not(.st-addto-trigger).active")){ $(".st-btn:not(.st-addto-trigger).active").classList.remove("active"); } if($(".st-watch-tab:not(.st-addto-trigger).active")){ $(".st-watch-tab:not(.st-addto-trigger).active").classList.remove("active"); } if($(".st-addto-trigger.active")){ $(".st-addto-trigger").classList.remove("active"); }else{ $(".st-addto-trigger").classList.add("active"); } if($("[state='addto']")){ mS.setAttribute("state","normal"); }else{ mS.setAttribute("state","addto"); } }); } if($(".st-addto-floater-trigger")){ $(".st-addto-floater-trigger").addEventListener("click",function(){ if($(".st-addto-floater-trigger.active")){ $(".st-addto-floater-trigger").classList.remove("active"); }else{ $(".st-addto-floater-trigger").classList.add("active"); } if($(".st-addto-floater.visible")){ $(".st-addto-floater").classList.remove("visible"); }else{ $(".st-addto-floater").classList.add("visible"); } if($(".st-floater-fence.visible")){ $(".st-floater-fence").classList.remove("visible"); $("body").classList.remove("st-no-scroll"); }else{ $(".st-floater-fence").classList.add("visible"); $("body").classList.add("st-no-scroll"); } floaterPosition(); }); } if($(".st-more-floater-trigger")){ $(".st-more-floater-trigger").addEventListener("click",function(){ if($(".st-more-floater-trigger.active")){ $(".st-more-floater-trigger").classList.remove("active"); }else{ $(".st-more-floater-trigger").classList.add("active"); } if($(".st-more-floater.visible")){ $(".st-more-floater").classList.remove("visible"); }else{ $(".st-more-floater").classList.add("visible"); } if($(".st-floater-fence.visible")){ $(".st-floater-fence").classList.remove("visible"); $("body").classList.remove("st-no-scroll"); }else{ $(".st-floater-fence").classList.add("visible"); $("body").classList.add("st-no-scroll"); } floaterPosition(); }); } if($(".st-video-info-trigger")){ $(".st-video-info-trigger").addEventListener("click",function(){ if($(".st-btn:not(.st-video-info-trigger).active")){ $(".st-btn:not(.st-video-info-trigger).active").classList.remove("active"); } if($(".st-watch-tab:not(.st-video-info-trigger).active")){ $(".st-watch-tab:not(.st-video-info-trigger).active").classList.remove("active"); } if($(".st-video-info-trigger.active")){ $(".st-video-info-trigger").classList.remove("active"); }else{ $(".st-video-info-trigger").classList.add("active"); } if($("[state='video-info']")){ mS.setAttribute("state","normal"); }else{ mS.setAttribute("state","video-info"); } }); } if($(".st-desc-trigger")){ $(".st-desc-trigger").addEventListener("click",function(){ if($(".st-btn:not(.st-desc-trigger).active")){ $(".st-btn:not(.st-desc-trigger).active").classList.remove("active"); } if($(".st-desc-trigger.active")){ $(".st-desc-trigger").classList.remove("active"); }else{ $(".st-desc-trigger").classList.add("active"); } if($("[state='desc']")){ mS.setAttribute("state","normal"); }else{ mS.setAttribute("state","desc"); } }); } if($(".st-report-trigger")){ $(".st-report-trigger").addEventListener("click",function(){ if($(".st-btn:not(.st-report-trigger).active")){ $(".st-btn:not(.st-report-trigger).active").classList.remove("active"); } if($(".st-watch-tab:not(.st-report-trigger).active")){ $(".st-watch-tab:not(.st-report-trigger).active").classList.remove("active"); } if($(".st-report-trigger.active")){ $(".st-report-trigger").classList.remove("active"); }else{ $(".st-report-trigger").classList.add("active"); } if($("[state='report']")){ mS.setAttribute("state","normal"); }else{ mS.setAttribute("state","report"); } }); } if($(".st-report-trigger-2")){ $(".st-report-trigger-2").addEventListener("click",function(){ if($(".st-btn:not(.st-report-trigger).active")){ $(".st-btn:not(.st-report-trigger).active").classList.remove("active"); } if($(".st-report-trigger.active")){ $(".st-report-trigger").classList.remove("active"); }else if($(".st-report-trigger")){ $(".st-report-trigger").classList.add("active"); } if($(".st-more-floater-trigger.active")){ $(".st-more-floater-trigger").classList.remove("active"); } if($(".st-more-floater.visible")){ $(".st-more-floater").classList.remove("visible"); } if($("[state='report']")){ mS.setAttribute("state","normal"); }else{ mS.setAttribute("state","report"); } if($(".st-floater-fence.visible")){ $(".st-floater-fence").classList.remove("visible"); $("body").classList.remove("st-no-scroll"); } }); } if($(".st-transcript-trigger")){ $(".st-transcript-trigger").addEventListener("click",function(){ if($(".st-btn:not(.st-transcript-trigger).active")){ $(".st-btn:not(.st-transcript-trigger).active").classList.remove("active"); } if($(".st-transcript-trigger.active")){ $(".st-transcript-trigger").classList.remove("active"); }else{ $(".st-transcript-trigger").classList.add("active"); } if($("[state='transcript']")){ mS.setAttribute("state","normal"); }else{ mS.setAttribute("state","transcript"); } }); } if($(".st-transcript-trigger-2")){ $(".st-transcript-trigger-2").addEventListener("click",function(){ if($(".st-btn:not(.st-transcript-trigger).active")){ $(".st-btn:not(.st-transcript-trigger).active").classList.remove("active"); } if($(".st-more-floater-trigger.active")){ $(".st-more-floater-trigger").classList.remove("active"); } if($(".st-more-floater.visible")){ $(".st-more-floater").classList.remove("visible"); } if(SRS.watchLayout.tValue=="watch8"){ if($("[state='transcript']")){ mS.setAttribute("state","normal"); }else{ mS.setAttribute("state","transcript"); } if($(".st-transcript-trigger.active")){ $(".st-transcript-trigger").classList.remove("active"); }else{ $(".st-transcript-trigger").classList.add("active"); } }else{ if($("#st-transcript-panel.hid")){ $("#st-transcript-panel").classList.remove("hid"); }else{ $("#st-transcript-panel").classList.add("hid"); } } if($(".st-floater-fence.visible")){ $(".st-floater-fence").classList.remove("visible"); $("body").classList.remove("st-no-scroll"); } }); } if($(".st-stats-trigger")){ $(".st-stats-trigger").addEventListener("click",function(){ if($(".st-btn:not(.st-stats-trigger).active")){ $(".st-btn:not(.st-stats-trigger).active").classList.remove("active"); } if($(".st-stats-trigger.active")){ $(".st-stats-trigger").classList.remove("active"); }else{ $(".st-stats-trigger").classList.add("active"); } if($("[state='stats']")){ mS.setAttribute("state","normal"); }else{ mS.setAttribute("state","stats"); } }); } if($(".st-stats-trigger-2")){ $(".st-stats-trigger-2").addEventListener("click",function(){ if($(".st-btn:not(.st-stats-trigger).active")){ $(".st-btn:not(.st-stats-trigger).active").classList.remove("active"); } if($(".st-stats-trigger.active")){ $(".st-stats-trigger").classList.remove("active"); }else{ $(".st-stats-trigger").classList.add("active"); } if($(".st-more-floater-trigger.active")){ $(".st-more-floater-trigger").classList.remove("active"); } if($(".st-more-floater.visible")){ $(".st-more-floater").classList.remove("visible"); } if($("[state='stats']")){ mS.setAttribute("state","normal"); }else{ mS.setAttribute("state","stats"); } if($(".st-floater-fence.visible")){ $(".st-floater-fence").classList.remove("visible"); $("body").classList.remove("st-no-scroll"); } }); } if($(".st-favorite-trigger")){ $(".st-favorite-trigger").addEventListener("click",function(){ if($(".st-btn:not(.st-favorite-trigger).active")){ $(".st-btn:not(.st-favorite-trigger).active").classList.remove("active"); } if($(".st-watch-tab:not(.st-favorite-trigger).active")){ $(".st-watch-tab:not(.st-favorite-trigger).active").classList.remove("active"); } if($(".st-favorite-trigger.active")){ $(".st-favorite-trigger").classList.remove("active"); }else{ $(".st-favorite-trigger").classList.add("active"); } if($("[state='favorite']")){ mS.setAttribute("state","normal"); }else{ mS.setAttribute("state","favorite"); } }); } if($(".st-floater-fence")){ $(".st-floater-fence").addEventListener("click",function(){ if($(".st-more-floater-trigger.active")){ $(".st-more-floater-trigger").classList.remove("active"); } if($(".st-addto-floater-trigger.active")){ $(".st-addto-floater-trigger").classList.remove("active"); } if($(".st-more-floater.visible")){ $(".st-more-floater").classList.remove("visible"); } if($(".st-addto-floater.visible")){ $(".st-addto-floater").classList.remove("visible"); } if($(".st-floater-fence.visible")){ $(".st-floater-fence").classList.remove("visible"); $("body").classList.remove("st-no-scroll"); } }); } if($(".st-popup-fence")){ $(".st-popup-fence").addEventListener("click",function(){ if($(".st-popup-fence.visible")){ mS.setAttribute("state","normal"); } }); } if($(".st-side-panel")){ document.querySelectorAll(".st-side-panel").forEach(i=>{ i.querySelector(".st-side-panel-expander").addEventListener("click",function(){ i.toggleAttribute("expanded"); }); }); } if($("#st-side-desc-row")||SRS.watchLayout.tValue=="watch5a"||SRS.watchLayout.tValue=="watch5b"||SRS.watchLayout.tValue=="watch5c"||SRS.watchLayout.tValue=="watch5d"||SRS.watchLayout.tValue=="watch8"||SRS.watchLayout.tValue=="watch9a"||SRS.watchLayout.tValue=="watch9b"||SRS.watchLayout.tValue=="watch9c"||SRS.watchLayout.tValue=="watch10beta"){ if($("#st-side-desc-row")){ $(".st-owner-desc-expander").classList.remove("hid"); $(".st-owner-desc-expander button").addEventListener("click",function(){ if($(".st-desc .yt-uix-expander-collapsed")){ $("#watch-description").classList.remove("yt-uix-expander-collapsed"); $(".st-owner-desc-expander").classList.add("expanded"); }else{ $("#watch-description").classList.add("yt-uix-expander-collapsed"); $(".st-owner-desc-expander").classList.remove("expanded"); } }); } $("#watch-description").classList.remove("yt-uix-expander"); $("#watch-description-toggle").addEventListener("click",function(){ if($(".st-desc .yt-uix-expander-collapsed")){ $("#watch-description").classList.remove("yt-uix-expander-collapsed"); }else{ $("#watch-description").classList.add("yt-uix-expander-collapsed"); } if($(".st-desc.expanded")){ $(".st-desc").classList.remove("expanded"); }else{ $(".st-desc").classList.add("expanded"); } }); } if(SRS.watchLayout.tValue=="altWatch9"||SRS.watchLayout.tValue=="altWatch9Fancy"){ $("#watch-description").classList.remove("yt-uix-expander"); $("#watch-description").classList.remove("yt-uix-expander-collapsed"); } if(SRS.watchLayout.tValue=="watch10"||SRS.watchLayout.tValue=="watch10teaser"){ $("#watch-description").addEventListener("click",function(){ $(".st-desc").classList.add("expanded"); }); $("#watch-description-collapse").addEventListener("click",function(){ setTimeout(function(){ if($(".st-desc.expanded")){ $(".st-desc").classList.remove("expanded"); } },10); }); } if($("#related-related")){ $("#watch7-sidebar-contents").setAttribute("show","related"); $("#st-videos-panel").setAttribute("expanded"); $("#st-about-panel").setAttribute("expanded"); $("#st-videos-panel").classList.remove("st-scrollable-panel"); $("#st-about-panel").classList.remove("st-scrollable-panel"); $("#related-related").addEventListener("click",function(){ if($("#watch7-sidebar-contents[show='related']")==null){ $("#watch7-sidebar-contents").setAttribute("show","related"); } $(".related-tab.active").classList.remove("active"); $("#related-related").classList.add("active"); }); $("#related-channel-videos").addEventListener("click",function(){ if($("#watch7-sidebar-contents[show='channel-videos']")==null){ $("#watch7-sidebar-contents").setAttribute("show","channel-videos"); } $(".related-tab.active").classList.remove("active"); $("#related-channel-videos").classList.add("active"); }); $("#related-channel-about").addEventListener("click",function(){ if($("#watch7-sidebar-contents[show='channel-about']")==null){ $("#watch7-sidebar-contents").setAttribute("show","channel-about"); } $(".related-tab.active").classList.remove("active"); $("#related-channel-about").classList.add("active"); }); } if($(".st-comment-teaser")){ $(".st-comment-teaser").addEventListener("click",function(){ if($("#st-comments-panel #watch-discussion")==null){ $("#st-comments-panel").classList.remove("hid"); let tM=$("#watch-discussion"); let nH=$("#st-comments-panel #watch-comments-holder"); nH.append(tM); } }); $("#st-comments-panel .st-side-panel-close").addEventListener("click",function(){ if($("#st-comments-panel #watch-discussion")){ let tM=$("#watch-discussion"); let nH=$("#watch7-main #watch7-content"); nH.append(tM); $("#st-comments-panel").classList.add("hid"); } }); } if($("#st-transcript-panel")){ $("#st-transcript-panel .st-side-panel-close").addEventListener("click",function(){ $("#st-transcript-panel").classList.add("hid"); }); } if($(".st-panel-close")){ document.querySelectorAll(".st-panel-close").forEach(i=>{ i.addEventListener("click",function(){ mS.setAttribute("state","normal"); if($(".st-more-floater-trigger.active")){ $(".st-more-floater-trigger").classList.remove("active"); } if($(".st-addto-floater-trigger.active")){ $(".st-addto-floater-trigger").classList.remove("active"); } if($(".st-stats-trigger.active")){ $(".st-stats-trigger").classList.remove("active"); } if($(".st-transcript-trigger.active")){ $(".st-transcript-trigger").classList.remove("active"); } if($(".st-report-trigger.active")){ $(".st-report-trigger").classList.remove("active"); } if($(".st-share-trigger.active")){ $(".st-share-trigger").classList.remove("active"); } if($(".st-more-floater.visible")){ $(".st-more-floater").classList.remove("visible"); } if($(".st-addto-floater.visible")){ $(".st-addto-floater").classList.remove("visible"); } }); }); } } function applyWatchMetadata(w){ let ext=" views"; if(STS.expViewsString==false){ ext=""; } if(w.isLive==true){ ext=""; } if(gdp.watchLayout=="watch4b"||gdp.watchLayout=="watch4c"||gdp.watchLayout=="watch5a"||gdp.watchLayout=="watch5b"||gdp.watchLayout=="watch5c"||gdp.watchLayout=="watch5d"){ ext=""; } document.querySelectorAll(".st-view-count").forEach(i=>{ i.textContent=w.viewCount + ext; }); document.querySelectorAll(".st-short-view-count").forEach(i=>{ i.textContent=w.viewCount + ext; }); if($(".st-short-view-count")&&w.shortViewCount){ document.querySelectorAll(".st-short-view-count").forEach(i=>{ i.textContent=w.shortViewCount + ext; }); } document.querySelectorAll(".st-upload-date").forEach(i=>{ if(w.superDate!=null){ if(SRS.layoutSelect.tValue=="stargazer2008_1"||SRS.layoutSelect.tValue=="stargazer2009_1"||SRS.layoutSelect.tValue=="stargazer2009_2"||SRS.layoutSelect.tValue=="stargazer2009_3"||SRS.watchLayout.tValue=="watch4a"||SRS.watchLayout.tValue=="watch4b"||SRS.watchLayout.tValue=="watch4c"){ i.textContent=w.superDate; }else{ i.textContent=w.date; } }else{ i.textContent=w.date; } }); if($(".st-pub-date")){ document.querySelectorAll(".st-pub-date").forEach(i=>{ i.textContent=w.pubDate; }); } document.querySelectorAll(".st-relative-date").forEach(i=>{ i.textContent=w.date; }); if(w.relativeDate){ document.querySelectorAll(".st-relative-date").forEach(i=>{ i.textContent=w.relativeDate; }); } document.querySelectorAll(".st-pfp").forEach(i=>{ i.href=w.channelLink; i.data=w.channelNav; i.querySelector("img").src=w.pfp; }); document.querySelectorAll(".st-owner-name-spec").forEach(i=>{ i.textContent=w.owner; i.href=w.channelLink; i.data=w.channelNav; }); document.querySelectorAll(".st-owner-name-text").forEach(i=>{ i.textContent=w.owner; }); if($(".st-sub-count")){ $(".st-sub-count").textContent=w.subCount+" subscribers"; } if($(".st-video-count")){ document.querySelectorAll(".st-video-count").forEach(i=>{ i.textContent=w.videoCount; }); } if($(".st-video-count-link")){ document.querySelectorAll(".st-video-count-link").forEach(i=>{ i.href=w.videosLink; i.data=w.videosNav; }); } if($(".st-channel-video-count")){ document.querySelectorAll(".st-channel-video-count").forEach(i=>{ i.textContent=w.channelVideoCount; }); } if($(".st-channel-sub-count")){ document.querySelectorAll(".st-channel-sub-count").forEach(i=>{ i.textContent=w.channelSubCount; }); } if($(".st-channel-desc")){ document.querySelectorAll(".st-channel-desc").forEach(i=>{ i.innerHTML=w.channelDesc; }); } if($(".st-joined-date")){ document.querySelectorAll(".st-joined-date").forEach(i=>{ i.textContent=w.joinedDate; }); } if($(".st-channel-view-count")){ document.querySelectorAll(".st-channel-view-count").forEach(i=>{ i.textContent=w.channelViewCount; }); } if($(".st-banner")){ document.querySelectorAll(".st-banner").forEach(i=>{ if(w.banner){ i.src=w.banner; i.parentNode.parentNode.classList.remove("empty"); }else{ i.parentNode.parentNode.classList.add("empty"); } }); } if($(".st-desc-snippet-content")&&STS.expWatch9TrueExpander==false){ document.querySelectorAll(".st-desc-snippet-content").forEach(i=>{ i.innerHTML=w.descSnippet; }); } if($(".st-teaser-comment-text")){ if(w.commentTeaserText!=null){ $(".st-teaser-comment-text").textContent=w.commentTeaserText; $(".st-comment-teaser-pfp").src=w.commentTeaserPfp; $(".st-comment-teaser").setAttribute("has-comment",""); }else{ $(".st-your-pfp").src=gdp.pfp; } } if($(".st-comment-count")){ document.querySelectorAll(".st-comment-count").forEach(i=>{ i.textContent=w.commentCount; }); setTimeout(function(){ document.querySelectorAll(".st-comment-count").forEach(i=>{ i.textContent=w.commentCount; }); },3000); } if($(".st-fancy-upload-date")){ if(w.dateMode=="normal"){ $(".st-fancy-upload-date").classList.add("normal-date"); } } if($("#st-url")){ $("#st-url input").value="https://www.youtube.com/watch?v="+w.id; $("#st-url input").addEventListener("click",function(){ $("#st-url input").select(); //navigator.clipboard.writeText($("#st-url input").value); It throws an error even though it works. Will leave this commented out for now regardless. }); } if($(".st-stars")&&$(".st-stars[rating]")==null){ $(".st-stars").setAttribute("rating",w.starRating); $(".st-stars-object").setAttribute("title",w.starRating); $(".st-stars-rating-count").setAttribute("data-tooltip-text",w.likeCount+" likes, "+w.dislikeCount+" dislikes"); $(".st-rating-count").textContent=w.ratingCount; if(w.sentimentState=="LIKE"){ $(".st-stars").setAttribute("your-rating","like"); $(".st-your-star-rating").textContent="5"; } if(w.sentimentState=="DISLIKE"){ $(".st-stars").setAttribute("your-rating","dislike"); $(".st-your-star-rating").textContent="1"; } document.querySelectorAll(".st-star").forEach(i=>{ let stars=i.getAttribute("stars"); let sent=i.getAttribute("sent"); i.addEventListener("mouseenter",function(){ $(".st-stars-fence").classList.remove("hid"); if($("[your-rating]")==null){ $(".st-stars").setAttribute("hover-rating",stars); $(".st-your-star-rating").textContent=stars; } }); i.addEventListener("click",function(){ $(".st-stars").removeAttribute("hover-rating"); $(".st-your-star-rating").textContent=stars; sentimentApply(sent); if($("[your-rating='"+sent+"']")){ $(".st-stars").removeAttribute("your-rating"); }else{ $(".st-stars").setAttribute("your-rating",sent); } }); }); $(".st-stars-fence").addEventListener("mouseenter",function(){ $(".st-stars-fence").classList.add("hid"); $(".st-stars").removeAttribute("hover-rating"); }); } } function likeVideo() { if(CWD.sentimentState!="LIKE"){ fetch("https://www.youtube.com/youtubei/v1/like/like?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8", { "headers":headers, "referrer": "https://www.youtube.com/", "referrerPolicy": "strict-origin-when-cross-origin", "body": JSON.stringify({ "context": { "client": { "clientName": "WEB", "clientVersion": "2.20241113.07.00", "hl": "en", "gl": "US" } }, "params":CWD.likeParams, "target": { "videoId":CWD.id }, }), "method": "POST", "credentials": "include" }).then(response => response.json()).then(data => { }); }else if(CWD.sentimentState=="LIKE"){ fetch("https://www.youtube.com/youtubei/v1/like/removelike?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8", { "headers":headers, "referrer": "https://www.youtube.com/", "referrerPolicy": "strict-origin-when-cross-origin", "body": JSON.stringify({ "context": { "client": { "clientName": "WEB", "clientVersion": "2.20241113.07.00", "hl": "en", "gl": "US" } }, "params":CWD.unlikeParams, "target": { "videoId":CWD.id }, }), "method": "POST", "credentials": "include" }).then(response => response.json()).then(data => { }); } } function dislikeVideo() { if(CWD.sentimentState!="DISLIKE"){ fetch("https://www.youtube.com/youtubei/v1/like/dislike?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8", { "headers":headers, "referrer": "https://www.youtube.com/", "referrerPolicy": "strict-origin-when-cross-origin", "body": JSON.stringify({ "context": { "client": { "clientName": "WEB", "clientVersion": "2.20241113.07.00", "hl": "en", "gl": "US" } }, "params":CWD.dislikeParams, "target": { "videoId":CWD.id }, }), "method": "POST", "credentials": "include" }).then(response => response.json()).then(data => { }); }else if(CWD.sentimentState=="DISLIKE"){ fetch("https://www.youtube.com/youtubei/v1/like/removelike?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8", { "headers":headers, "referrer": "https://www.youtube.com/", "referrerPolicy": "strict-origin-when-cross-origin", "body": JSON.stringify({ "context": { "client": { "clientName": "WEB", "clientVersion": "2.20241113.07.00", "hl": "en", "gl": "US" } }, "params":CWD.undislikeParams, "target": { "videoId":CWD.id }, }), "method": "POST", "credentials": "include" }).then(response => response.json()).then(data => { }); } } function sentimentApply(sent){ if(gdp.loggedIn==true){ if(sent=="like"){ likeVideo(); if(CWD.sentimentState=="LIKE"){ CWD.sentimentState="INDIFFERENT"; }else{ CWD.sentimentState="LIKE"; } }else{ dislikeVideo(); if(CWD.sentimentState=="DISLIKE"){ CWD.sentimentState="INDIFFERENT"; }else{ CWD.sentimentState="DISLIKE"; } } } } 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]); html.setAttribute("addto-visible", "false"); html.setAttribute("share-visible", "false"); html.setAttribute("more-visible", "false"); html.setAttribute("popup-visible", "false"); if($("#wmr-popups #action-panel-addto")==null){ $("#watch7-secondary-actions .yt-uix-button:nth-child(3)").click(); } if($("#wmr-popups #action-panel-addto")==null){ var elm = ".playlist-items"; waitForElement10(elm).then(function(elm){ if(canGo!=false){ var thePanel=$("#action-panel-addto"); var newHome5=$('#wmr-addto-popup div'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } if($("#wmr-popups #action-panel-share")==null){ $("#watch7-secondary-actions .yt-uix-button:nth-child(2)").click(); } if($("#wmr-popups #action-panel-share")==null){ var elm = "#eow-description"; waitForElement10(elm).then(function(elm){ if(canGo!=false){ var thePanel=$("#action-panel-share"); var newHome5=$('#wmr-share-popup div'); newHome5.insertBefore(thePanel, newHome5.children[0]); } }); } var nonfloater=$("#wmr-fence"); var addTo=$("#st-addto-button"); var addTo2=$("#st-save-button"); var share=$(".st-share-trigger"); nonfloater.addEventListener("click",function(){ $("#wmr-addto-popup").setAttribute("visible","false"); $("#wmr-share-popup").setAttribute("visible","false"); $("#wmr-fence").setAttribute("visible","false"); html.setAttribute("addto-visible","false"); html.setAttribute("share-visible","false"); html.setAttribute("more-visible","false"); html.setAttribute("popup-visible","false"); if($("body.st-no-scroll")){ $("body").classList.remove("st-no-scroll"); } if($(".st-floater-fence.visible")){ $(".st-floater-fence").classList.remove("visible"); } }); addTo.addEventListener("click",function(){ if($("#wmr-addto-popup[visible='false']")!=null){ $("#wmr-addto-popup").setAttribute("visible","true"); $("#wmr-fence").setAttribute("visible","true"); html.setAttribute("addto-visible","true"); html.setAttribute("popup-visible","true"); }else{ $("#wmr-addto-popup").setAttribute("visible","false"); $("#wmr-fence").setAttribute("visible","false"); html.setAttribute("addto-visible","false"); html.setAttribute("popup-visible","false"); } }); addTo2.addEventListener("click",function(){ if($("#wmr-addto-popup[visible='false']")!=null){ $("#wmr-addto-popup").setAttribute("visible","true"); $("#wmr-fence").setAttribute("visible","true"); html.setAttribute("addto-visible","true"); html.setAttribute("popup-visible","true"); }else{ $("#wmr-addto-popup").setAttribute("visible","false"); $("#wmr-fence").setAttribute("visible","false"); html.setAttribute("addto-visible","false"); html.setAttribute("popup-visible","false"); } }); share.addEventListener("click",function(){ if($("#wmr-share-popup[visible='false']")!=null){ $("#wmr-share-popup").setAttribute("visible","true"); $("#wmr-fence").setAttribute("visible","true"); html.setAttribute("share-visible","true"); html.setAttribute("popup-visible","true"); }else{ $("#wmr-share-popup").setAttribute("visible","false"); $("#wmr-fence").setAttribute("visible","false"); html.setAttribute("share-visible","false"); html.setAttribute("popup-visible","false"); } }); } function floaterPosition(){ if($(".st-more-floater-trigger")){ let mt=$(".st-more-floater-trigger").getBoundingClientRect(); let left=mt.left+"px"; let top=mt.top+40+"px"; $(".st-more-floater").style.top=top; $(".st-more-floater").style.left=left; } if($(".watch8 .st-more-floater-trigger")){ let mt=$(".st-more-floater-trigger").getBoundingClientRect(); let left=mt.left+"px"; let top=mt.top+28+"px"; $(".st-more-floater").style.top=top; $(".st-more-floater").style.left=left; } if($(".watch8 .st-addto-floater-trigger")){ let mt=$(".st-addto-floater-trigger").getBoundingClientRect(); let left=mt.left+"px"; let top=mt.top+28+"px"; $(".st-addto-floater").style.top=top; $(".st-addto-floater").style.left=left; } } function createNewWatch(number){ let totRecon=false; let titleOnTop=false; let titleOnSide=false; let hasSecondary=false; if(SRS.watchLayout.tValue=="watch6"){ totRecon=true; } if( SRS.watchLayout.tValue=="watch5d"|| SRS.watchLayout.tValue=="watch5c"|| SRS.watchLayout.tValue=="watch5b"|| SRS.watchLayout.tValue=="watch5a"|| SRS.watchLayout.tValue=="watch4c"|| SRS.watchLayout.tValue=="watch4b" ){ titleOnTop=true; } if(SRS.relatedTabs.tValue=="on"){ hasSecondary=true; } if($("#st-watch-above")){ $("#st-watch-above-container").remove(); } let cont=$("#watch7-content.watch-content"); let nE=document.createElement("div"); nE.id="st-watch-below-container"; nE.classList.add("stdustwb"); nE.classList.add(SRS.watchLayout.tValue); nE.setAttribute("wl",SRS.watchLayout.tValue); // if has title on top if has sidebar stuff or smth if mvoes player lke watch6 nE.innerHTML = `
    `; cont.insertBefore(nE,cont.children[number]); cont=$("#watch7-content.watch-content"); nE=document.createElement("div"); nE.id="st-watch-above-container"; nE.classList.add("stdustwa"); nE.classList.add(SRS.watchLayout.tValue); nE.setAttribute("wl",SRS.watchLayout.tValue); nE.innerHTML = `
    `; cont.insertBefore(nE,cont.children[0]); cont.insertBefore(nE,cont.children[number]); cont=$("#watch7-sidebar-contents"); nE=document.createElement("div"); nE.id="st-watch-side-container"; nE.classList.add("stdustws"); nE.classList.add(SRS.watchLayout.tValue); nE.setAttribute("wl",SRS.watchLayout.tValue); nE.innerHTML = `
    `; cont.insertBefore(nE,cont.children[0]); if(titleOnTop==false&&titleOnSide==false&&SRS.watchLayout.tValue!=="watch7"&&SRS.watchLayout.tValue!=="watch7beta"){ $("#st-below-title-row-holder").innerHTML=STH.belowTitleRow; } if(titleOnTop==true){ $("#st-above-title-row-holder").innerHTML=STH.aboveTitleRow; } if(SRS.relatedTabs.tValue=="on"||SRS.relatedTabs.tValue=="onNoSub"){ $("#st-side-banner-row-holder").innerHTML=STH.sideBannerRow; $("#st-side-owner-row-holder").innerHTML=STH.sideOwnerRow; $("#st-side-tabs-row-holder").innerHTML=STH.sideTabsRow; $("#st-side-panels-row-holder").innerHTML=STH.sidePanelsRow; } if(SRS.watchLayout.tValue=="watch4b"||SRS.watchLayout.tValue=="watch4c"){ $("#st-ratings-info-row-holder").innerHTML=STH.ratingsInfoRow; $("#st-watch-tabs-row-holder").innerHTML=STH.watchTabsRow; $("#st-side-banner-row-holder").innerHTML=STH.sideBannerRow; $("#st-side-owner-row-holder").innerHTML=STH.sideOwnerRow; $("#st-side-desc-row-holder").innerHTML=STH.sideDescRow; $("#st-side-panels-row-holder").innerHTML=STH.sidePanelsRow; $("#st-watch-below").setAttribute("state","share"); setTimeout(changeTitleOnTopHeight,1000); } if(SRS.watchLayout.tValue=="watch5c"||SRS.watchLayout.tValue=="watch5d"){ $("#st-above-owner-row-holder").innerHTML=STH.aboveOwnerRow; $("#st-above-videos-row-holder").innerHTML=STH.aboveVideosRow; $("#st-actions-info-row-holder").innerHTML=STH.actionsInfoRow; $("#st-panels-row-holder").innerHTML=STH.panelsRow; $("#st-desc-row-holder").innerHTML=STH.descRow; setTimeout(changeTitleOnTopHeight,1000); 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"); $("#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"); $("#videos-dd-pagination [page='"+page+"']").classList.add("yt-uix-button-toggled"); } }); } if(SRS.watchLayout.tValue=="watch8"){ $("#st-owner-info-row-holder").innerHTML=STH.ownerInfoRow; $("#st-actions-row-holder").innerHTML=STH.actionsRow; $("#st-panels-row-holder").innerHTML=STH.panelsRow; $("#st-desc-row-holder").innerHTML=STH.descRow; $("#st-floaters-row-holder").innerHTML=STH.floatersRow; $("#st-extras-row-holder").innerHTML=STH.extrasRow; } if(SRS.watchLayout.tValue=="altWatch9"||SRS.watchLayout.tValue=="altWatch9Fancy"){ $("#st-slider-row-holder").innerHTML=STH.sliderRow; setTimeout(function(){ $("[trigger='video-info']").click(); },10); } if(SRS.watchLayout.tValue=="watch9a"||SRS.watchLayout.tValue=="watch9b"||SRS.watchLayout.tValue=="watch9c"){ $("#st-info-actions-row-holder").innerHTML=STH.infoActionsRow; $("#st-owner-row-holder").innerHTML=STH.ownerRow; $("#st-desc-row-holder").innerHTML=STH.descRow; //$("#st-popups-row-holder").innerHTML=STH.popupsRow; setTimeout(createPopups,1500); $("#st-floaters-row-holder").innerHTML=STH.floatersRow; $("#st-extras-row-holder").innerHTML=STH.extrasRow; $("#st-side-panels-row-holder").innerHTML=STH.sidePanelsRow; } if(SRS.watchLayout.tValue=="watch10beta"){ $("#st-desc-actions-row-holder").innerHTML=STH.descActionsRow; $("#st-owner-teaser-row-holder").innerHTML=STH.ownerTeaserRow; //$("#st-popups-row-holder").innerHTML=STH.popupsRow; setTimeout(createPopups,1500); $("#st-floaters-row-holder").innerHTML=STH.floatersRow; $("#st-extras-row-holder").innerHTML=STH.extrasRow; $("#st-side-panels-row-holder").innerHTML=STH.sidePanelsRow; } if(SRS.watchLayout.tValue=="watch10"){ $("#st-owner-actions-row-holder").innerHTML=STH.ownerActionsRow; $("#st-desc-row-holder").innerHTML=STH.descRow; //$("#st-popups-row-holder").innerHTML=STH.popupsRow; setTimeout(createPopups,1500); $("#st-floaters-row-holder").innerHTML=STH.floatersRow; $("#st-extras-row-holder").innerHTML=STH.extrasRow; $("#st-side-panels-row-holder").innerHTML=STH.sidePanelsRow; } if(SRS.watchLayout.tValue=="watch10teaser"){ $("#st-owner-actions-row-holder").innerHTML=STH.ownerActionsRow; $("#st-desc-teaser-row-holder").innerHTML=STH.descTeaserRow; //$("#st-popups-row-holder").innerHTML=STH.popupsRow; setTimeout(createPopups,1500); $("#st-floaters-row-holder").innerHTML=STH.floatersRow; $("#st-extras-row-holder").innerHTML=STH.extrasRow; $("#st-side-panels-row-holder").innerHTML=STH.sidePanelsRow; } cont.classList.add(SRS.watchLayout.tValue); moveWatchElements(); createWatchActions(); if($("#related-tabs-sort-btn")){ $("#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(CWD.channelPopularList){ fillVideoList("channelPopularList","videosTabCompactVideo"); }else{ $("#related-tabs-loading").classList.remove("hid"); EXFetch("none","double","browse","browseId",CWD.channelId,"params","EgZ2aWRlb3PyBgQKAjoA","continuation",CWD.popularToken).then(result => { if(result.onResponseReceivedActions){ let richGrid = result.onResponseReceivedActions[1].reloadContinuationItemsCommand.continuationItems; CWD.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(CWD.channelOldestList){ fillVideoList("channelOldestList","videosTabCompactVideo"); }else{ $("#related-tabs-loading").classList.remove("hid"); EXFetch("none","double","browse","browseId",CWD.channelId,"params","EgZ2aWRlb3PyBgQKAjoA","continuation",CWD.oldestToken).then(result => { if(result.onResponseReceivedActions){ let richGrid = result.onResponseReceivedActions[1].reloadContinuationItemsCommand.continuationItems; CWD.channelOldestList = richGrid; fillVideoList("channelOldestList","videosTabCompactVideo"); $("#related-tabs-loading").classList.add("hid"); } }); } }); } if(SRS.layoutSelect.tValue=="cosmic2012_1"||SRS.layoutSelect.tValue=="cosmic2012_2"||SRS.layoutSelect.tValue=="cosmic2012_3"){ 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]); } }); } if(SRS.watchLayout.tValue=="watch5d"){ document.querySelectorAll(".st-btn").forEach(i => { i.classList.add("yt-uix-button"); i.classList.add("yt-uix-button-default"); i.classList.add("yt-uix-button-size-default"); }); } if(SRS.watchLayout.tValue=="watch5c"||SRS.watchLayout.tValue=="watch5b"||SRS.watchLayout.tValue=="watch5a"){ document.querySelectorAll(".st-btn").forEach(i => { i.classList.add("aozora-button"); }); } doWatchVariables(); if(SRS.relatedTabs.tValue!="off"){ $("#st-about-panel").classList.remove("hid"); $("#st-videos-panel").classList.remove("hid"); } } function changeTitleOnTopHeight(){ let h=$("#st-watch-above").offsetHeight; $("body .v3").style.setProperty("--top-title-height",h+"px"); } function createYTC(){ let cont=$("#footer-links-secondary"); let nE=document.createElement("li"); nE.id="st-yt-c"; nE.innerHTML=` © 2024 YouTube, LLC `; cont.append(nE); } let polyComment = false; function everyLoadNeo(x){ var elm = "#yt-masthead"; waitForElement10(elm).then(function(elm){ if(canGo != false){ if($("#yt-masthead").data.v3DesktopFancyMasthead.userContent){ let pi=$("#yt-masthead").data.v3DesktopFancyMasthead.userContent.contents[0].v3MastheadDisplayName.navigationEndpoint.browseEndpoint.canonicalBaseUrl; gdp.pageId=pi.split("Id=")[1]; } } }); let pi=yt.config_.DATASYNC_ID; if(pi.split("||")[1].length>=5){ gdp.pageId=pi.split("||")[0]; 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":gdp.authUser, "X-Goog-Pageid":gdp.pageId } }else{ 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":gdp.authUser } } gdp.authUser=yt.config_.SESSION_INDEX; gdp.watchLayout=SRS.watchLayout.tValue; if($("[lang='ja-JP']")){ usedLang="ja"; } if($(".dark-mode")){ html.setAttribute("dark",""); gdp.dark=true; }else{ gdp.dark=false; } if($("#st-yt-c")==null&&x=="x"){ var elm = "#footer-links-secondary"; waitForElement10(elm).then(function(elm){ if(canGo != false){ createYTC(); } }); } if(x === "x"){ gdp.currWatchData={}; CWD=gdp.currWatchData; } if(x === "x" && $(".st-acme")){ $(".st-acme").setAttribute("visible",""); $(".st-acme").removeAttribute("visible"); } if(window.location.href.includes("/watch")){ if(CWD.id==null){ CWD.id=document.URL.split('v=')[1].split("&")[0]; getWatchMetadata(x); } } if(window.location.href.includes("/shorts/")){ if(CWD.id==null){ CWD.id=document.URL.split('/shorts/')[1].split("&")[0]; getWatchMetadata(x); } } if($("#page.watch")){ getVideoSize(); } if(STS.expPolymerComments==true){ polyComment=true; } if($("#page.watch")||$("#page.all_comments")){ if(STS.expAozoraComments == true || STS.expCosmicComments == true || STS.expPolymerComments == true){ var elm = "#watch-discussion .distiller_yt_instance"; waitForElement10(elm).then(function(elm){ if(canGo != false && $(".distiller_content")){ modComments(polyComment); listenToComments(x); } }); } } if(window.location.href.includes("/watch")||window.location.href.includes("/shorts/")){ if(CWD.channelVideosList == null && x === "x"){ var elm = ".yt-uix-button-panel"; waitForElement10(elm).then(function(elm){ if(canGo != false){ getChannelVideosList(); } }); } } if(SRS.layoutSelect.tValue=="sb2016"){ setTimeout(doSubscribeIcons,100); } } function modComments(ver){ document.querySelectorAll(".comment:not(.startube-comment)").forEach(i=>{ if(ver==false){ 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"); } }else{ if(i.querySelector("svg") == null){ var newHome = i.querySelector(".action_bar"); var toMove = i.querySelector(".action_bar .like"); var toMove2 = i.querySelector(".action_bar .dislike"); var toMove3 = i.querySelector(".action_bar .reply-button"); var toMove4 = i.querySelector(".reply_poster"); let toMove5 = null; if(i.querySelector(".action_bar .heart")){ toMove5 = i.querySelector(".action_bar .heart"); } let count = i.querySelector(".count_active").textContent; if(count == 1){ newHome.classList.add("no-likes"); } if(STS.polymerGen2Comments == true){ newHome.appendChild(toMove); newHome.appendChild(toMove2); if(toMove5 !== null){ newHome.appendChild(toMove5); } newHome.appendChild(toMove3); newHome.classList.add("gen2-comment"); }else{ newHome.appendChild(toMove3); newHome.appendChild(toMove); newHome.appendChild(toMove2); if(toMove5 !== null){ newHome.appendChild(toMove5); } newHome.classList.add("gen1-comment"); } newHome.appendChild(toMove4); let container = i.querySelector(".sentiment.like"); let newElem = document.createElement("div"); newElem.setAttribute("class","st-svg"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); let container2 = i.querySelector(".sentiment.dislike"); let newElem2 = document.createElement("div"); newElem2.setAttribute("class","st-svg"); container2.classList.add("startube-has-icon"); newElem2.innerHTML = `
    `; container2.insertBefore(newElem2, container2.children[0]); newElem.classList.add("yt-uix-tooltip"); if(i.querySelector(".like.active")){ newElem.setAttribute("data-tooltip-text","Unlike"); }else{ newElem.setAttribute("data-tooltip-text","Like"); } setTimeout(function(){ newElem.addEventListener("click",function(){ i.querySelector(".like img").click(); if(i.querySelector(".like.active")){ newElem.setAttribute("data-tooltip-text","Unlike"); }else{ newElem.setAttribute("data-tooltip-text","Like"); } if(i.querySelector(".dislike.active")){ container2.setAttribute("data-tooltip-text","Remove Dislike"); }else{ container2.setAttribute("data-tooltip-text","Dislike"); } }); }, 100); container2.classList.add("yt-uix-tooltip"); if(i.querySelector(".dislike.active")){ container2.setAttribute("data-tooltip-text","Dislike"); }else{ container2.setAttribute("data-tooltip-text","Remove Dislike"); } container2.setAttribute("data-tooltip-text","Dislike"); newElem2.addEventListener("click",function(){ setTimeout(function(){ if(i.querySelector(".dislike.active")){ container2.setAttribute("data-tooltip-text","Remove Dislike"); }else{ container2.setAttribute("data-tooltip-text","Dislike"); } if(i.querySelector(".like.active")){ newElem.setAttribute("data-tooltip-text","Unlike"); }else{ newElem.setAttribute("data-tooltip-text","Like"); } }, 100); }); i.classList.add("startube-comment"); if(i.parentNode.classList != "post"){ i.classList.add("startube-reply"); }else if(i.parentNode.parentNode.parentNode.querySelector(".link_action")){ if($("[lang='en']") && STS.simpleReply == true){ let count = i.parentNode.parentNode.parentNode.querySelector(".link_action_text").textContent; if(count.includes("View all")){ count = count.split("View all ")[1]; }else{ count = "1 Reply"; } i.parentNode.parentNode.parentNode.querySelector(".link_action_text").textContent = count; } if(STS.polymerGen2Comments == true){ let cont = i.parentNode.parentNode.parentNode.querySelector(".loader"); let nE = document.createElement("div"); nE.classList.add("st-svg"); nE.innerHTML=`
    `; cont.insertBefore(nE,cont.children[0]); cont.classList.add("startube-has-icon"); } }else{ newElem.classList.add("no-replies"); i.classList.add("no-replies"); } moveSortBtn(); changeCommentPlaceholder(1); changeCommentHeader(1); } } }) } function commentStateChange(sort){ if(sort == "sort"){ if(STS.expPolymerComments == true){ setTimeout(moveSortBtn, 10); } var elm = "#watch-discussion .load-more-button:not(.listening)"; waitForElement10(elm).then(function(elm){ if(canGo != false && $(".distiller_content")){ setTimeout(function(){ modComments(polyComment); listenToComments(); }, 500); } }); }else{ var elm = ".comment:not(.startube-comment)"; waitForElement10(elm).then(function(elm){ if(canGo != false && $(".distiller_content")){ setTimeout(function(){ modComments(polyComment); 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(polyComment); listenToComments(); }, 1000); setTimeout(function(){ modComments(polyComment); 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,"nomodtv","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,"nomodtv","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; }); 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"; } 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($('[chan-loc="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($('[chan-loc="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.lockupViewModel){ i=i.lockupViewModel; let href = i.rendererContext.commandContext.onTap.innertubeCommand.navigationEndpoint.commandMetadata.webCommandMetadata.url; let videoId = i.navigationEndpoint.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"); }); } } else */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 date; if(video.publishedTimeText){ date=video.publishedTimeText.simpleText; }else{ date="Upcoming" } let views; if(video.viewCountText){ views=video.viewCountText.simpleText; }else{ views="No views"; } 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; if(i.publishedTimeText){ date=i.publishedTimeText.simpleText; }else{ date="Upcoming" } let viewCount; if(i.viewCountText){ viewCount=i.viewCountText.simpleText; }else{ viewCount="No views"; } let container = $(".st-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("a"); newElem.href=href; 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; if(i.publishedTimeText){ date=i.publishedTimeText.simpleText; }else{ date="Upcoming" } let viewCount; if(i.viewCountText){ viewCount=i.viewCountText.simpleText; }else{ viewCount="No views"; } 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=="videosPanelCompactVideo"){ let id = i.navigationEndpoint.watchEndpoint.videoId; let href = "/watch?v=" + id; let date; if(i.publishedTimeText){ date=i.publishedTimeText.simpleText; }else{ date="Upcoming" } let viewCount; if(i.viewCountText){ viewCount=i.viewCountText.simpleText; }else{ viewCount="No views"; } let container = $("#videos-panel [js-destination]"); 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 = "panel-video 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(id == CWD.id){ newElem.classList.add("active"); } } 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 date; if(i.publishedTimeText){ date=i.publishedTimeText.simpleText; }else{ date="Upcoming" } let viewCount; if(i.viewCountText){ viewCount=i.viewCountText.simpleText; }else{ viewCount="No views"; } 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} ${viewCount} ${date} ${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 EXaddListener(elm,event,action){ elm.addEventListener(event,function(){ action; }); } function doSubscribeIcons(){ var elm = ".yt-uix-subscription-button:not(.st-icon-sub):not(.st-listening)"; waitForElement10(elm).then(function(elm){ if(canGo != false){ document.querySelectorAll(".yt-uix-button-subscribe-branded:not(.st-icon-sub):not(.st-listening)").forEach(i=>{ let cont=i.querySelector(".yt-uix-button-icon-wrapper"); let nE=document.createElement("div"); nE.classList.add("st-svg"); nE.innerHTML=STH0.SVG; cont.append(nE); nE.querySelector(".filled-icon g").innerHTML=` `; nE.querySelector(".outline-icon path").setAttribute("d",svgDefs.sub.o); i.classList.add("st-icon-sub"); i.querySelector("svg").setAttribute("viewBox","0 0 68 48"); if(!i.classList.contains("st-listening")){ EXaddListener(i,"click",setTimeout(doSubscribeIcons,2000)); i.classList.add("st-listening"); } }); document.querySelectorAll(".yt-uix-button-subscribed-branded:not(.st-icon-sub):not(.st-listening)").forEach(i=>{ let cont=i.querySelector(".yt-uix-button-icon-wrapper"); let nE=document.createElement("div"); nE.classList.add("st-svg"); nE.innerHTML=STH0.SVG; cont.append(nE); nE.querySelector(".filled-icon path").setAttribute("d",svgDefs.subbed.f); nE.querySelector(".outline-icon path").setAttribute("d",svgDefs.subbed.o); i.classList.add("st-icon-sub"); i.querySelector("svg").setAttribute("viewbox","0 0 68 48"); if(!i.classList.contains("st-listening")){ EXaddListener(i,"click",setTimeout(doSubscribeIcons,2000)); i.classList.add("st-listening"); } }); } }); } // EXfunct function moveSortBtn(){ if($("#page.watch") || $("#page.all_comments")){ if($(".widget_bounds .yt-spinner-message") == null && $("#st-comment-sort") == null){ var elm = ".left-options > button"; waitForElement10(elm).then(function(elm){ if(canGo != false && $("#st-comment-sort") == null){ if($("#page.watch") || $("#page.all_comments")){ var newHome = $(".all-comments"); var toMove = $(".left-options > button"); newHome.appendChild(toMove); $(".all-comments button").id = "st-comment-sort"; let cont = $("#st-comment-sort"); cont.classList.add("flex-bar"); cont.querySelector("span").textContent = "Sort by"; let nE = document.createElement("div"); nE.setAttribute("class","st-svg"); nE.innerHTML = `
    `; cont.insertBefore(nE,cont.children[0]); } } }); }else if($("#st-comment-sort")){ $("#st-comment-sort").querySelector("span").textContent = "Sort by"; } } } // EXfunct function changeCommentPlaceholder(n){ if($("#page.watch") || $("#page.all_comments")){ if($(".widget_bounds .yt-spinner-message") == null && $(".share.focus_caller.startube") == null){ var elm = ".focus_caller"; waitForElement10(elm).then(function(elm){ if(canGo != false){ if($("#page.watch") || $("#page.all_comments")){ if(n == 1){ $(".share.focus_caller").textContent = "Add a public comment"; }else if(n == 0){ $(".share.focus_caller").textContent = "Add a comment"; } $(".share.focus_caller").classList.add("startube"); } } }); } } } // EXfunct function changeCommentHeader(n){ if($("#page.watch") || $("#page.all_comments")){ if($(".distiller_yt_headline.startube") == null){ var elm = ".distiller_yt_headline"; waitForElement10(elm).then(function(elm){ if(canGo != false){ if($("#page.watch") || $("#page.all_comments")){ if($(".distiller_yt_headline.startube") == null){ CWD.commentCount = $(".distiller_yt_headline span:nth-child(2)").textContent.split("(")[1].split(")")[0]; $(".distiller_yt_headline").innerHTML = ` Comments Comments `; $(".distiller_yt_headline .comment-count").textContent = CWD.commentCount; $(".distiller_yt_headline").classList.add("startube"); let comment=$(".comment"); CWD.commentTeaserPfp=comment.querySelector(".distiller_yt-thread_avatar").src; CWD.commentTeaserText=comment.querySelector(".text-content span").textContent; } if($(".st-teaser-comment-text")){ if(CWD.commentTeaserText!=null){ $(".st-teaser-comment-text").textContent=CWD.commentTeaserText; $(".st-comment-teaser-pfp").src=CWD.commentTeaserPfp; $(".st-comment-count").textContent=CWD.commentCount; $(".st-comment-teaser").setAttribute("has-comment",""); }else{ $(".st-your-pfp").src=gdp.pfp; } } } } }); } } } function dupeDetect(){ if($("#StarTubeDuplicateDetector")==null){ // This is used for detecting whether or not the user has multiple versions of StarTube enabled, as that almost never goes well // Each StarTube version has its own unique ID so StarTube versions can determine what other version of StarTube is running alongside them. // Only supports StarTube stable and beta 2.3.1 and later. let cont=$("body"); let nE=document.createElement("div"); nE.id="StarTubeDuplicateDetector"; nE.setAttribute("st-id",STUID); nE.setAttribute("st-ver",currStarVer); cont.insertBefore(nE,cont.children[0]); }else{ let st_id=$("#StarTubeDuplicateDetector").getAttribute("st-id"); let ver=$("#StarTubeDuplicateDetector").getAttribute("st-ver"); if(ver==null){ ver="2.3.1 or earlier"; } if(st_id==STUID){ }else{ alert("You have another version of StarTube installed: "+ver+" (the version of StarTube giving you this message is: "+currStarVer+"). Having multiple versions of StarTube installed is almost never a good idea. Please disable one of them."); } } } function doStarTube(){ document.addEventListener("V3_NAVITRONIC_STARTED", function(e){ //console.log(e.detail); if(e.detail.isPopstateCached==true){ isPopstate=true; //deleteTitleOnTop(); }else{ isPopstate=false; //returnWatchElements(); //deleteTitleOnTop(); } setTimeout(checkContentMargin, 500); setTimeout(checkContentMargin, 1500); }); document.addEventListener("V3_SERVERCONTRACT_FLUSH_DOCEL_ATTRIB", function(e){ everyLoad(); }); document.addEventListener("V3_NAVITRONIC_FINISHED", function(e){ refreshCheck = 0; everyLoad("x"); checkPlayerSize(); checkContentMargin(); setTimeout(checkContentMargin, 500); setTimeout(checkContentMargin, 1500); setTimeout(checkContentMargin, 2500); setTimeout(checkContentMargin, 3000); altWatch9Resize(); setTimeout(altWatch9Resize,1000); }); window.addEventListener("resize", function(){ checkContentMargin(); checkPlayerSize(); altWatch9Resize(); }); setTimeout(checkPlayerSize,500); setTimeout(checkPlayerSize,2000); setTimeout(checkPlayerSize,4000); setTimeout(altWatch9Resize,1000); setTimeout(altWatch9Resize,3000); setTimeout(altWatch9Resize,5000); function altWatch9Resize(){ if($("[wl^='aw9']")&&$(".st-watch-owner-column")){ if($("[pw='640']")){ if($(".st-watch-owner-column .st-handoff-item")){ let tM=$(".st-watch-owner-column .st-handoff-item"); let nH=$("#creator-slider .st-slider-inner"); nH.append(tM); } }else if($(".st-watch-owner-column .st-handoff-item")==null){ let tM=$("#creator-slider .st-handoff-item"); let nH=$(".st-watch-owner-column"); nH.append(tM); if($("[trigger='creator'].active")){ $("#st-watch-below").setAttribute("state","video-info"); $("[trigger='creator']").classList.remove("active"); $("[trigger='video-info']").classList.add("active"); $("#creator-slider").classList.remove("active"); $("#video-info-slider").classList.add("active"); } } } } function checkPlayerSize(){ if($("#watch7-main")){ let width=$("#watch7-main > #watch7-content").offsetWidth; $("body .v3").setAttribute("pw",width); } } everyLoad("x"); setTimeout(createThirdColumn, 2000); setTimeout(dupeDetect,STDELAY); checkContentMargin(); function checkContentMargin(){ if( $("#content") && $("[static] #appbar-guide-menu") ){ var rock = $("#content").getBoundingClientRect(); $("#appbar-guide-menu").style.left = rock.left + "px"; $("html").style.setProperty("--guide-left",rock.left + "px"); if($("#masthead-positioner")){ var stone = $("#masthead-positioner").getBoundingClientRect(); $("#appbar-guide-menu").style.top = stone.height + "px"; $("html").style.setProperty("--guide-top",stone.height + "px"); } $("#appbar-guide-menu").style.height = rock.height - 20 + "px"; $("html").style.setProperty("--guide-height",rock.height - 20 + "px"); } floaterPosition(); } setTimeout(everyLoad, 1000); // sometimes 's attributes "reset" halfway through loading, causing some settings to not apply, this should correct that when it happens. Done twice until I find a better way to do it. setTimeout(everyLoad, 2000); setTimeout(everyLoad, 4000); setTimeout(everyLoad, 6000); setTimeout(everyLoad, 8000); setTimeout(checkContentMargin, 1500); setTimeout(checkContentMargin, 3000); var elm = "#page"; waitForElement10(elm).then(function(elm){ if(canGo!=false){ if(STS.expMoveGuideMainSectionToTop==true){ var elm=".guide-section"; waitForElement10(elm).then(function(elm){ if(canGo!=false){ var gS0=document.querySelectorAll(".guide-section")[1]; var gS1=document.querySelectorAll(".guide-section")[0]; var gS2=document.querySelectorAll(".guide-section")[2]; var gS3=document.querySelectorAll(".guide-section")[3]; var nH=$('.guide-toplevel'); nH.appendChild(gS0); nH.appendChild(gS1); nH.appendChild(gS2); nH.appendChild(gS3); } }); } } }); function createWelcomeAlert(){ let cont=$("#alerts"); let nE=document.createElement("div"); nE.id="st-welcome-alert"; nE.innerHTML=`
    Alert icon
    `; cont.insertBefore(nE,cont.children[0]); nE.querySelector(".close").addEventListener("click",function(){ nE.style.display="none"; closedWelcomeBanner=true; STS.showWelcomeBanner=false; applySettings(); }); } function createEFYTAlert(){ let cont=$("#alerts"); let nE=document.createElement("div"); nE.id="st-efyt-alert"; nE.innerHTML=`
    Alert icon
    `; cont.insertBefore(nE,cont.children[0]); nE.querySelector(".close").addEventListener("click",function(){ nE.style.display="none"; closedEFYTBanner=true; }); switch(bannerNo){ case 1: newElem.querySelector(".yt-alert").classList.add("yt-alert-info"); break; case 2: newElem.querySelector(".yt-alert").classList.add("yt-alert-warn"); break; case 3: newElem.querySelector(".yt-alert").classList.add("yt-alert-error"); break; } } function removeLCDark(CW){ if(CW.document.querySelector("html[dark]")){ CW.document.querySelector("html").removeAttribute("dark"); CW.document.querySelector("yt-live-chat-app").removeAttribute("dark"); } } function replaceLC(){ let cont=$(".live_chat_box_iframe_holder"); let nE=document.createElement("iframe"); nE.src="https://www.youtube.com/live_chat?is_popout=1&v="+CWD.id; nE.width="100%"; nE.height="100%"; nE.id="st-live-chat"; cont.innerHTML=``; cont.insertBefore(nE,cont.children[0]); let CW=nE.contentWindow; if($("[dark]")){ CW.document.querySelector("html").setAttribute("dark",""); }else{ setTimeout(function(){ removeLCDark(CW); },1000); setTimeout(function(){ removeLCDark(CW); },3000); setTimeout(function(){ removeLCDark(CW); },4000); setTimeout(function(){ removeLCDark(CW); },5000); setTimeout(function(){ removeLCDark(CW); },7000); setTimeout(function(){ removeLCDark(CW); },10000); } } function createThirdColumn(){ if( $("#page.home")&& STS.expAozoraHome==true&& !window.location.href.includes("/feed") ){ let theRecs=""; if($(".lohp-newspaper-shelf")){ theRecs=document.querySelectorAll(".feed-item-container")[1]; }else{ theRecs=$(".feed-item-container"); } if(theRecs.querySelector(".lohp-newspaper-shelf")){ theRecs=document.querySelectorAll(".feed-item-container")[2]; } let nH=$(".branded-page-v2-secondary-col .branded-page-box"); theRecs.style.display="block"; nH.appendChild(theRecs); let cont=$(".branded-page-v2-secondary-col"); let nE=document.createElement("div"); nE.id="epic-panda-rules"; nE.innerHTML=` `; cont.insertBefore(nE,cont.children[0]); var elm=".feed-item-container:nth-child(10) img"; waitForElement500(elm).then(function(elm){ if(canGo!=false){ let arrayShelves=document.querySelectorAll(".compact-shelf"); arrayShelves.forEach(i=>{ if(i){ i.classList.add("rule-added"); let nE2=document.createElement("div"); nE2.setAttribute("class","horizontal-rule"); nE2.innerHTML=` `; i.insertBefore(nE2,i.children[0]); } }); } }); } } function createShelfIcons(){ if( STS.expPolymerStyles==true&& !window.location.href.includes("/feed") ){ if($(".home")||$(".channel")){ var elm=".yt-uix-shelfslider-next"; waitForElement500(elm).then(function(elm){ if(canGo!=false){ let arrayShelves=document.querySelectorAll(".compact-shelf"); arrayShelves.forEach(i=>{ if(i.querySelector(".yt-uix-shelfslider-next:not(.icon-added) .yt-uix-button-icon-wrapper")){ let next=i.querySelector(".yt-uix-shelfslider-next:not(.icon-added) .yt-uix-button-icon-wrapper"); next.parentNode.classList.add("icon-added"); next.parentNode.classList.add("st-shelf-btn"); let nE=document.createElement("div"); nE.setAttribute("class","st-svg"); nE.innerHTML=STH0.SVG; next.insertBefore(nE,next.children[0]); nE.querySelector(".filled-icon path").setAttribute("d",svgDefs.rChev.f); nE.querySelector(".outline-icon path").setAttribute("d",svgDefs.rChev.o); } if(i.querySelector(".yt-uix-shelfslider-prev:not(.icon-added) .yt-uix-button-icon-wrapper")){ let prev=i.querySelector(".yt-uix-shelfslider-prev:not(.icon-added) .yt-uix-button-icon-wrapper"); prev.parentNode.classList.add("icon-added"); prev.parentNode.classList.add("st-shelf-btn"); let nE=document.createElement("div"); nE.setAttribute("class","st-svg"); nE.innerHTML=STH0.SVG; prev.insertBefore(nE,prev.children[0]); nE.querySelector(".filled-icon path").setAttribute("d",svgDefs.lChev.f); nE.querySelector(".outline-icon path").setAttribute("d",svgDefs.lChev.o); } }); } }); } } } function createFeedText(){ if($(".epic-panda-header")==null){ var elm=".branded-page-v2-subnav-container"; waitForElement10(elm).then(function(elm){ if(canGo!=false){ let cont=$('.feed-item-container'); let nE=document.createElement("div"); nE.classList="epic-panda-header"; nE.innerHTML=` From YouTube `; cont.insertBefore(nE,cont.children[0]); } }); } } if($("#st-settings-button")==null){ var elm="#footer"; waitForElement10(elm).then(function(elm){ if(canGo!=false){ if($(".oz-expand-debugger-icon")){ $(".oz-expand-debugger-icon").addEventListener("click",function(){ if($("#st-settings-button")==null){ createExpandedFooter(); } }); }else if($("#upload-menu-account")){ $("#upload-menu-account:not(.yt-uix-button-menu-new-section-separator)").addEventListener("click",function(){ if($("#st-settings-button")==null){ createOOBEAccessBtn(); } }); } if($(".astro-settings")==null){ createSettingsMenu(); } } }); } function deleteTitleOnTop(){ if($("#st-watch-above-container")){ $("#st-watch-above-container").remove(); } } function guideAlwaysPinned(){ if($(".guide-pinning-enabled")==null){ $("body").classList.add("guide-pinning-enabled"); } if($(".guide-pinned")==null){ $("body").classList.add("guide-pinned"); } if($(".guide-guide")==null){ $("body").classList.add("show-guide"); } } function hideYoodles(){ if($("#logo-container.doodle")){ $("#logo-container.doodle").classList.remove("doodle"); $("#logo-container img").src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif"; if($(".content-region")){ $(".content-region").removeAttribute("style"); } } } function createNewWatchPrep(){ if($("#watch7-content.watch-content .yt-uix-button")!=null){ if($("#st-watch-below-container")==null||$("#st-watch-above-container")==null){ if($("#watch7-creator-bar")!==null){ createNewWatch(1); }else{ createNewWatch(0); } } }else{ var elm="#watch7-content.watch-content .yt-uix-button"; waitForElement10(elm).then(function(elm){ if(canGo!=false){ if($("#st-watch-below-container")==null||$("#st-watch-above-container")==null){ if($("#watch7-creator-bar")!==null){ createNewWatch(1); }else{ createNewWatch(0); } } } }); } } function moveCountsToButtons(){ var elm=".watch"; waitForElement10(elm).then(function(elm){ if(canGo!=false){ if($(".likes-count")!=null){ let lC=$(".likes-count").textContent; let dC=$(".dislikes-count").textContent; $("#watch-like .run").textContent=lC; $("#watch-dislike .yt-uix-button-content").innerHTML=` Dislike `; $("#watch-dislike .run").textContent=dC; $("#watch-dislike").classList.remove("yt-uix-button-empty"); } } }); } function createMoreTooltips(){ var elm=".watch"; waitForElement10(elm).then(function(elm){ if(canGo!=false){ if(document.querySelector(".video-extras-sparkbars") != null){ if(document.querySelector(".video-extras-sparkbars.yt-uix-tooltip") == null){ var percent = document.querySelector(".video-extras-sparkbar-likes").style.width; document.querySelector(".video-extras-sparkbars").setAttribute("title", percent + " of viewers like this video"); document.querySelector(".video-extras-sparkbars").classList.add("yt-uix-tooltip"); } } if(document.querySelector("#watch7-user-header .yt-user-name") != null){ if(document.querySelector("#watch7-user-header .yt-user-name.yt-uix-tooltip") == null){ var user = document.querySelector("#watch7-user-header .yt-user-name").textContent; document.querySelector("#watch7-user-header .yt-user-name").setAttribute("title", "View " + user + "'s channel"); document.querySelector("#watch7-user-header .yt-user-name").classList.add("yt-uix-tooltip"); document.querySelector("#watch7-user-header .yt-user-videos").setAttribute("title", "View " + user + "'s videos"); document.querySelector("#watch7-user-header .yt-user-videos").classList.add("yt-uix-tooltip"); } } if(document.querySelector(".yt-uix-button-subscribe-branded:not([disabled='True'])") != null){ if(document.querySelector(".yt-uix-button-subscribe-branded:not([disabled='True']):not(.yt-uix-tooltip)") != null){ document.querySelector(".yt-uix-button-subscribe-branded:not([disabled='True']):not(.yt-uix-tooltip)").setAttribute("title", "Subscribe"); document.querySelector(".yt-uix-button-subscribe-branded:not([disabled='True']):not(.yt-uix-tooltip)").classList.add("yt-uix-tooltip"); } } if(document.querySelector(".yt-uix-button-subscribed-branded:not([disabled='True'])") != null){ if(document.querySelector(".yt-uix-button-subscribed-branded:not([disabled='True']):not(.yt-uix-tooltip)") != null){ document.querySelector(".yt-uix-button-subscribed-branded:not([disabled='True']):not(.yt-uix-tooltip)").setAttribute("title", "Unsubscribe"); document.querySelector(".yt-uix-button-subscribed-branded:not([disabled='True']):not(.yt-uix-tooltip)").classList.add("yt-uix-tooltip"); } } if(document.querySelector("#watch7-secondary-actions .start") != null){ if(document.querySelector("#watch7-secondary-actions .start.yt-uix-tooltip") == null){ document.querySelector("#watch7-secondary-actions .start").setAttribute("title", "Video info"); document.querySelector("#watch7-secondary-actions .start").classList.add("yt-uix-tooltip"); if(STS.expWatch7AboutTabRename == true){ document.querySelector("#watch7-secondary-actions .start span").textContent = "Video info"; } if(STS.expWatch7AboutTabRename2 == true){ document.querySelector("#watch7-secondary-actions .start span").textContent = "Details"; } } } } }); if(document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(2)") != null){ if(document.querySelector("#watch7-secondary-actions .yt-uix-button.yt-uix-tooltip:nth-child(2)") == null){ document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(2)").setAttribute("title", "Share"); document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(2)").classList.add("yt-uix-tooltip"); } } if(document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(3)") != null){ if(document.querySelector("#watch7-secondary-actions .yt-uix-button.yt-uix-tooltip:nth-child(3)") == null){ document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(3)").setAttribute("title", "Add to"); document.querySelector("#watch7-secondary-actions .yt-uix-button:nth-child(3)").classList.add("yt-uix-tooltip"); } } } function createSearchText(){ if($("#masthead-search-term")){ $("#masthead-search-term").setAttribute("placeholder",lang[usedLang].search); } } function doModernGuide(){ if($("#FEwhat_to_watch-guide-item.startube") == null){ if($("#FEwhat_to_watch-guide-item") != null){ $("#FEwhat_to_watch-guide-item .display-name span").textContent = "Home"; $("#FEwhat_to_watch-guide-item").classList.add("startube"); let container = $("#FEwhat_to_watch-guide-item .yt-valign-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","st-svg thumb"); container.classList.add("startube-has-icon"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); } } 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","st-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","st-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","st-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","st-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","st-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","st-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","st-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","st-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","st-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","st-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 createMaterialSpinner(){ if($("#st-material-spinner") == null && $("#movie_player")){ let container = $("#movie_player"); let newElem = document.createElement("div"); newElem.id = "st-material-spinner"; newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); } } function doModernPlayer(){ 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 if($(".ytp-button-pause")){ container = $(".ytp-button-pause"); }else{ container = $(".ytp-button-stop"); } 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(SRS.playerVersion.tValue!="modernV1"){ 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(SRS.playerVersion.tValue!="modernV1"){ 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(SRS.playerVersion.tValue!="modernV1"){ 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(SRS.playerVersion.tValue!="modernV1"){ 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(SRS.playerVersion.tValue!="modernV1"){ 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(SRS.playerVersion.tValue!="modernV1"){ 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(SRS.playerVersion.tValue!="modernV1"){ 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-acme") == 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-acme") == null){ $("#masthead-expanded [href='#']").click(); let container = $("#st-menus"); let newElem = document.createElement("div"); newElem.id = "st-account-menu"; newElem.classList = "startube-menu st-show-svgs st-acme"; newElem.setAttribute("page","main"); newElem.innerHTML = `
    `; container.insertBefore(newElem, container.children[0]); constructAccountMenu(); $("#st-polymer-switch-account").addEventListener("click",function(){ $(".st-acme").setAttribute("page","accounts"); }); $("#st-polymer-appearance").addEventListener("click",function(){ $(".st-acme").setAttribute("page","appearance"); }); $("#st-dark-tog").addEventListener("click",function(){ if(gdp.dark==true){ html.removeAttribute("dark"); setV3Settings("light"); }else{ html.setAttribute("dark",""); setV3Settings("dark"); } window.location.reload(); switch(gdp.dark){ case "true": setV3Settings("dark"); break; case "false": setV3Settings("light"); break; window.location.reload(); } }); document.querySelectorAll("#st-polymer-menu-back").forEach(i=>{ i.addEventListener("click",function(){ $(".st-acme").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-acme").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-acme[visible]")){ $(".st-acme").removeAttribute("visible"); }else{ $(".st-acme").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") || $("[location='feed-recs']")){ 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; let allowContinue=true; if(item.data.richItemRenderer){ console.log(item.data.richItemRenderer); let rndr=""; if(item.data.richItemRenderer.content.gridVideoRenderer){ rndr=item.data.richItemRenderer.content.gridVideoRenderer; }else if (item.data.richItemRenderer.content.videoRenderer){ rndr=item.data.richItemRenderer.content.videoRenderer; } if(rndr.contextItemData){ if(rndr.contextItemData.authorAvatar){ pfp = rndr.contextItemData.authorAvatar; data = rndr.contextItemData.authorNavigationEndpoint; url = rndr.contextItemData.authorNavigationEndpoint.browseEndpoint.canonicalBaseUrl; }else{ allowContinue=false; } }else{ allowContinue=false; } }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 } } console.log(allowContinue); if(allowContinue==true){ 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"); } } }); if($("#content li + .continuation_item_wrapper button.listening") == null){ $("#content li + .continuation_item_wrapper button").classList.add("listening"); $("#content li + .continuation_item_wrapper button").addEventListener("click",function(){ if($("[location='feed-recs']")){ var elm = "#content li + .continuation_item_wrapper button:not(.listening)"; waitForElement10(elm).then(function(elm){ if(canGo != false){ doRichGridHome(); } }); } }); } if($("[location='feed-recs'] .branded-page-v2-subnav-container ul:not(.st-chip-bar)")){ let container = $(".branded-page-v2-subnav-container"); let newElem = document.createElement("div"); newElem.setAttribute("class","st-chip-bar-container"); container.insertBefore(newElem, container.children[0]); let toMove = $(".branded-page-v2-subnav-container ul"); let newHome = $(".branded-page-v2-subnav-container .st-chip-bar-container"); newHome.append(toMove); toMove.classList.add("st-chip-bar"); toMove.classList.add("flex-bar"); $(".st-chip-bar").style.transform = "translateX(0)"; /* newElem.addEventListener("wheel",function(e){ console.log(e); let delta = e.deltaY; delta = delta * -1; let cb = $(".st-chip-bar"); let tf = cb.style.transform.replace(/[^\d.]/g, ''); let we = $("#content").getBoundingClientRect().width; //we = we * -1; tf = +tf; tf = tf * -1; let newDelta = delta + tf; if(newDelta>0){ newDelta=0; } console.log(newDelta, we); if(newDelta * -1>we - 480){ newDelta=we * -1 + 480; } cb.style.transform = "translateX(" + newDelta + "px)"; //$(".st-chip-bar").style.transform.translateX = rock1 + "px"; //$("#appbar-guide-menu").style.left = rock.left + "px"; //$(".st-chip-bar").style; });*/ if($(".st-chip-bar li:not(.listening)")){ if($(".st-chip-bar .yt-uix-button-menu-item-selected")){ let chipAll=$(".st-chip-bar .yt-uix-button-menu-item-selected"); //$(".st-chip-bar .yt-uix-button-menu-item-selected").setAttribute("class","st-chip listening active yt-uix-button-menu-item-selected"); chipAll.setAttribute("class","st-chip listening active st-chip-all yt-uix-tooltip"); chipAll.addEventListener("click",function(){ window.location.reload(); }); } document.querySelectorAll(".st-chip-bar li:not(.listening)").forEach(i => { if(!i.classList.contains("active")){ i.setAttribute("class","st-chip listening"); } i.addEventListener("click",function(){ if($("[location='feed-recs']")){ //$(".st-chip.active").classList.remove("yt-uix-button-menu-item-selected"); $(".st-chip.active").classList.remove("active"); i.classList.add("active"); // i.classList.add("yt-uix-button-menu-item-selected"); var elm = "#content li + .continuation_item_wrapper button:not(.listening)"; waitForElement10(elm).then(function(elm){ if(canGo != false){ doRichGridHome(); } }); } }); }); } } } } // 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 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 createFrostedGlass(){ if($("#yt-masthead-content") && $("#st-frosted-glass") == null){ let container=$("#masthead-positioner-container"); let newElem=document.createElement("div"); newElem.id="st-frosted-glass"; container.insertBefore(newElem,container.children[0]); } } // 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","st-show-svgs yt-uix-tooltip"); newElem.setAttribute("title",lang[usedLang].upload); newElem.href="/upload"; newElem.innerHTML=STH2.ST_SVG; container.insertBefore(newElem,container.children[2]); newElem.querySelector(".filled-icon path").setAttribute("d",svgDefs.upload.f); newElem.querySelector(".outline-icon path").setAttribute("d",svgDefs.upload.o); } } // 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","st-show-svgs yt-uix-tooltip"); newElem.innerHTML=STH2.ST_SVG; container.insertBefore(newElem, container.children[2]); newElem.querySelector(".filled-icon path").setAttribute("d",svgDefs.create.f); newElem.querySelector(".outline-icon path").setAttribute("d",svgDefs.create.o); let container2 = $("#st-menus"); let newElem2 = document.createElement("div"); newElem2.id = "startube-create-menu"; newElem2.classList = "startube-menu startube-material-menu st-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","st-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 st-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","st-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","st-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","st-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=lang[usedLang].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").forEach(i => { i.data = { abstractVorElement: { navigationEndpoint: { browseEndpoint: { browseId: "FEhistory", canonicalBaseUrl: "/feed/history" }, commandMetadata: { webCommandMetadata: { url: "/feed/history" } } } } } }); 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 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 setAdaptiveLayout(layout){ executeRadios("layoutSelect",layout); SRS.layoutSelect.visValue=layout; executeRadios("playerSizerules",SRS.playerSizerules,true); applySettings(); window.location.reload(); } function everyLoad(x){ if(STS.newConfig == true){ var elm = "#page"; waitForElement10(elm).then(function(elm){ if(canGo != false){ STS.newConfig=false; executeRadios("layoutSelect", "hh2024", true); SRS.layoutSelect.visValue="hh2024"; SRS.layoutSelect.value="hh2024"; executeRadios("playerSizerules", SRS.playerSizerules, true); applySettings(); if($(".cardified-page.site-center-aligned")==null){ setTimeout(function(){ window.location.reload(); }, 100); } } }); } everyLoadNeo(x); grabData(); checkPlaylistThumbnails(); if(SRS.playerSizerules == "flexwatchLarge"){ $("html").setAttribute("flexwatch-large",""); } if($("#page.watch")&&SRS.layoutMode.tValue=="adaptive"){ let date = $("#watch-description-content").data.watchDescription.clip.videoDate.simpleText; if( date.includes("2023")|| date.includes("2024") ){ if(STS.expAdaptiveLayout2024HH==true){ if(SRS.layoutSelect.visValue!="hh2024"){ setAdaptiveLayout("hh2024"); } }else if(STS.expAdaptiveLayout2022Cap==true){ if(SRS.layoutSelect.visValue!="poly2022"){ setAdaptiveLayout("poly2022"); } }else if(STS.expAdaptiveLayout2018Cap==true){ if(SRS.layoutSelect.visValue!="hh2018"){ setAdaptiveLayout("hh2018"); } }else if(STS.expAdaptiveLayout2017Cap==true){ if(SRS.layoutSelect.visValue!="hh2017"){ setAdaptiveLayout("hh2017"); } }else if(SRS.layoutSelect.visValue!="amst2024c"){ setAdaptiveLayout("amst2024c"); } } if( date.includes("2022") ){ if(STS.expAdaptiveLayout2018Cap==true){ if(SRS.layoutSelect.visValue!="hh2018"){ setAdaptiveLayout("hh2018"); } }else if(STS.expAdaptiveLayout2017Cap==true){ if(SRS.layoutSelect.visValue!="hh2017"){ setAdaptiveLayout("hh2017"); } }else if( date.includes("Oct")|| date.includes("Nov")|| date.includes("Dec") ){ if(STS.expAdaptiveLayout2022Cap==true){ if(SRS.layoutSelect.visValue!="poly2022"){ setAdaptiveLayout("poly2022"); } }else{ if(SRS.layoutSelect.visValue!="amst2024c"){ setAdaptiveLayout("amst2024c"); } } }else if(SRS.layoutSelect.visValue!="poly2022"){ setAdaptiveLayout("poly2022"); } } if( date.includes("2021") ){ if(STS.expAdaptiveLayout2018Cap==true){ if(SRS.layoutSelect.visValue!="hh2018"){ setAdaptiveLayout("hh2018"); } }else if(STS.expAdaptiveLayout2017Cap==true){ if(SRS.layoutSelect.visValue!="hh2017"){ setAdaptiveLayout("hh2017"); } }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.visValue!="poly2020"){ setAdaptiveLayout("poly2020"); } }else{ if(SRS.layoutSelect.visValue!="poly2021"){ setAdaptiveLayout("poly2021"); } } } if( date.includes("2020") ){ if(STS.expAdaptiveLayout2018Cap==true){ if(SRS.layoutSelect.visValue!="hh2018"){ setAdaptiveLayout("hh2018"); } }else if(STS.expAdaptiveLayout2017Cap==true){ if(SRS.layoutSelect.visValue!="hh2017"){ setAdaptiveLayout("hh2017"); } }else if(SRS.layoutSelect.visValue!="poly2020"){ setAdaptiveLayout("poly2020"); } } if( date.includes("2019") ){ if(STS.expAdaptiveLayout2018Cap==true){ if(SRS.layoutSelect.visValue!="hh2018"){ setAdaptiveLayout("hh2018"); } }else if(STS.expAdaptiveLayout2017Cap==true){ if(SRS.layoutSelect.visValue!="hh2017"){ setAdaptiveLayout("hh2017"); } }else if( date.includes("Jan")|| date.includes("Feb")|| date.includes("Mar")|| date.includes("Apr") ){ if(SRS.layoutSelect.visValue!="poly2018"){ setAdaptiveLayout("poly2018"); } }else if( date.includes("Nov")|| date.includes("Dec") ){ if(SRS.layoutSelect.visValue!="poly2020"){ setAdaptiveLayout("poly2020"); } }else{ if(SRS.layoutSelect.visValue!="poly2019"){ setAdaptiveLayout("poly2019"); } } } if( date.includes("2018") ){ if(STS.expAdaptiveLayout2018Cap==true){ if(SRS.layoutSelect.visValue!="hh2018"){ setAdaptiveLayout("hh2018"); } }else if(STS.expAdaptiveLayout2017Cap==true){ if(SRS.layoutSelect.visValue!="hh2017"){ setAdaptiveLayout("hh2017"); } }else if(SRS.layoutSelect.visValue!="poly2018"){ setAdaptiveLayout("poly2018"); } } 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.visValue!="hhE2017"){ setAdaptiveLayout("hhE2017"); } }else{ if(SRS.layoutSelect.visValue!="hh2017"){ setAdaptiveLayout("hh2017"); } } } if( date.includes("2016") ){ if( date.includes("Jan")|| date.includes("Feb")|| date.includes("Mar")|| date.includes("Apr") ){ if(SRS.layoutSelect.visValue!="hhE2016"){ setAdaptiveLayout("hhE2016"); } }else if( date.includes("May")|| date.includes("Jun")|| date.includes("Jul")|| date.includes("Aug") ){ if(SRS.layoutSelect.visValue!="hhM2016"){ setAdaptiveLayout("hhM2016"); } }else{ if(SRS.layoutSelect.visValue!="hh2016"){ setAdaptiveLayout("hh2016"); } } } 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.visValue!="hhE2015"){ setAdaptiveLayout("hhE2015"); } }else if( date.includes("Dec") ){ if(SRS.layoutSelect.visValue!="hhE2016"){ setAdaptiveLayout("hhE2016"); } }else{ if(SRS.layoutSelect.visValue!="hh2015"){ setAdaptiveLayout("hh2015"); } } } if( date.includes("2014") ){ if( date.includes("Jan")|| date.includes("Feb") ){ if(SRS.layoutSelect.visValue!="hh2013_3"){ setAdaptiveLayout("hh2013_3"); } }else if( date.includes("Sep")|| date.includes("Oct")|| date.includes("Nov")|| date.includes("Dec") ){ if(SRS.layoutSelect.visValue!="hhE2015"){ setAdaptiveLayout("hh2015"); } }else{ if(SRS.layoutSelect.visValue!="hh2014"){ setAdaptiveLayout("hh2014"); } } } 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.visValue!="hh2013_1"){ setAdaptiveLayout("hh2013_1"); } }else if( date.includes("Jul")|| date.includes("Aug")|| date.includes("Sep")|| date.includes("Oct") ){ if(SRS.layoutSelect.visValue!="hh2013_2"){ setAdaptiveLayout("hh2013_2"); } }else{ if(SRS.layoutSelect.visValue!="hh2013_3"){ setAdaptiveLayout("hh2013_3"); } } } if( date.includes("2012") ){ if( date.includes("Dec") ){ if(SRS.layoutSelect.visValue!="hh2013_1"){ setAdaptiveLayout("hh2013_1"); } }else if( date.includes("Mar")|| date.includes("Apr")|| date.includes("May")|| date.includes("Jun")|| date.includes("Jul") ){ if(SRS.layoutSelect.visValue!="cosmic2012_2"){ setAdaptiveLayout("cosmic2012_2"); } }else if( date.includes("Jan")|| date.includes("Feb") ){ if(SRS.layoutSelect.visValue!="cosmic2012_1"){ setAdaptiveLayout("cosmic2012_1"); } }else{ if(SRS.layoutSelect.visValue!="cosmic2012_3"){ setAdaptiveLayout("cosmic2012_3"); } } } if( date.includes("2005")|| date.includes("2006")|| date.includes("2007")|| date.includes("2008") ){ if(SRS.layoutSelect.visValue!="stargazer2008_1"){ setAdaptiveLayout("stargazer2008_1"); } } if( date.includes("2009") ){ if( date.includes("Sep")|| date.includes("Oct")|| date.includes("Nov")|| date.includes("Dec") ){ if(SRS.layoutSelect.visValue!="stargazer2009_3"){ setAdaptiveLayout("stargazer2009_3"); } }else{ if(SRS.layoutSelect.visValue!="stargazer2009_1"){ setAdaptiveLayout("stargazer2009_1"); } } } if( date.includes("2011") ){ if( date.includes("Dec") ){ if(SRS.layoutSelect.visValue!="cosmic2012_1"){ setAdaptiveLayout("cosmic2012_1"); } }else{ if(SRS.layoutSelect.visValue!="aozora2011_2"){ setAdaptiveLayout("aozora2011_2"); } } } if( date.includes("2010") ){ if(SRS.layoutSelect.visValue!="aozora2011_2"){ setAdaptiveLayout("aozora2011_2"); } } } 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("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"; } }); if (STS.expCosmicGuideLayout==true) { 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"); $("body .v3").setAttribute("playlist-watch","false"); 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")){ $("body .v3").setAttribute("playlist-watch","true"); var elm = "#watch7-playlist-data"; waitForElement10(elm).then(function(elm){ if(canGo != false){ reconstructPlaylist(); } }); } /*if($(".live_chat_box_iframe_holder") && $("#st-live-chat") == null && STS.replaceLC == true){ CWD.isLive=true; replaceLC(); }else{ CWD.isLive=false; }*/ } 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("chan-loc","home"); if(window.location.href.includes("/feed")){ $("html").setAttribute("chan-loc","feed"); } if(window.location.href.includes("/videos")){ $("html").setAttribute("chan-loc","videos"); } if(window.location.href.includes("/playlists")){ $("html").setAttribute("chan-loc","playlists"); } if(window.location.href.includes("/community")){ $("html").setAttribute("chan-loc","backstage"); } if(window.location.href.includes("/about")){ $("html").setAttribute("chan-loc","about"); } if(window.location.href.includes("/search")){ $("html").setAttribute("chan-loc","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($("[chan-loc]")){ $("html").removeAttribute("chan-loc"); } } if($("#page.search")){ $("html").setAttribute("location","search"); } let feedLink="/feed/what_to_watch/recommended"; if(SRS.logoLink.tValue=="feedGrid"){ feedLink="/feed/what_to_watch/recommended?flow=grid"; } if($("#logo-container")){ if(SRS.logoLink.tValue=="feedList"||SRS.logoLink.tValue=="feedGrid"){ $("#logo-container").href=feedLink; $("#logo-container").data={ abstractVorElement:{ navigationEndpoint:{ browseEndpoint:{ browseId:"FEwhat_to_watch", canonicalBaseUrl:feedLink }, commandMetadata:{ webCommandMetadata:{ url:feedLink } } } } } } } let subsLink = "/feed/subscriptions"; if(SRS.subsGrid.tValue=="grid"){ subsLink = "/feed/subscriptions?flow=grid"; } if(SRS.logoLink.tValue=="feedGrid"){ var elm="#FEwhat_to_watch-guide-item"; waitForElement10(elm).then(function(elm){ if(canGo!=false){ $("#FEwhat_to_watch-guide-item a").href="/feed/what_to_watch/recommended?flow=grid"; $("#FEwhat_to_watch-guide-item a").data={ abstractVorElement:{ navigationEndpoint:{ browseEndpoint:{ browseId:"FEwhat_to_watch", canonicalBaseUrl:"/feed/what_to_watch/recommended?flow=grid" }, commandMetadata:{ webCommandMetadata:{ url:"/feed/what_to_watch/recommended?flow=grid" } } } } } } }); } if($("#logo-container")){ if(SRS.logoLink.tValue=="subs"){ $("#logo-container").href=subsLink; $("#logo-container").data={ abstractVorElement:{ navigationEndpoint:{ browseEndpoint:{ browseId:"FEsubscriptions", canonicalBaseUrl:subsLink }, commandMetadata:{ webCommandMetadata:{ url:subsLink } } } } } } } if(SRS.subsGrid.tValue=="grid"&&$("#FEsubscriptions-guide-item")){ $("#FEsubscriptions-guide-item a").href=subsLink; $("#FEsubscriptions-guide-item a").data={ abstractVorElement:{ navigationEndpoint:{ browseEndpoint:{ browseId:"FEsubscriptions", canonicalBaseUrl:subsLink }, commandMetadata:{ webCommandMetadata:{ url:subsLink } } } } } } let theDelay=1; if(isPopstate==true){ theDelay=300; } setTimeout(function(){ switch (SRS.relatedTabs.tValue){ case "onNoSub": $(".spitfire-body-container").setAttribute("rel-tabs","on-no-sub"); break; case "on": $(".spitfire-body-container").setAttribute("rel-tabs","on"); break; case "off": $(".spitfire-body-container").setAttribute("rel-tabs","off"); break; } switch (SRS.watchLayout.tValue){ case "watch4b": $(".spitfire-body-container").setAttribute("wl","w4b"); break; case "watch4c": $(".spitfire-body-container").setAttribute("wl","w4c"); break; case "watch5a": $(".spitfire-body-container").setAttribute("wl","w5a"); break; case "watch5b": $(".spitfire-body-container").setAttribute("wl","w5b"); break; case "watch5c": $(".spitfire-body-container").setAttribute("wl","w5c"); break; case "watch5d": $(".spitfire-body-container").setAttribute("wl","w5d"); break; case "watch7beta": $(".spitfire-body-container").setAttribute("wl","w7beta"); html.setAttribute("exp-epic-watch7",""); break; case "watch7": $(".spitfire-body-container").setAttribute("wl","w7"); break; case "watch8": $(".spitfire-body-container").setAttribute("wl","w8"); break; case "watch9a": $(".spitfire-body-container").setAttribute("wl","w9a"); break; case "watch9b": $(".spitfire-body-container").setAttribute("wl","w9b"); break; case "watch9c": $(".spitfire-body-container").setAttribute("wl","w9c"); break; case "watch10beta": $(".spitfire-body-container").setAttribute("wl","w10beta"); break; case "watch10teaser": $(".spitfire-body-container").setAttribute("wl","w10finalteaser"); break; case "watch10": $(".spitfire-body-container").setAttribute("wl","w10final"); break; case "altWatch9": $(".spitfire-body-container").setAttribute("wl","aw9"); break; case "altWatch9Fancy": $(".spitfire-body-container").setAttribute("wl","aw9f"); break; default: } switch (SRS.searchText.tValue){ case "on": createSearchText(); break; case "off": break; } switch (SRS.playerVersion.tValue){ case "modernV1": doModernPlayer(); html.setAttribute("pl-ver","mv1"); break; case "modernV2": doModernPlayer(); html.setAttribute("pl-ver","mv2"); break; case "modernV3": doModernPlayer(); html.setAttribute("pl-ver","mv2-3"); break; case "modernV4": doModernPlayer(); html.setAttribute("pl-ver","mv2-34"); break; } $(".spitfire-body-container").setAttribute("search-text",SRS.searchText.tValue); $(".spitfire-body-container").setAttribute("rel-size",SRS.relatedSize.tValue); $(".spitfire-body-container").setAttribute("layout",SRS.layoutSelect.tValue); createNewWatchPrep(); },theDelay); var arraNum=0; arra.forEach(i=>{ let name=i[0]; checkSetting(name).then(function(value){ if(value == true && name == "configNoCast"){ html.setAttribute("nocast",""); }else if(value == true && name == "configAccountMenuV3SettingsButton"){ html.setAttribute("config-account-menu-v3-settings-button",""); createMESettingsBtn(); }else if(value == true && name == "configPolymerMenuV3SettingsButton"){ html.setAttribute("config-polymer-menu-v3-settings-button",""); }else if(value == true && name == "configCreateMenuV3SettingsButton"){ html.setAttribute("config-create-menu-v3-settings-button",""); }else if(value == true && name == "configWatch7SidebarCardShadow"){ html.setAttribute("config-watch7-sidebar-card-shadow",""); }else if(value == true && name == "expWatch9NoOwner"){ html.setAttribute("exp-watch9-no-owner", ""); }else if(value == true && name == "expWatch9TrueExpander"){ html.setAttribute("exp-watch9-true-expander",""); }else if(value == true && name == "expWatch9SidebarBus"){ html.setAttribute("exp-watch9-sidebar-bus",""); }else if(value == true && name == "expWatch9StickyColumns"){ html.setAttribute("exp-watch9-sticky-columns",""); }else if(value == true && name == "expGuideAlwaysPinned"){ guideAlwaysPinned(); }else if(value == true && name == "expWatch8NoMore"){ html.setAttribute("exp-watch8-no-more",""); }else if(value == true && name == "expSharrow"){ html.setAttribute("exp-sharrow",""); }else if(value == true && name == "expAlwaysShowCompactDate"){ html.setAttribute("exp-always-show-compact-date",""); }else if(value == true && name == "expNeverShowCompactDate"){ html.setAttribute("exp-never-show-compact-date",""); }else if(value == true && name == "expTwoColumnSearchResults"){ html.setAttribute("exp-two-column-search-results",""); }else if(value == true && name == "expRelatedGrid"){ html.setAttribute("exp-related-grid",""); }else if(value == true && name == "expMoveCountsToButtons"){ html.setAttribute("exp-move-counts-to-buttons",""); moveCountsToButtons(); }else if(value == true && name == "expMoreTooltips"){ html.setAttribute("exp-more-tooltips",""); createMoreTooltips(); }else if(value == true && name == "expFlatLogo"){ html.setAttribute("exp-flat-logo",""); }else if(value == true && name == "expInvertLogo"){ html.setAttribute("exp-invert-logo",""); }else if(value == true && name == "expGlossyLogo"){ html.setAttribute("exp-glossy-title",""); }else if(value == true && name == "expClassicTitle"){ html.setAttribute("exp-classic-title",""); }else if(value == true && name == "expClassicGuide"){ html.setAttribute("exp-classic-guide",""); }else if(value == true && name == "expClassicSubscribe"){ html.setAttribute("classic-sub",""); }else if(value == true && name == "expClassicStyles"){ html.setAttribute("classic-styles",""); html.setAttribute("exp-classic-styles",""); }else if(value == true && name == "expClassicLtod"){ html.setAttribute("exp-classic-ltod",""); }else if(value == true && name == "expClassicButtons"){ html.setAttribute("exp-classic-buttons",""); }else if(value == true && name == "expBigSearchThumbs"){ html.setAttribute("exp-big-search-thumbs",""); }else if(value == true && name == "expBiggerSearchThumbs"){ html.setAttribute("exp-bigger-search-thumbs",""); }else if(value == true && name == "expNoVideosLink"){ html.setAttribute("exp-no-videos-link",""); }else if(value == true && name == "expSkinnySubscribe"){ html.setAttribute("exp-skinny-subscribe",""); }else if(value == true && name == "expModernStyles"){ html.setAttribute("modern-styles",""); changeCommentPlaceholder(0); changeCommentHeader(0); }else if(value == true && name == "modernCards"){ html.setAttribute("modern-cards",""); }else if(value == true && name == "sbStyles"){ html.setAttribute("skybird",""); createSearchIcon(); createNotifIcon(); //doStuffForSkybird }else if(value == true && name == "sbCardPhysics"){ html.setAttribute("skybird-cards",""); }else if(value == true && name == "expLightChannelBar"){ html.setAttribute("exp-light-channel-bar",""); }else if(value == true && name == "expModernNotifIcon"){ html.setAttribute("exp-modern-notif-icon",""); }else if(value == true && name == "expModernTopbar"){ html.setAttribute("exp-modern-topbar",""); }else if(value == true && name == "expModernUpload"){ html.setAttribute("exp-modern-upload",""); }else if(value == true && name == "expModernGuideButton"){ html.setAttribute("exp-modern-guide-button",""); }else if(value == true && name == "expModernSearchIcon"){ html.setAttribute("exp-modern-search-icon",""); }else if(value == true && name == "expModernTitle"){ html.setAttribute("exp-modern-title",""); }else if(value == true && name == "expModernGuide"){ html.setAttribute("exp-modern-guide",""); doModernGuide(); }else if(value == true && name == "expModernHome"){ html.setAttribute("exp-modern-home",""); }else if(value == true && name == "expModernPlaylists"){ html.setAttribute("exp-modern-playlists",""); }else if(value == true && name == "expModernPlaylistThumbnails"){ html.setAttribute("exp-modern-playlist-thumbnails",""); }else if(value == true && name == "expPlaylistRedBorder"){ html.setAttribute("exp-playlist-red-border",""); }else if(value == true && name == "expPlaylistTimestamps"){ html.setAttribute("exp-playlist-timestamps",""); }else if(value == true && name == "expTrueScrollableGuide"){ html.setAttribute("exp-true-scrollable-guide",""); doScrollableGuide(); }else if(value == true && name == "materialSpinner"){ html.setAttribute("mtrl-spin",""); setTimeout(createMaterialSpinner, 100); }else if(value == true && name == "expGoogleApps"){ html.setAttribute("exp-google-apps",""); createGoogleApps(); }else if(value == true && name == "expCommentsFullWidth"){ html.setAttribute("exp-comments-full-width",""); }else if(value == true && name == "expNoByText"){ html.setAttribute("exp-no-by-text",""); }else if(value == true && name == "expAccountMenu"){ html.setAttribute("exp-account-menu",""); createAccountMenu(); }else if(value == true && name == "expStaticSite"){ html.setAttribute("static", ""); }else if(value == true && name == "expHideAppbar"){ html.setAttribute("hide-appbar", ""); }else if(value == true && name == "expEpicWatch7Flat"){ html.setAttribute("exp-epic-watch7-flat",""); }else if(value == true && name == "expEpicHeader"){ html.setAttribute("topbar","epic"); }else if(value == true && name == "expEpicStyling"){ html.setAttribute("exp-epic-styling",""); }else if(value == true && name == "expEpicFeeds"){ html.setAttribute("exp-epic-feeds",""); doCosmicFeedHeader(); }else if(value == true && name == "expCosmicHeader"){ html.setAttribute("topbar","cosmic"); }else if(value == true && name == "expCosmicBG"){ html.setAttribute("cosmic-bg",""); }else if(value == true && name == "expCosmicButtons"){ html.setAttribute("cosmic-buttons",""); }else if(value == true && name == "expCosmicStyles"){ html.setAttribute("cosmic-styles",""); }else if(value == true && name == "expCosmicBanners"){ html.setAttribute("exp-cosmic-banners",""); }else if(value == true && name == "expCosmicBannersV2"){ html.setAttribute("exp-cosmic-banners-v2",""); }else if(value == true && name == "expCosmicComments"){ html.setAttribute("exp-legacy-comments",""); html.setAttribute("exp-cosmic-comments",""); }else if(value == true && name == "expCosmicGuideLayout"){ html.setAttribute("exp-cosmic-guide-layout",""); createCosmicGuide(); }else if(value == true && name == "expCosmicGuideStyle"){ html.setAttribute("exp-cosmic-guide-style",""); }else if(value == true && name == "expCosmicFeedsV1"){ html.setAttribute("exp-cosmic-feeds-v1",""); doCosmicFeedHeader(); }else if(value == true && name == "expCosmicFeedsV2"){ html.setAttribute("exp-cosmic-feeds-v2",""); doCosmicFeedHeader(); }else if(value == true && name == "expCosmicFeedsV3"){ html.setAttribute("exp-cosmic-feeds-v3",""); doCosmicFeedHeader(); }else if(value == true && name == "expCosmicFeedsThirdColumn"){ html.setAttribute("exp-cosmic-feeds-third-column",""); doThirdColumnVideosPrep(); }else if(value == true && name == "expNotifSquare"){ html.setAttribute("notif-square",""); }else if(value == true && name == "expChannels3" && !window.location.href.includes("force-c4")){ html.setAttribute("exp-channels3",""); createChannels3Prep(); }else if(value == true && name == "expChannels3BGVerticalRepeat" && !window.location.href.includes("force-c4")){ html.setAttribute("exp-channels3-bg-vertical-repeat",""); }else if(value == true && name == "expChannels3BGHorizontalRepeat" && !window.location.href.includes("force-c4")){ html.setAttribute("exp-channels3-bg-horizontal-repeat",""); }else if(value == true && name == "expChannels3TimeVisible"){ html.setAttribute("exp-channels3-time-visible",""); }else if(value == true && name == "expChannels3DateVisible"){ html.setAttribute("exp-channels3-date-visible",""); }else if(value == true && name == "expChannels3DateHidden"){ html.setAttribute("exp-channels3-date-hidden",""); }else if(value == true && name == "expNoGuide"){ html.setAttribute("guide","no"); }else if(value == true && name == "expGuideOnFeedsOnly"){ html.setAttribute("guide","feeds"); }else if(value == true && name == "expAozoraHome"){ html.setAttribute("aozora-home",""); html.setAttribute("exp-aozora-home",""); }else if(value == true && name == "expAozoraHeader"){ html.setAttribute("aozora-header",""); html.setAttribute("exp-aozora-header",""); searchButtonLowercase(); }else if(value == true && name == "expAozoraBG"){ html.setAttribute("exp-aozora-bg",""); }else if(value == true && name == "expAozoraStyles"){ html.setAttribute("aozora-styles",""); html.setAttribute("exp-aozora-styles",""); }else if(value == true && name == "expAozoraComments"){ html.setAttribute("exp-legacy-comments",""); html.setAttribute("exp-aozora-comments",""); }else if(value == true && name == "expAozoraSubscribe"){ html.setAttribute("exp-aozora-subscribe",""); }else if(value == true && name == "expAozoraTopbarLinks"){ html.setAttribute("exp-aozora-topbar-links",""); createAozoraTopbarLinks(); }else if(value == true && name == "expAozoraSearch"){ html.setAttribute("aozora-search",""); }else if(value == true && name == "expStargazerTabbedHeader"){ html.setAttribute("stargazer-header","tabbed"); stargazerHeader(0); searchButtonLowercase(); }else if(value == true && name == "expStargazerBarHeader"){ html.setAttribute("stargazer-header","bar"); stargazerHeader(1); searchButtonLowercase(); }else if(value == true && name == "expStargazerSimpleHeader"){ html.setAttribute("stargazer-header","simple"); stargazerHeader(2); searchButtonLowercase(); }else if(value == true && name == "expStargazerSubscribe"){ html.setAttribute("stargazer-sub",""); }else if(value == true && name == "expHomeTab"){ html.setAttribute("exp-home-tab",""); }else if(value == true && name == "expRoboto"){ html.setAttribute("exp-roboto",""); }else if(value == true && name == "expCenteredSearch"){ html.setAttribute("exp-centered-search",""); }else if(value == true && name == "expBigSearch"){ html.setAttribute("exp-big-search",""); }else if(value == true && name == "expSecondarySearchIcon"){ html.setAttribute("exp-secondary-search-icon",""); createSearchTumor(); }else if(value == true && name == "expMaterialSearch"){ html.setAttribute("exp-material-search",""); createSearchIcon(); }else if(value == true && name == "expPolymerAccountMenu"){ html.setAttribute("exp-account-menu",""); html.setAttribute("exp-polymer-account-menu",""); createAccountMenu(); }else if(value == true && name == "expPolymerShell"){ html.setAttribute("exp-polymer-shell",""); createSearchIcon(); createNotifIcon(); }else if(value == true && name == "expEarlyPolymerShell"){ html.setAttribute("exp-polymer-shell",""); html.setAttribute("exp-early-polymer-shell",""); createNotifIcon(); }else if(value == true && name == "expEarlyPolymerGuide"){ html.setAttribute("exp-early-polymer-guide",""); }else if(value == true && name == "expPolymerGen2Colors"){ html.setAttribute("poly-g2-colors",""); html.setAttribute("exp-polymer-gen2-colors",""); }else if(value == true && name == "polymerGen2Comments"){ html.setAttribute("poly-g2-comments",""); }else if(value == true && name == "simpleReply"){ html.setAttribute("simple-reply",""); }else if(value == true && name == "typographySpacing"){ html.setAttribute("typography-spacing",""); }else if(value == true && name == "expPolymerSubscribe"){ html.setAttribute("exp-polymer-subscribe",""); }else if(value == true && name == "expPolymerGen2Subscribe"){ html.setAttribute("exp-polymer-subscribe",""); html.setAttribute("exp-polymer-gen2-subscribe",""); }else if(value == true && name == "expPolymerStyles"){ html.setAttribute("poly-styles",""); html.setAttribute("exp-polymer-styles",""); changeCommentPlaceholder(1); changeCommentHeader(1); setTimeout(createShelfIcons,200); }else if(value == true && name == "expBetaPolymerStyles"){ html.setAttribute("exp-beta-polymer-styles",""); }else if(value == true && name == "expPolymerChannels"){ html.setAttribute("exp-polymer-channels",""); }else if(value == true && name == "expColorfulChannels"){ html.setAttribute("exp-colorful-channels",""); }else if(value == true && name == "expPolymerComments"){ html.setAttribute("poly-comments",""); html.setAttribute("exp-polymer-comments",""); moveSortBtn(); }else if(value == true && name == "expPolymerTooltips"){ html.setAttribute("exp-polymer-tooltips",""); }else if(value == true && name == "expTopbarShadow"){ html.setAttribute("exp-topbar-shadow",""); }else if(value == true && name == "expMaterialSignIn"){ html.setAttribute("exp-material-sign-in",""); }else if(value == true && name == "expRichGridHome"){ html.setAttribute("exp-rich-grid-home",""); setTimeout(doRichGridHome,200); }else if(value == true && name == "expCommentsTeaser"){ html.setAttribute("comment-teaser",""); }else if(value == true && name == "expSegmentedLtod"){ html.setAttribute("segmented-ltod",""); }else if(value == true && name == "expRoundedSubscribe"){ html.setAttribute("round-sub",""); }else if(value == true && name == "expBlackSubscribe"){ html.setAttribute("black-sub",""); }else if(value == true && name == "expRoundedThumbs"){ html.setAttribute("round-thumbs",""); }else if(value == true && name == "expRoundedPlayer"){ html.setAttribute("round-player",""); }else if(value == true && name == "expRoundedSearch"){ html.setAttribute("round-search",""); }else if(value == true && name == "expRoundedGuide"){ html.setAttribute("exp-rounded-guide",""); }else if(value == true && name == "expRoundedStyles"){ html.setAttribute("round-styles",""); }else if(value == true && name == "expFrostedGlass"){ html.setAttribute("frosted-glass",""); createFrostedGlass(); }else if(value == true && name == "expPolymerGen3Colors"){ html.setAttribute("poly-g3-colors",""); }else if(value == true && name == "expYTSansTitle"){ html.setAttribute("exp-yt-sans-title",""); }else if(value == true && name == "expWMRButtonsLowercase"){ html.setAttribute("exp-wmr-buttons-lowercase",""); }else if(value == true && name == "expWMRAddTo"){ html.setAttribute("exp-wmr-addto",""); }else if(value == true && name == "expWMRNoSaveText"){ html.setAttribute("exp-wmr-no-save-text",""); }else if(value == true && name == "expWMRNoShareText"){ html.setAttribute("exp-wmr-no-share-text",""); }else if(value == true && name == "expOutlineIcons"){ html.setAttribute("exp-outline-icons",""); }else if(value == true && name == "expRoundedTopbarPfp"){ html.setAttribute("exp-rounded-topbar-pfp",""); }else if(value == true && name == "expUploadIcon"){ html.setAttribute("upload-icon",""); createUploadIcon(); }else if(value == true && name == "expCreateIcon"){ html.setAttribute("create-icon",""); createCreateIcon(); }else if(value == true && name == "expYouTubeApps"){ html.setAttribute("exp-youtube-apps",""); createYouTubeApps(); }else if(value == true && name == "expRingo2"){ html.setAttribute("ringo2",""); html.setAttribute("exp-ringo2",""); doGuideIcons("ringo2"); }else if(value == true && name == "expRingo2Gradients"){ html.setAttribute("ringo2-gradients",""); }else if(value == true && name == "favi24"){ replaceFavicon("2024"); }else if(value == true && name == "favi24O"){ replaceFavicon("2024_old"); }else if(value == true && name == "favi17"){ replaceFavicon("2017"); }else if(value == true && name == "favi15"){ replaceFavicon("2015"); }else if(value == true && name == "favi12"){ replaceFavicon("2012"); }else if(value == true && name == "favi10"){ replaceFavicon("2010"); }else if(value == true && name == "favi05"){ replaceFavicon("2005"); }else if(value == true && name == "expHideYoodles"){ html.setAttribute("exp-hide-yoodles",""); hideYoodles(); }else if(value == true && name == "expFixedShareIcons"){ html.setAttribute("exp-fixed-share-icons",""); }else if(value == true && name == "expFixedXIcon"){ html.setAttribute("exp-fixed-x-icon",""); }else if(value == true && name == "expMaterialGbar"){ html.setAttribute("exp-material-gbar",""); } }); }); refreshCheck++; if( $("#st-nsp") === null && STS.show2point4 == true ){ let container76=$('.spitfire-body-container.v3'); let newElem76=document.createElement("div"); newElem76.id="st-nsp"; newElem76.innerHTML=`
    What's new in StarTube 2.4.0
    Watch Layout HTML Rewrite
    The watch layout HTML (page structure) has been rewritten. While mostly an under-the-hood improvement, some improvements have been made to the user experience because of it. The rewrite isn't 100% done, and some things might be changed/fixed in the future.
    Stargazer watch layout
    One of the Stargazer watch layouts, Watch4B has been added thanks to the HTML rewrite.
    Advanced options are being phased out
    Several advanced options have been removed, and were replaced with easier to understand regular options.
    New layout options
    2023 Layout, Early 2017 Layout, Early 2014 Layout (Prototype), and Late 2013 Layout (Prototype) have been added, and are all variations of existing layouts.
    Free as a Skybird
    An entirely custom layout has been added to StarTube: Skybird. It aims to be an alternate universe 2016/2017 layout.
    Toggle Dark Mode from the account menu
    In the Polymer layouts, you can now toggle dark mode from the account menu.
    `; container76.insertBefore(newElem76, container76.children[0]); $("#close-st-nsp").addEventListener("click", function(){ $("#st-nsp").remove(); STS.show2point4 = false; applySettings(0); $("html").setAttribute("no-startube-popup",""); var elm = "#show2point4"; waitForElement10(elm).then(function(elm){ if(canGo != false){ $("#show2point4").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 st-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(){ let cont=$('.spitfire-body-container.v3'); let nE=document.createElement("div"); nE.id="startube-settings-window-entity"; nE.classList="hid astronomical-settings-refresh astro-settings flex-bar"; nE.innerHTML=`
    StarTube 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)
    2023
    Polymer
    2022
    2021
    2020
    2019
    2018
    2017
    Early 2017
    2016 (prototype layout)
    Skybird (Custom layout)
    2016 (alternate universe version)
    Unfinished
    Hitchhiker
    2024 (unofficial legacy layout, uses the pinkish Ringo2 rebrand)
    2018-2020 (legacy layout)
    2017 (legacy layout)
    Early 2017
    Late 2016
    Mid 2016
    Early 2016
    2015
    Early 2015
    2014
    Early 2014 (Prototype centered layout)
    Late 2013 (Prototype centered layout)
    Late 2013
    Mid 2013
    Early 2013
    Epic Panda (prototype layout)
    Mid-Late 2012 (prototype layout)
    Mid-Late 2012 (prototype layout, custom ver)
    Cosmic Panda
    Late 2012
    Mid 2012
    Early 2012
    Aozora
    2011
    Stargazer
    Late 2009
    Early 2009
    2008

    Misc

    General site layout options.

    Favicon select

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

    Outline Icons

    Auto
    On for 2021 and later layouts
    On for Polymer and Amsterdam layouts
    Off

    Homepage (https://www.youtube.com/) Redirect

    Choose which page the YouTube homepage redirects to. That is to say, this lets you select which version of the homepage to see on YouTube's first load.
    Auto
    Off (do not redirect)
    Grid Feed (used for 2020-present)
    List Feed (used for 2012)

    Topbar

    General site layout options.

    Gbar version

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

    "Search" text on searchbar

    Auto
    On (Mid 2016-Present)
    Off (Until 2016)

    Account menu

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

    Guide

    Guide (left sidebar) options.

    Guide item link

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

    Guide always pinned

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

    Subscriptions page

    Choose whether to use List or Grid view for subscriptions by default.
    Auto
    Grid
    List

    Player

    General site layout options.

    Player version

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

    Player loading icon

    Auto
    Classic will be used on layouts from before 2018.
    Classic (Pre-2018)
    Material (2018-Present)

    Player size

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

    Watch page

    General site layout options.

    Watch layout select

    Select the layout that the watch page uses. Note that not all combinations are tested, and some will work better than others (Watch4B will not work well on newer layouts for example)
    Auto
    Auto (use alt-watch9 for Hitchhiker layouts)
    Watch4B (Early 2009)
    Star ratings, title on top, description on right
    Watch5C (2011)
    Title on top
    Watch5D (2012)
    Title on top
    Watch7 Beta (2012, Epic Panda)
    Watch7 (2013-2014) [V3 default]
    Watch8 (2015-2017, 2017-2020 [Legacy layout])
    Watch9A (2016-2019)
    Watch9B (2020-2022)
    Watch10 Beta (2022)
    Watch10 (With comment teaser, late 2022 experiment)
    Watch10 (Late 2022-Present)
    Alt-watch9 (works best on the hitchhiker layouts)
    Alternate universe 2015-2017-ish layout
    Fancy Alt-watch9 (works best on the hitchhiker layouts)
    Your current layout/watch layout combination may not work as intended.

    Related tabs

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

    Related grid

    On (only works with 2013 and later)
    Off

    Related video size

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

    Show dates on related videos

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

    Channel page

    General site layout options.

    Channel version

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

    Colorful channels

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

    Advanced

    Advanced configuration. If you change a setting here, you will most likely need to lock it, or else the setting will be overwritten.
    `; cont.insertBefore(nE,cont.children[1]); let dump = $("#startube-microconfigs-dump"); let number = 1; ScF.forEach(i => { let settingElem = document.createElement("div"); settingElem.id = i[1].name; settingElem.classList = "astro-setting astro-checkbox-setting"; settingElem.setAttribute("hide","false"); settingElem.innerHTML = `
    `; dump.insertBefore(settingElem,dump.children[number-1]); settingElem.querySelector(".astro-setting-title span").textContent=i[1].name; settingElem.querySelector(".astro-setting-desc span").innerHTML=i[1].desc; settingElem.setAttribute("value",i[1].value); settingElem.setAttribute("iron",i[1].locked); if(i[1].locked==true){ settingElem.querySelector(".astro-lock").title="This setting is locked. Click to unlock it."; } number++; }); $("#downloadJSON").addEventListener("click", function(){ createJSON(); }); $("#astro-v3-settings-access-btn").addEventListener("click", openV3Settings); $("#cancelJSON").addEventListener("click", function(){ $("#startube-settings-window").setAttribute("loading-config","false"); }); $("#json-upload").addEventListener("cancel", () => { $("#startube-settings-window").setAttribute("loading-config","false"); }); $("#json-upload").addEventListener("change", () => { $("#startube-settings-window").setAttribute("loading-config","true"); }); $("#st-load-file button").addEventListener("click", function(){ if($("#st-load-file input").files[0]){ var theFile = $("#st-load-file input").files[0].type; if(theFile == "application/json"){ var file = $("#st-load-file input").files[0]; actionFile(file); }else{ alert("Invalid file type. Please upload a JSON file."); } }else{ alert("Please select a file."); } }); $("#RTD").addEventListener("click", function(){ localStorage.removeItem(theSets); localStorage.removeItem("starTubeConfigCreated"); window.location.reload(); }); $("#DAO").addEventListener("click", function(){ var settingArray = document.querySelectorAll('.astro-checkbox-setting[value="true"][iron="false"] .astro-checkbox'); settingArray.forEach(item => { item.click(); }); window.location.reload(); }); doRadioSettings(); $("#refreshPage").addEventListener("click", function(){ window.location.reload(); }); $("#exitSettings").addEventListener("click", showHideSettings); $("#startube-settings-fence").addEventListener("click", showHideSettings); $("#astro-micro-filter-button").addEventListener("click", showHideMicroFilter); $("#astro-micro-filter-fence").addEventListener("click", showHideMicroFilter); $("#astro-mc-all").addEventListener("click",function(){ $("#astro-micro-filter-button").setAttribute("state","all"); $("#astro-micro-filter-menu").setAttribute("state","all"); $("#startube-microconfigs-dump").setAttribute("filter","none"); showHideMicroFilter(); /*let resultCount = 0; setTimeout(function(){ var arraySettings = document.querySelectorAll(".astro-checkbox-setting[hide='false']"); arraySettings.forEach(i => { resultCount++; }); $("#startube-result-count span").textContent = resultCount + " results"; $("#startube-settings-content").setAttribute("searching","true"); }, 10);*/ }); $("#astro-mc-locked").addEventListener("click",function(){ $("#astro-micro-filter-button").setAttribute("state","locked"); $("#astro-micro-filter-menu").setAttribute("state","locked"); $("#startube-microconfigs-dump").setAttribute("filter","locked"); showHideMicroFilter(); /*let resultCount = 0; setTimeout(function(){ var arraySettings = document.querySelectorAll(".astro-checkbox-setting[hide='false'][iron='true']"); arraySettings.forEach(i => { resultCount++; }); $("#startube-result-count span").textContent = resultCount + " results"; $("#startube-settings-content").setAttribute("searching","true"); }, 10);*/ }); $("#astro-mc-unlocked").addEventListener("click",function(){ $("#astro-micro-filter-button").setAttribute("state","unlocked"); $("#astro-micro-filter-menu").setAttribute("state","unlocked"); $("#startube-microconfigs-dump").setAttribute("filter","unlocked"); showHideMicroFilter(); /*let resultCount = 0; setTimeout(function(){ var arraySettings = document.querySelectorAll(".astro-checkbox-setting[hide='false'][iron='false']"); arraySettings.forEach(i => { resultCount++; }); $("#startube-result-count span").textContent = resultCount + " results"; $("#startube-settings-content").setAttribute("searching","true"); }, 10);*/ }); function showHideMicroFilter(){ if($("#astro-micro-filter-menu.hid") != null){ $("#astro-micro-filter-menu").classList.remove("hid"); $("#astro-micro-filter-fence").classList.remove("hid"); }else if($("#astro-micro-filter-menu.hid") == null){ $("#astro-micro-filter-menu").classList.add("hid"); $("#astro-micro-filter-fence").classList.add("hid"); } } document.querySelectorAll(".astro-sidebar-item").forEach(i => { i.addEventListener("click", function(){ $("#startube-settings-content > div").setAttribute("state",i.getAttribute("p")); $(".astro-sidebar-item.active").classList.remove("active"); i.classList.add("active"); }); }); $("#astro-searchbar input").addEventListener("keydown", function(){ let resultCount = 0; let key = event.key; let thisE = this; setTimeout(function(){ let value = thisE.value; if(value == "`"){ var arraySettings = document.querySelectorAll(".astro-checkbox-setting"); arraySettings.forEach(i => { if(i){ resultCount++; i.setAttribute("hide","false"); } }); //$("#startube-result-count span").textContent = "In total, there are " + resultCount + " settings available (you are seeing this because you searched '`')"; $("#startube-settings-content").setAttribute("searching","true"); }else if(value !== ""){ var arraySettings = document.querySelectorAll(".astro-checkbox-setting"); arraySettings.forEach(i => { if(i){ var item = i.getAttribute("id"); item = item.toUpperCase(); value = value.toUpperCase(); if(item.includes(value)){ resultCount++; i.setAttribute("hide","false"); }else{ i.setAttribute("hide","true"); } } }); //$("#startube-result-count span").textContent = resultCount + " results"; $("#startube-settings-content").setAttribute("searching","true"); }else{ var arraySettings = document.querySelectorAll(".astro-checkbox-setting"); arraySettings.forEach(i => { if(i){ i.setAttribute("hide","false"); $("#startube-settings-content").setAttribute("searching","false"); // $("#startube-result-count span").textContent = "All of the microconfigs that StarTube's presets and other options make use of. You can customize a lot here, but it can get confusing."; } }); } }, 10); }); var arraySettings = document.querySelectorAll(".astro-checkbox-setting"); arraySettings.forEach(i => { if(i){ var item = i.getAttribute("id"); var itemV = STS[item]; if(itemV == true){ i.setAttribute("value","true"); }else{ i.setAttribute("value","false"); } if(STS.ironSettings[item] != null){ i.setAttribute("iron", "true"); } } }); doListen(); function doListen(){ let i=0; for (i = 0; i < document.querySelectorAll(".astro-checkbox").length; i++){ document.querySelectorAll(".astro-checkbox")[i].onclick = function(e) { e.preventDefault(); var iron = this.parentNode.parentNode.getAttribute("iron"); if(iron == "true"){ alert("You must unlock this setting before changing it. (Locking and unlocking settings is done by right clicking them)"); }else{ var thisElm = this.parentNode.parentNode; changeSetting(thisElm); } applySettings(); }; } for (i = 0; i < document.querySelectorAll(".astro-lock").length; i++){ document.querySelectorAll(".astro-lock")[i].onclick = function(e) { e.preventDefault(); var thisElm = this.parentNode.parentNode; var iron = thisElm.getAttribute("iron"); let id = thisElm.id; let value = thisElm.getAttribute("value"); if(value == "true"){ value = true; } if(value == "false"){ value = false; } if(value == null){ value = false; } if(STS.ironSettings[id] == null){ STS.ironSettings[id] = value; thisElm.setAttribute("iron","true"); this.setAttribute("data-tooltip-text","This setting is locked. Click to unlock it."); applySettings(); }else{ delete STS.ironSettings[id]; thisElm.setAttribute("iron","false"); this.setAttribute("data-tooltip-text","Lock setting"); applySettings(); } applySettings(); }; } } } function changeSetting(thisElm,a){ if(a!=="a"){ var theSetting=thisElm.getAttribute("id"); var checked=thisElm.getAttribute("value"); }else{ var theSetting=thisElm; var checked=true; } if(theSetting=="RTD"){ localStorage.removeItem(theSets); localStorage.removeItem("starTubeConfigCreated"); window.location.reload(); }else if(a!=="a"){ if(checked=="true"){ STS[theSetting]=false; thisElm.setAttribute("value","false"); if(STS.ironSettings[theSetting]){ STS.ironSettings[theSetting]=false; } applySettings(); }else{ STS[theSetting]=true; thisElm.setAttribute("value","true"); if(STS.ironSettings[theSetting]){ STS.ironSettings[theSetting]=true; } applySettings(); } } function doIronSettings(){ let irons=Object.entries(STS.ironSettings); irons.forEach(i=>{ let name=i[0]; let value=i[1]; STS[name]=value; }); } } function doRadioSettings(){ document.querySelectorAll(".astro-radio-setting").forEach(i=>{ if(i.hasAttribute("c")){ let c=i.getAttribute("c"); let xc="[p='"+c+"']"; let value=i.getAttribute("value"); if(value==STS.radioSettings[c].visValue){ i.setAttribute("checked","true"); $(".astro-settings").setAttribute(c,value); } i.addEventListener("click",function(){ document.querySelectorAll(".astro-radio-setting").forEach(i2=>{ if (i2.getAttribute("c")==c&&i2.getAttribute("checked")=="true"){ i2.removeAttribute("checked"); $(".astro-settings").setAttribute(c,value); value==i.getAttribute("value"); i.setAttribute("checked","true"); STS.radioSettings[c].visValue=value; executeRadios(c,value); applySettings(); } }); }); } }); document.querySelectorAll(".astro-input-setting").forEach(i => { if(i.hasAttribute("c")){ let c=i.getAttribute("c"); let xc="[p='"+c+"']"; let value=i.querySelector("input").value; if(value==STS.inputSettings[c].visValue){ $(".astro-settings").setAttribute(c,value); } i.addEventListener("keydown",function(){ setTimeout(function(){ value=i.querySelector("input").value; $(".astro-settings").setAttribute(c,value); STS.inputSettings[c].visValue=value; STS.inputSettings[c].tValue=value; applySettings(); },10); }); } }); } function handoffComments(dir){ let tM=$(".comments-iframe-container"); let nH=$("#comment-panel [js-destination]"); if(dir=="forward"){ html.setAttribute("comment-panel-open","true"); } if(dir=="backward"){ nH=$("#watch-discussion"); html.setAttribute("comment-panel-open","false"); } nH.insertBefore(tM,nH.children[0]); } //EXfunct function addIcons(){ if($("#watch-like svg")==null){ var elm="#eow-description"; waitForElement10(elm).then(function(elm){ if(canGo!=false){ let cont=$("#watch-like .yt-uix-button-icon-wrapper"); let nE=document.createElement("div"); nE.setAttribute("class","st-svg"); cont.classList.add("startube-has-icon"); nE.innerHTML = `
    `; cont.insertBefore(nE,cont.children[0]); } }); } if($("#watch-dislike svg")==null){ var elm="#eow-description"; waitForElement10(elm).then(function(elm){ if(canGo!=false){ let cont=$("#watch-dislike .yt-uix-button-icon-wrapper"); let nE=document.createElement("div"); nE.setAttribute("class","st-svg"); cont.classList.add("startube-has-icon"); nE.innerHTML = `
    `; cont.insertBefore(nE,cont.children[0]); } }); } } function createApps(){ let cont=$('#yt-masthead-user'); let nE=document.createElement("div"); nE.id='google-apps'; nE.innerHTML=`
    `; cont.insertBefore(nE,cont.children[0]); } let nE=document.createElement("div"); nE.id="startube-style"; nE.innerHTML=` `; html.insertBefore(nE,html.children[0]); } function doBanner(){ var elm="#content.ytd-app"; waitForElement(elm).then(function(elm){ if(canGo!=false){ let cont=$('#content.ytd-app'); let nE=document.createElement("div"); nE.id="nebula-return-banner"; nE.innerHTML=`
    StarTube requires Vorapis 2013 (V3) to function.
    Download V3
    `; cont.insertBefore(nE,cont.children[0]); nE.querySelector("#nebula-return-banner-button").addEventListener("click",()=>{ window.location.reload(); }); nE.querySelector("#nebula-return-banner-close-button").addEventListener("click",()=>{ $("#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(); } })();