// ==UserScript== // @name StarTube Beta // @namespace http://tampermonkey.net/ // @version 2.4.0.50 // @description More layouts and customization options for V3 // @author lightbeam24 // @match *://*.youtube.com/* // @icon https://www.youtube.com/s/desktop/71ca99b3/img/logos/favicon.ico // @icon64 https://www.youtube.com/s/desktop/daa4e47c/img/logos/favicon_96x96.png // @grant GM_getValue // @grant GM_setValue // @grant GM_deleteValue // @grant GM_registerMenuCommand // @license MIT // @downloadURL none // ==/UserScript== var globalDataPoints = { "currWatchData":{} }; window.globalDataPoints = globalDataPoints; document.globalDataPoints = globalDataPoints; var $ = a => document.querySelector(a); let theSets = "ST_BLEEDING_EDGE_SETTINGS"; function showHideSettings(){ if($("#startube-settings-window-entity.hid") != null){ $("#startube-settings-window-entity").classList.remove("hid"); }else if($("#startube-settings-window.hid") == null){ $("#startube-settings-window-entity").classList.add("hid"); } if($(".jfk-dialog-background.hid") == null){ $(".jfk-dialog-background").click(); } } function openV3Settings(){ $("#upload-menu-account:not(.yt-uix-button-menu-new-section-separator)").click(); if($("#startube-settings-window.hid") == null){ $("#startube-settings-window-entity").classList.add("hid"); } } function 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 4 RC1"; let currStarChan="Beta"; let currStarDetails="Release Candidate"; let STUID="st24041r"; 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; let sets={}; let layoutFactor=10; 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=""; var langEn={ upload:"Upload", create:"Create", search:"Search", stsets:"StarTube Settings" } var lang={ en:{ upload:langEn.upload, create:langEn.create, search:langEn.search, stsets:langEn.stsets }, ja:{ upload:"アップロード", create:"作成する", search:"検索", stsets:"StarTube設定" }, pl:{ upload:"Prześlij", create:"Utwórz", search:"Szukaj", stsets:"Ustawienia StarTube" } } var svgDefs={ search:{ f:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z", o:"M20.87,20.17l-5.59-5.59C16.35,13.35,17,11.75,17,10c0-3.87-3.13-7-7-7s-7,3.13-7,7s3.13,7,7,7c1.75,0,3.35-0.65,4.58-1.71 l5.59,5.59L20.87,20.17z M10,16c-3.31,0-6-2.69-6-6s2.69-6,6-6s6,2.69,6,6S13.31,16,10,16z" }, prominentSearch:{ c:"M17.5 11a6.5 6.5 0 11-13 0 6.5 6.5 0 0113 0Zm-1.594 6.32a8 8 0 111.414-1.414l3.887 3.887a1 1 0 01-1.414 1.414l-3.887-3.887Z", o:"M16.296 16.996a8 8 0 11.707-.708l3.909 3.91-.707.707-3.909-3.909zM18 11a7 7 0 00-14 0 7 7 0 1014 0z" }, 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:`
Analytics Edit video
`, SVG:`
`, SVG_TOG:`
`, } var STH={ astroSector:`
`, astroSetting:`
`, astroSection:`

`, astroPage:`

General site layout options.
`, astroSettings:`
StarTube Settings Version ${currStarVer}
Your changes were automatically saved. Refresh the page for them to apply.

Misc

StarTube

Site

Layout
Misc
Topbar
Guide
Player
Watch page
Channel page
Advanced

StarTube

General site layout options.
StarTube Version: ${currStarVer}
Release Channel: ${currStarChan}
Release Type: ${currStarDetails}

Config overview

Config is from StarTube version
Config is from the channel

Reset config

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

Layout

Misc

Topbar

Guide (left sidebar)

Player

Watch page

Channel page

Advanced

Advanced settings. If you change a setting here, you will most likely need to lock it, or else the setting will be overwritten.
Note that Advanced options are deprecated and in the process of being removed.
`, 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:`
`, belowRelatedRow:` `, sideBannerRow:`
`, sideTitleRow:`
`, sidePolyOwnerRow:`
${STH0.ST_POLY_OWNER}
`, sideOwnerRow:`
${STH0.ST_OWNER}
`, sideDescRow:`
`, sideActionsRow:`
`, 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, "expMoveGuideMainSectionToTop": false, "expMoreTooltips": true, "expWatch9NoOwner": true, "expWatch9TrueExpander": false, "expWatch8NoMore": false, "expMoveCountsToButtons": false, "expSharrow": false, "expWatch7AboutTabRename": false, "expWatch7AboutTabRename2": false, "expFlatLogo": false, "expInvertLogo": false, "expGlossyLogo": false, "expClassicTitle": false, "expClassicGuide": false, "expClassicSubscribe": false, "expClassicLtod": false, "expNoVideosLink": false, "expModernGuide": false, "expPlaylistRedBorder": false, "expPlaylistTimestamps": true, "expTrueScrollableGuide": false, "expViewsString": true, "expNoByText": false, "expStaticSite": false, "expStaticSiteForcesSmallPlayer": true, "expCosmicBG": false, "expCosmicButtons": false, "expCosmicComments": false, "expCosmicGuideLayout": false, "expNotifSquare": false, "expChannels3BGVerticalRepeat": false, "expChannels3BGHorizontalRepeat": false, "expChannels3TimeVisible": false, "expChannels3DateVisible": false, "expChannels3DateHidden": false, "expNoGuide": false, "expGuideOnFeedsOnly": false, "expAozoraComments": false, "expAozoraSearch":false, "expCenteredSearch": false, "expBigSearch": false, "expMaterialSearch": false, "expTopbarShadow": false, "expSegmentedLtod": false, "expRoundedSubscribe": false, "expBlackSubscribe": false, "expRoundedSearch": false, "expWMRButtonsLowercase": false, "expWMRAddTo": false, "expWMRNoSaveText": false, "expWMRNoShareText": false, "expRichGridHome": false, "expRoundedTopbarPfp": false, "expRingo2": true, "expRingo2Gradients": true, "STPresetsAlsoSetV3Settings": true, "show2point4": true, "expHideYoodles": false, "expFixedXIcon": true, "ironSettings": {}, "inputSettings":{ favsPlaylist:{ name:"favsPlaylist", tValue:"", visValue:"" } }, "radioSettings":{ cfgWinDen:{ name:"cfgWinDen", tValue:"0", visValue:"0" }, showNew:{ name:"showNew", tValue:"on", visValue:"on" }, layoutMode:{ name:"layoutMode", tValue:"manual", visValue:"manual" }, layoutSelect:{ name:"layoutSelect", tValue:"hh2024", visValue:"hh2024" }, faviconSelect:{ name:"faviconSelect", tValue:"2024", visValue:"auto" }, rndThumbs:{ name:"rndThumbs", tValue:"off", visValue:"auto" }, siteFont:{ name:"siteFont", tValue:"roboto", visValue:"auto" }, gbarVersion:{ name:"gbarVersion", tValue:"off", visValue:"off" }, searchText:{ name:"searchText", tValue:"on", visValue:"auto" }, accountMenu:{ name:"accountMenu", tValue:"mhh", visValue:"auto" }, frostedGlass:{ name:"frostedGlass", tValue:"off", visValue:"auto" }, uploadBtn:{ name:"uploadBtn", tValue:"modern", visValue:"auto" }, appsBtn:{ name:"appsBtn", tValue:"off", visValue:"auto" }, rndPlayer:{ name:"rndPlayer", tValue:"off", 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" }, autoLoop:{ name:"autoLoop", tValue:"off", visValue:"off" }, 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" }, compactName:{ name:"compactName", 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" }, guideSubsAutoExpand:{ name:"guideSubsAutoExpand", tValue:"on", visValue:"auto" }, 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, startubeDetails:currStarDetails } }; 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={ cfgWinDen:{ name:"cfgWinDen", tValue:STS.radioSettings.cfgWinDen, visValue:STS.radioSettings.cfgWinDen }, showNew:{ name:"showNew", tValue:STS.radioSettings.showNew, visValue:STS.radioSettings.showNew }, 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 }, autoLoop:{ name:"autoLoop", tValue:STS.radioSettings.autoLoop, visValue:STS.radioSettings.autoLoop }, 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 }, guideSubsAutoExpand:{ name:"guideSubsAutoExpand", tValue:STS.radioSettings.guideSubsAutoExpand, visValue:STS.radioSettings.guideSubsAutoExpand }, 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" } } if(STS.radioSettings.compactName==null){ STS.radioSettings.compactName={ name:"compactName", tValue:"on", visValue:"on" } } if(STS.radioSettings.frostedGlass==null){ STS.radioSettings.frostedGlass={ name:"frostedGlass", tValue:"off", visValue:"auto" } } if(STS.radioSettings.cfgWinDen==null){ STS.radioSettings.cfgWinDen={ name:"cfgWinDen", tValue:"0", visValue:"0" } } if(STS.radioSettings.showNew==null){ STS.radioSettings.showNew={ name:"showNew", tValue:"on", visValue:"on" } } if(STS.radioSettings.rndPlayer==null){ STS.radioSettings.rndPlayer={ name:"rndPlayer", tValue:"off", visValue:"auto" } } if(STS.radioSettings.rndThumbs==null){ STS.radioSettings.rndThumbs={ name:"rndThumbs", tValue:"off", visValue:"auto" } } if(STS.radioSettings.uploadBtn==null){ STS.radioSettings.uploadBtn={ name:"uploadBtn", tValue:"modern", visValue:"auto" } } if(STS.radioSettings.appsBtn==null){ STS.radioSettings.appsBtn={ name:"appsBtn", tValue:"off", visValue:"auto" } } if(STS.radioSettings.siteFont==null){ STS.radioSettings.siteFont={ name:"siteFont", tValue:"roboto", visValue:"auto" } } if(STS.radioSettings.guideSubsAutoExpand==null){ STS.radioSettings.guideSubsAutoExpand={ name:"guideSubsAutoExpand", tValue:"on", visValue:"auto" } } if(STS.radioSettings.autoLoop==null){ STS.radioSettings.autoLoop={ name:"autoLoop", tValue:"off", visValue:"off" } } } 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 and 2025." }, "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." }, "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." }, "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" }, "expWatch7AboutTabRename":{ name:"expWatch7AboutTabRename", desc:'Change "About" to "Video info" on regular watch7.' }, "expWatch7AboutTabRename2":{ name:"expWatch7AboutTabRename2", desc:'Change "About" to "Details" on regular watch7.' }, "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" }, "expClassicLtod":{ name:"expClassicLtod", desc:"Early 2013 like to dislike bar and icons" }, "expNoVideosLink":{ name:"expNoVideosLink", desc:"Removes the videos link on watch7, watch8, and the related tabs." }, "expModernGuide":{ name:"expModernGuide", desc:"Make the guide look like it did in late 2015 onwards, also changes stuff like What to Watch to Home" }, "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." }, "expViewsString":{ name:"expViewsString", desc:'Always show the "views" text on the view count.' }, "expNoByText":{ name:"expNoByText", desc:'Removes the "by" text on video elements.' }, "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." }, "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" }, "expCosmicComments":{ name:"expCosmicComments", desc:"Use Cosmic Panda comments." }, "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." }, "expNotifSquare":{ name:"expNotifSquare", desc:"Use the old Google+ notification square instead of the bell." }, "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)" }, "expAozoraComments":{ name:"expAozoraComments", desc:"Use Aozora comments." }, "expAozoraSearch":{ name:"expAozoraSearch", desc:"Use the Aozora search layout, used from 2010-Early 2012." }, "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." }, "expMaterialSearch":{ name:"expMaterialSearch", desc:"Material search bar from 2016 Polymer, and some Hitchhiker experiements." }, "expTopbarShadow":{ name:"expTopbarShadow", desc:"Use the topbar shadow, which was used from 2016-2019 in Polymer." }, "expRichGridHome":{ name:"expRichGridHome", desc:"Makes the homepage videos really big." }, "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." }, "expRoundedSearch":{ name:"expRoundedSearch", desc:"Use the rounded searchbar from Late 2022 onwards." }, "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." }, "expRoundedTopbarPfp":{ name:"expRoundedTopbarPfp", desc:"Makes the topbar pfp round like it was in 2016 onwards" }, "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." }, "expFixedXIcon":{ name:"expFixedXIcon", desc:"Makes the X share option use the modern icon, as opposed to the pre-2023 icon." } }; let radioSets={ usedPages:[ {"a":"layout"}, {"a":"misc"}, {"a":"topbar"}, {"a":"guide"}, {"a":"player"}, {"a":"watch"}, {"a":"channel"} ], pages:[ {page:{ tab:"config", titlebar:{ text:"StarTube" }, sections:[ {section:{ id:"cfgWinDen", title:{ text:"Config Window UI Density" }, desc:{ text:"Choose the size of buttons and text in this menu. (This setting will apply without refreshing the page)" }, opts:[ {opt:{ name:"Normal", value:"0" }}, {opt:{ name:"Compact", value:"1" }} ] }}, {section:{ id:"showNew", new:true, title:{ text:"Highlight newly added settings" }, desc:{ text:"Add highlights to settings newly added to StarTube. This setting is always highlighted for demonstration purposes. (This setting will apply without refreshing the page)" }, opts:[ {opt:{ name:"On", value:"on" }}, {opt:{ name:"Off", value:"off" }} ] }} ] }}, {page:{ tab:"layout", titlebar:{ text:"Layout" }, sections:[ {section:{ id:"layoutMode", title:{ text:"Layout Mode" }, desc:{ text:"" }, opts:[ {opt:{ name:"Manual", value:"manual", mText:{ text:"Choose your layout normally.", color:"normal" } }}, {opt:{ name:"Adaptive", value:"adaptive", mText:{ text:"Example: if you watch a video from 2020, the layout will automatically switch to the 2020 layout.", color:"normal" } }} ] }}, {section:{ id:"layoutSelect", title:{ text:"Layout Select" }, desc:{ text:"" }, opts:[ {opt:{ name:"Custom (don't enforce any specific layout, ideal for making use of V3's config options)", value:"passive", mText:{ text:"For advanced users", color:"normal" } }}, {sector:{ sectorTitle:{ text:"Amsterdam" }, opts:[ {opt:{ name:"2024 (Custom ver)", value:"amst2024c" }}, {opt:{ name:"2023", value:"amst2023_1" }} ] }}, {sector:{ sectorTitle:{ text:"Polymer" }, opts:[ {opt:{ name:"2022", value:"poly2022" }}, {opt:{ name:"2021", value:"poly2021" }}, {opt:{ name:"2020", value:"poly2020" }}, {opt:{ name:"2019", value:"poly2019" }}, {opt:{ name:"2018", value:"poly2018" }}, {opt:{ name:"2017", value:"poly2017" }}, {opt:{ name:"Early 2017", value:"polyE2017" }}, {opt:{ name:"2016 (Prototype layout)", value:"poly2016" }} ] }}, {sector:{ sectorTitle:{ text:"Skybird (Custom layout)" }, opts:[ {opt:{ name:"2024 (alternate universe version)", value:"sb2024" }}, {opt:{ name:"2017-2018 (alternate universe version)", value:"sb2017" }}, {opt:{ name:"2016 (alternate universe version)", value:"sb2016" }} ] }}, {sector:{ sectorTitle:{ text:"Hitchhiker" }, opts:[ {opt:{ name:"2024 (unofficial legacy layout, uses the pinkish Ringo2 rebrand)", value:"hh2024" }}, {opt:{ name:"2018-2020 (legacy layout)", value:"hh2018" }}, {opt:{ name:"2017 (legacy layout)", value:"hh2017" }}, {opt:{ name:"Early 2017", value:"hhE2017" }}, {opt:{ name:"Late 2016", value:"hh2016" }}, {opt:{ name:"Mid 2016", value:"hhM2016" }}, {opt:{ name:"Early 2016", value:"hhE2016" }}, {opt:{ name:"2015", value:"hh2015" }}, {opt:{ name:"Early 2015", value:"hhE2015" }}, {opt:{ name:"2014", value:"hh2014" }}, {opt:{ name:"Early 2014 (Prototype centered layout)", value:"hh2014alt_1" }}, {opt:{ name:"Late 2013 (Prototype centered layout)", value:"hh2013alt_3" }}, {opt:{ name:"Late 2013", value:"hh2013_3" }}, {opt:{ name:"Mid 2013", value:"hh2013_2" }}, {opt:{ name:"Early 2013", value:"hh2013_1" }} ] }}, {sector:{ sectorTitle:{ text:"Epic Panda" }, opts:[ {opt:{ name:"Mid-Late 2012 (prototype layout)", value:"epic2012_2" }}, {opt:{ name:"Mid-Late 2012 (prototype layout, custom ver)", value:"epic2012_1" }} ] }}, {sector:{ sectorTitle:{ text:"Cosmic Panda" }, opts:[ {opt:{ name:"Late 2012", value:"cosmic2012_3" }}, {opt:{ name:"Mid 2012", value:"cosmic2012_2" }}, {opt:{ name:"Early 2012", value:"cosmic2012_1" }} ] }}, {sector:{ sectorTitle:{ text:"Aozora" }, opts:[ {opt:{ name:"2011", value:"aozora2011_2" }} ] }}, {sector:{ sectorTitle:{ text:"Stargazer" }, opts:[ {opt:{ name:"Late 2009", value:"stargazer2009_3" }}, {opt:{ name:"Early 2009", value:"stargazer2009_1" }}, {opt:{ name:"2008", value:"stargazer2008_1" }} ] }}, ] }} ] }}, {page:{ tab:"misc", titlebar:{ text:"Misc" }, sections:[ {section:{ id:"faviconSelect", title:{ text:"Favicon select" }, desc:{ text:"Choose which little icon appears on the tabs. Note that these don't work 100% of the time." }, opts:[ {opt:{ name:"Auto", value:"auto" }}, {opt:{ name:"2024", value:"2024" }}, {opt:{ name:"2024 (Old)", value:"2024_old" }}, {opt:{ name:"2017-2024", value:"2017" }}, {opt:{ name:"2015-2017", value:"2015" }}, {opt:{ name:"2012-2015 [V3 Default]", value:"2012" }}, {opt:{ name:"2010-2012", value:"2010" }}, {opt:{ name:"2005-2010", value:"2005" }} ] }}, {section:{ id:"outlineIcons", title:{ text:"Outline icons" }, desc:{ text:"" }, opts:[ {opt:{ name:"Auto", value:"auto", mText:{ text:"On for 2021 and later layouts", color:"normal" } }}, {opt:{ name:"On for Polymer and Amsterdam layouts", value:"on" }}, {opt:{ name:"Off", value:"off" }} ] }}, {section:{ id:"homeRedir", title:{ text:"Homepage (https://www.youtube.com/) Redirect" }, desc:{ text:`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.` }, opts:[ {opt:{ name:"Auto", value:"auto" }}, {opt:{ name:"Off (Do not redirect)", value:"off" }}, {opt:{ name:"Grid Feed (used for 2020-present)", value:"feedGrid" }}, {opt:{ name:"List Feed (used for 2012)", value:"feedList" }} ] }}, {section:{ id:"rndThumbs", title:{ text:"Rounded Thumbnails" }, desc:{ text:"Choose whether or not video thumbnails are given rounded corners." }, opts:[ {opt:{ name:"Auto", value:"auto" }}, {opt:{ name:"On", value:"on" }}, {opt:{ name:"Off", value:"off" }} ] }}, {section:{ id:"siteFont", title:{ text:"Site Font" }, desc:{ text:"Choose what font is used on the page. Note that certain elements will be unaffected, such as the YouTube Sans elements on the Amsterdam layouts." }, opts:[ {opt:{ name:"Auto", value:"auto" }}, {opt:{ name:"Roboto (2015-Present)", value:"roboto" }}, {opt:{ name:"Arial (Until 2015)", value:"arial" }} ] }} ] }}, {page:{ tab:"topbar", titlebar:{ text:"Topbar" }, sections:[ {section:{ id:"gbarVersion", title:{ text:"Gbar Version" }, desc:{ text:"The black bar that used to appear at the top of Google pages before 2014-ish." }, opts:[ {opt:{ name:"Modern", value:"modern" }}, {opt:{ name:"Classic", value:"classic" }}, {opt:{ name:"Material (custom)", value:"material" }}, {opt:{ name:"Off", value:"off" }} ] }}, {section:{ id:"logoLink", title:{ text:"Logo Link" }, desc:{ text:"Choose which page the YouTube logo links to." }, opts:[ {opt:{ name:"Auto", value:"auto" }}, {opt:{ name:"Normal home [V3 Default]", value:"home" }}, {opt:{ name:"Grid Feed (used for 2020-present)", value:"feedGrid" }}, {opt:{ name:"List Feed (used for 2012)", value:"feedList" }}, {opt:{ name:"Subscriptions", value:"subs" }} ] }}, {section:{ id:"searchText", title:{ text:'"Search" text on searchbar' }, desc:{ text:"" }, opts:[ {opt:{ name:"Auto", value:"auto" }}, {opt:{ name:"On (Mid 2016-Present)", value:"on" }}, {opt:{ name:"Off (Until 2016)", value:"off" }}, {opt:{ name:"List Feed (used for 2012)", value:"feedList" }} ] }}, {section:{ id:"accountMenu", title:{ text:'Account Menu' }, desc:{ text:"" }, opts:[ {opt:{ name:"Auto", value:"auto" }}, {opt:{ name:"Masthead Expanded (2014 and earlier)", value:"me" }}, {opt:{ name:"Hitchhiker Menu (2015 onwards Hitchhiker layouts)", value:"mhh" }}, {opt:{ name:"Polymer Menu (2017-present)", value:"poly" }} ] }}, {section:{ id:"frostedGlass", title:{ text:'Frosted Glass' }, desc:{ text:"Give the topbar this cool blurred transparency effect. Works on layouts from 2014 and later." }, opts:[ {opt:{ name:"Auto", value:"auto" }}, {opt:{ name:"On (2024 custom ver)", value:"on" }}, {opt:{ name:"Off", value:"off" }} ] }}, {section:{ id:"uploadBtn", title:{ text:"Upload Button" }, desc:{ text:"Choose what kind of upload button appears on the topbar. Only works with 2014 and later." }, opts:[ {opt:{ name:"Auto", value:"auto" }}, {opt:{ name:"Upload Button", value:"modern" }}, {opt:{ name:"Upload Icon", value:"icon" }}, {opt:{ name:"Create Icon", value:"create" }}, {opt:{ name:"Create Button", value:"createBtn" }} ] }}, {section:{ id:"appsBtn", title:{ text:"Apps Button" }, desc:{ text:"Choose what kind of apps button appears on the topbar. Only works with 2014 and later." }, opts:[ {opt:{ name:"Auto", value:"auto" }}, {opt:{ name:"YouTube Apps", value:"yt" }}, {opt:{ name:"Google apps", value:"goog" }}, {opt:{ name:"Off", value:"off" }} ] }} ] }}, {page:{ tab:"guide", titlebar:{ text:"Guide" }, sections:[ {section:{ id:"guideNavToFeed", title:{ text:"Guide item link" }, desc:{ text:"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.]" }, opts:[ {opt:{ name:"Auto", value:"auto" }}, {opt:{ name:"Channel", value:"off" }}, {opt:{ name:"Feed [V3 default]", value:"on" }}, {opt:{ name:"None of the above", value:"passive" }} ] }}, {section:{ id:"guideAlwaysPinned", title:{ text:"Guide Always Pinned" }, desc:{ text:"Keep the guide visible on all pages, including the watch page. Only affects layouts from 2014 and later." }, opts:[ {opt:{ name:"On", value:"on" }}, {opt:{ name:"Off", value:"off" }} ] }}, {section:{ id:"guideSubsAutoExpand", new:true, title:{ text:"Auto expand subscriptions on guide" }, desc:{ text:"When the page first loads, have the subscriptions already expanded." }, opts:[ {opt:{ name:"Auto", value:"auto" }}, {opt:{ name:"On", value:"on" }}, {opt:{ name:"Off", value:"off" }} ] }}, {section:{ id:"subsGrid", title:{ text:"Subscriptions page" }, desc:{ text:"Choose whether to use List or Grid view for subscriptions by default." }, opts:[ {opt:{ name:"Auto", value:"auto" }}, {opt:{ name:"Grid", value:"grid" }}, {opt:{ name:"List", value:"list" }} ] }} ] }}, {page:{ tab:"player", titlebar:{ text:"Player" }, sections:[ {section:{ id:"autoLoop", new:true, title:{ text:"Loop videos by default" }, desc:{ text:"Make videos loop by default. You can still disable loop like normal. Convenient for people who like to listen to music on repeat." }, opts:[ {opt:{ name:"On", value:"on" }}, {opt:{ name:"Off", value:"off" }} ] }}, {section:{ id:"playerVersion", title:{ text:"Player Version" }, desc:{ text:"" }, opts:[ {opt:{ name:"Auto", value:"auto" }}, {opt:{ name:"2021-Present", value:"modernV4" }}, {opt:{ name:"2020-2021", value:"modernV3" }}, {opt:{ name:"2016-2020", value:"modernV2" }}, {opt:{ name:"2015-2016", value:"modernV1" }}, {opt:{ name:"2013-2015 [V3 Default]", value:"default2014" }}, {opt:{ name:"Flash7", value:"flash7" }}, {opt:{ name:"Embed Player (use this if the player isn't working)", value:"embed" }}, {opt:{ name:"None of the above; do not allow StarTube to change V3's player settings (will not undo previous changes made by StarTube)", value:"passive" }} ] }}, {section:{ id:"playerSpinner", title:{ text:"Player loading icon" }, desc:{ text:"" }, opts:[ {opt:{ name:"Auto", value:"auto", mText:{ text:"Classic will be used on layouts from before 2018.", color:"normal" } }}, {opt:{ name:"Classic (Pre-2018)", value:"classic" }}, {opt:{ name:"Material (2018-Present)", value:"material" }} ] }}, {section:{ id:"playerSizerules", title:{ text:"Player Size" }, desc:{ text:"Choose the set of player sizes to use across different resolutions." }, opts:[ {opt:{ name:"Standard", value:"passive", mText:{ text:"Sticks to the basic V3 player sizes. If you don't want bugs, use this", color:"green" } }}, {opt:{ name:"Auto", value:"auto", mText:{ text:`More accurate, but uses the custom player sizes, and therefore breaks theater mode on most layouts`, color:"normal" } }}, {opt:{ name:"Non-flexwatch [always 640x360]", value:"noFlexwatch" }}, {opt:{ name:"Flexwatch Mini (V3 default)", value:"flexwatchMini" }}, {opt:{ name:"Flexwatch Mini Version 2 (~2015 onwards) [Same player sizes, but they happen at different resoltions]", value:"flexwatchMiniV2", mText:{ text:"Breaks theater mode", color:"red" } }}, {opt:{ name:"Flexwatch Medium (Custom, bigger sizes) [640x360, 1024x576, 1600x900]", value:"flexwatchMedium", mText:{ text:"Breaks theater mode", color:"red" } }}, {opt:{ name:"Flexwatch Large (Custom, even bigger sizes, closer to modern YouTube) [854x480, 1280x720, 1920x1080]", value:"flexwatchLarge", mText:{ text:"Breaks theater mode", color:"red" } }} ] }}, {section:{ id:"rndPlayer", title:{ text:"Rounded Player" }, desc:{ text:"Choose whether the non-fullscreen player has rounded corners." }, opts:[ {opt:{ name:"Auto", value:"auto" }}, {opt:{ name:"On", value:"on" }}, {opt:{ name:"Off", value:"off" }} ] }} ] }}, {page:{ tab:"watch", titlebar:{ text:"Watch Page" }, sections:[ {section:{ id:"watchLayout", title:{ text:"Watch Layout" }, desc:{ text:"" }, opts:[ {opt:{ name:"Auto", value:"auto" }}, {opt:{ name:"Auto (use alt-watch9 for Hitchhiker layouts)", value:"autoPreferAltW9" }}, {opt:{ name:"Watch4B (Early 2009)", value:"watch4b", mText:{ text:"Star ratings, title on top, description on right", color:"normal" } }}, {opt:{ name:"Watch5C (2011)", value:"watch5c", mText:{ text:"Title on top", color:"normal" } }}, {opt:{ name:"Watch5D (2012)", value:"watch5d", mText:{ text:"Title on top", color:"normal" } }}, {opt:{ name:"Watch7 Beta (2012, Epic Panda)", value:"watch7beta" }}, {opt:{ name:"Watch7 (2013-2014) [V3 default]", value:"watch7" }}, {opt:{ name:"Watch8 (2015-2017, 2017-2020 [Legacy layout])", value:"watch8" }}, {opt:{ name:"Watch9A (2016-2019)", value:"watch9a" }}, {opt:{ name:"Watch9B (2020-2022)", value:"watch9b" }}, {opt:{ name:"Watch10 Beta (2022)", value:"watch10beta" }}, {opt:{ name:"Watch10 (With comment teaser, late 2022 experiment)", value:"watch10teaser" }}, {opt:{ name:"Watch10 (Late 2022-Present)", value:"watch10" }}, {opt:{ name:"Alt-watch9 (works best on the hitchhiker layouts)", value:"altWatch9", mText:{ text:"Alternate universe 2015-2017-ish layout", color:"normal" } }}, {opt:{ name:"Fancy Alt-watch9 (works best on the hitchhiker layouts)", value:"altWatch9Fancy" }} ], cW:{ text:`
    Your current layout/watch layout combination may not work as intended.
    ` } }}, {section:{ id:"relatedTabs", title:{ text:"Related Tabs" }, desc:{ text:"" }, opts:[ {opt:{ name:"Auto (only enabled when alt-watch9 is enabled)", value:"auto" }}, {opt:{ name:"On", value:"on" }}, {opt:{ name:"On (don't move subscribe button)", value:"onNoSub" }}, {opt:{ name:"Off", value:"off" }} ] }}, {section:{ id:"relatedGrid", title:{ text:"Related Grid" }, desc:{ text:"" }, opts:[ {opt:{ name:"On (only works with 2013 and later)", value:"on" }}, {opt:{ name:"Off", value:"off" }} ] }}, {section:{ id:"relatedSize", title:{ text:"Related video size" }, desc:{ text:"" }, opts:[ {opt:{ name:"Auto", value:"auto" }}, {opt:{ name:"Smaller (2011 and earlier)", value:"smaller" }}, {opt:{ name:"Small (2012-2016)", value:"small" }}, {opt:{ name:"Medium (Custom middleground)", value:"medium" }}, {opt:{ name:"Large (2016-present)", value:"large" }}, {opt:{ name:"Huge (based on a Polymer experiment)", value:"stupid" }} ] }}, {section:{ id:"compactDate", title:{ text:"Show dates on related videos" }, desc:{ text:"" }, opts:[ {opt:{ name:"Auto", value:"auto" }}, {opt:{ name:"Always show", value:"on" }}, {opt:{ name:"Show on hover (V3 default)", value:"hover" }}, {opt:{ name:"Never show", value:"off" }} ] }}, {section:{ id:"compactName", title:{ text:"Clickable channel names on related videos" }, desc:{ text:"" }, opts:[ {opt:{ name:"Auto", value:"auto" }}, {opt:{ name:"On", value:"on" }}, {opt:{ name:"Off", value:"off" }} ] }} ] }}, {page:{ tab:"channel", titlebar:{ text:"Channel" }, sections:[ {section:{ id:"channelVersion", title:{ text:"Channel Version" }, desc:{ text:"" }, opts:[ {opt:{ name:"Auto", value:"auto" }}, {opt:{ name:"Channels4 (2013-present)", value:"c4" }}, {opt:{ name:"Channels3 (Late 2011-Early 2013)", value:"c3" }} ] }}, {section:{ id:"colorfulChannels", title:{ text:"Colorful Channels" }, desc:{ text:"Makes the rest of the page use the colors of the channel banner. Only works with Channels4." }, opts:[ {opt:{ name:"Auto (on for 2016 Polymer)", value:"auto" }}, {opt:{ name:"Auto (on for all Polymer layouts)", value:"polymer" }}, {opt:{ name:"On", value:"on" }}, {opt:{ name:"On (V3 implementation, doesn't change the guide or topbar)", value:"v3version" }}, {opt:{ name:"Off", value:"off" }} ] }} ] }} ] }; function executeRadios(i, x, K){ if(x){ if(K == true){ if(x.visValue){ 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 == "amst2025p"){ ST2019Settings(); ST2020Settings(); ST2021Settings(); ST2022Settings(); STAmsterdamSettings(); ST2025Settings(); }else 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(x == "sb2017"){ STSkybirdSettings(); STSkybird2017Settings(); }else if(x == "sb2024"){ STSkybirdSettings(); STSkybird2017Settings(); STSkybird2024Settings(); } }else if(i == "gbarVersion"){ if(x == "modern"){ setV3Settings("modernGbar"); }else if(x == "classic"){ setV3Settings("classicGbar"); }else if(x == "material"){ setV3Settings("materialGbar"); }else if(x == "off"){ setV3Settings("noGbar"); } }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=="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"|| SRS.layoutSelect.visValue=="amst2025p" ){ setV3Settings("flexwatchLarge"); }else if( SRS.layoutSelect.visValue=="sb2016"|| SRS.layoutSelect.visValue=="sb2017"|| SRS.layoutSelect.visValue=="sb2024" ){ 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=="watch11"){ STWatch11(); }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 == "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=="channelVersion"){ if(x=="c4"){ SRS.channelVersion.tValue="c4"; }else if(x=="c3"){ SRS.channelVersion.tValue="c3"; } }else if(i=="colorfulChannels"){ if(x=="auto"){ if( SRS.layoutSelect.visValue=="poly2016" ){ SRS.colorfulChannels.tValue="on"; setV3Settings("colorfulChannels"); }else{ SRS.colorfulChannels.tValue="off"; 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" ){ SRS.colorfulChannels.tValue="on"; setV3Settings("colorfulChannels"); }else{ SRS.colorfulChannels.tValue="off"; setV3Settings("normalChannels"); } }else if(x=="on"){ SRS.colorfulChannels.tValue="on"; setV3Settings("colorfulChannels"); }else if(x=="v3version"){ SRS.colorfulChannels.tValue="v3version"; setV3Settings("colorfulChannels"); }else if(x=="off"){ SRS.colorfulChannels.tValue="off"; setV3Settings("normalChannels"); } }else if(i=="outlineIcons"){ if(x=="poly"){ if( SRS.layoutSelect.visValue=="sb2016"|| SRS.layoutSelect.visValue=="sb2017"|| SRS.layoutSelect.visValue=="sb2024"|| SRS.layoutSelect.visValue=="sb2017"|| SRS.layoutSelect.visValue=="sb2024"|| 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"|| SRS.layoutSelect.visValue=="amst2025p" ){ SRS.outlineIcons.tValue="on"; }else{ SRS.outlineIcons.tValue="off"; } }else if(x=="off"){ SRS.outlineIcons.tValue="off"; } } } applySettings(); } executeRadiosParent(SRS); function executeRadiosParent(s){ executeRadios("layoutMode",s.layoutMode,true); executeRadios("layoutSelect",s.layoutSelect,true); executeRadios("faviconSelect",s.faviconSelect,true); executeRadios("rndThumbs",s.rndThumbs,true); executeRadios("siteFont",s.siteFont,true); executeRadios("gbarVersion",s.gbarVersion,true); executeRadios("searchText",s.searchText,true); executeRadios("frostedGlass",s.frostedGlass,true); executeRadios("uploadBtn",s.uploadBtn,true); executeRadios("appsBtn",s.appsBtn,true); executeRadios("accountMenu",s.accountMenu,true); executeRadios("rndPlayer",s.rndPlayer,true); executeRadios("playerVersion",s.playerVersion,true); executeRadios("playerSpinner",s.playerSpinner,true); executeRadios("playerSizerules",s.playerSizerules,true); executeRadios("autoLoop",s.autoLoop,true); executeRadios("watchLayout",s.watchLayout,true); executeRadios("relatedTabs",s.relatedTabs,true); executeRadios("relatedGrid",s.relatedGrid,true); executeRadios("relatedSize",s.relatedSize,true); executeRadios("compactDate",s.compactDate,true); executeRadios("compactName",s.compactName,true); executeRadios("guideNavToFeed",s.guideNavToFeed,true); executeRadios("guideAlwaysPinned",s.guideAlwaysPinned,true); executeRadios("guideSubsAutoExpand",s.guideSubsAutoExpand,true); executeRadios("homeRedir",s.homeRedir,true); executeRadios("logoLink",s.logoLink,true); executeRadios("subsGrid",s.subsGrid,true); executeRadios("channelVersion",s.channelVersion,true); executeRadios("colorfulChannels",s.colorfulChannels,true); executeRadios("outlineIcons",s.outlineIcons,true); } getIronSettings(); function STAltWatch9(){ SRS.watchLayout.tValue="altWatch9"; SRS.relatedTabs.tValue="on"; STS.expWatch9NoOwner = true; STS.expWatch9TrueExpander = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = 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.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = 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; } function STWatch10(){ STS.expMoveCountsToButtons=true; } function STWatch10Teaser(){ STS.expMoveCountsToButtons=true; } function STWatch11(){ STS.expWMRNoSaveText=true; STS.expWMRNoShareText=true; STS.expMoveCountsToButtons=true; } function STWatch8(){ SRS.watchLayout.tValue="watch8"; SRS.relatedTabs.tValue="off"; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = true; STS.expSharrow = true; 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.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = 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.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = 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.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = 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.faviconSelect.tValue="2015"; SRS.outlineIcons.tValue="off"; SRS.rndThumbs.tValue="off"; SRS.siteFont.tValue="roboto"; SRS.homeRedir.tValue="off"; SRS.logoLink.tValue="home"; SRS.searchText.tValue="off"; SRS.accountMenu.tValue="mhh"; SRS.frostedGlass.tValue="off"; SRS.uploadBtn.tValue="modern"; SRS.appsBtn.tValue="off"; SRS.guideAlwaysPinned.tValue="off"; SRS.guideSubsAutoExpand.tValue="on"; SRS.subsGrid.tValue="grid"; SRS.rndPlayer.tValue="off"; SRS.playerVersion.tValue="modernV1"; SRS.watchLayout.tValue="watch8"; SRS.relatedTabs.tValue="off"; SRS.relatedSize.tValue="small"; SRS.compactDate.tValue="off"; SRS.compactName.tValue="off"; SRS.playerSpinner.tValue="classic"; SRS.channelVersion.tValue="c4"; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = false; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = true; STS.expSharrow = false; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = false; STS.expFlatLogo = false; STS.expInvertLogo = false; STS.expGlossyLogo = false; STS.expClassicTitle = false; STS.expClassicGuide = false; STS.expClassicSubscribe = false; STS.expClassicLtod = false; STS.expNoVideosLink = true; STS.expModernGuide = false; STS.expPlaylistRedBorder = true; STS.expPlaylistTimestamps = true; STS.expTrueScrollableGuide = true; STS.expViewsString = false; STS.expNoByText = false; STS.expStaticSite = false; STS.expCosmicBG=false; STS.expCosmicButtons=false; STS.expCosmicComments = false; STS.expCosmicGuideLayout = false; STS.expNotifSquare = false; STS.expChannels3TimeVisible = false; STS.expChannels3DateVisible = false; STS.expChannels3DateHidden = false; STS.expNoGuide = false; STS.expGuideOnFeedsOnly = false; STS.expAozoraComments = false; STS.expAozoraSearch = false; STS.expCenteredSearch = false; STS.expBigSearch = false; STS.expMaterialSearch = false; STS.expTopbarShadow = false; STS.expRichGridHome = false; STS.expSegmentedLtod = false; STS.expRoundedSubscribe = false; STS.expBlackSubscribe = false; STS.expRoundedSearch = false; STS.expWMRButtonsLowercase = false; STS.expWMRAddTo = false; STS.expWMRNoSaveText = false; STS.expWMRNoShareText = false; STS.expRoundedTopbarPfp = false; STS.expRingo2 = false; STS.expRingo2Gradients = false; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("nirvana15"); } } function STEarly2015Settings(){ SRS.layoutSelect.tValue="hhE2015"; SRS.faviconSelect.tValue="2012"; SRS.siteFont.tValue="arial"; SRS.playerVersion.tValue="default2014"; SRS.guideSubsAutoExpand.tValue="off"; STS.expTrueScrollableGuide = false; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("nirvana15Early"); } } function ST2016Settings(){ SRS.layoutSelect.tValue="hh2016"; SRS.faviconSelect.tValue="2015"; SRS.playerVersion.tValue="modernV2"; SRS.searchText.tValue="on"; SRS.relatedSize.tValue="large"; STS.expSharrow = true; STS.expFlatLogo = true; STS.expModernGuide = true; STS.expPlaylistRedBorder = false; STS.expTrueScrollableGuide = true; STS.expViewsString = true; STS.expNoByText = true; STS.expRoundedTopbarPfp = true; STS.expHideYoodles = true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("nirvana16"); } } function STEarly2016Settings(){ SRS.layoutSelect.tValue="hhE2016"; STS.expSharrow = true; STS.expFlatLogo = true; STS.expModernGuide = true; STS.expTrueScrollableGuide = true; STS.expNoByText = 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"; SRS.uploadBtn.tValue="icon"; STS.expBigSearchThumbs = true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("nirvana16"); } } function ST2017Settings(){ SRS.layoutSelect.tValue="hh2017"; SRS.faviconSelect.tValue="2017"; SRS.uploadBtn.tValue="icon"; STS.expFlatLogo = false; STS.expInvertLogo = true; STS.expBigSearchThumbs = true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("nirvana16"); } } function ST2018Settings(){ SRS.layoutSelect.tValue="hh2018"; SRS.uploadBtn.tValue="create"; SRS.playerSpinner.tValue="material"; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("nirvana16"); } } function STRingo2(){ SRS.layoutSelect.tValue="hh2024"; SRS.faviconSelect.tValue="2024"; STS.expRingo2 = true; STS.expRingo2Gradients = true; } function ST2014Settings(){ SRS.layoutSelect.tValue="hh2014"; SRS.faviconSelect.tValue="2012"; SRS.siteFont.tValue="arial"; SRS.accountMenu.tValue="me"; SRS.playerVersion.tValue="default2014"; SRS.subsGrid.tValue="list"; SRS.watchLayout.tValue="watch7"; SRS.guideSubsAutoExpand.tValue="off"; STS.expTrueScrollableGuide = false; STS.expHideYoodles = false; STS.expNoVideosLink = false; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("nirvana14"); } } function ST2013AltSettings(){ SRS.layoutSelect.tValue="hh2013alt_3"; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("hitchhiker13centered"); } } function ST2014AltSettings(){ SRS.layoutSelect.tValue="hh2014alt_1"; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("hitchhiker14centered"); } } function ST2013Settings(){ SRS.layoutSelect.tValue="hh2013_3"; STS.expPlaylistRedBorder = false; STS.expPlaylistTimestamps = false; STS.expNoVideosLink = false; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("hitchhiker13"); } } function STMid2013Settings(){ SRS.layoutSelect.tValue="hh2013_2"; STS.expClassicLtod = true; STS.expNotifSquare = true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("hitchhiker13mid"); } } function STEarly2013Settings(){ SRS.layoutSelect.tValue="hh2013_1"; SRS.channelVersion.tValue="c3"; STS.expChannels3TimeVisible = true; STS.expChannels3DateVisible = true; STS.expChannels3DateHidden = false; STS.expClassicTitle = true; STS.expClassicGuide = true; STS.expClassicSubscribe = true; STS.expClassicLtod = true; STS.expNotifSquare = true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("hitchhiker13early"); } } function STEpicPandaSettings(){ SRS.layoutSelect.tValue="epic2012_1"; SRS.faviconSelect.tValue="2012"; SRS.outlineIcons.tValue="off"; SRS.rndThumbs.tValue="off"; SRS.siteFont.tValue="arial"; SRS.homeRedir.tValue="off"; SRS.logoLink.tValue="home"; SRS.searchText.tValue="off"; SRS.accountMenu.tValue="me"; SRS.frostedGlass.tValue="off"; SRS.uploadBtn.tValue="modern"; SRS.appsBtn.tValue="off"; SRS.guideAlwaysPinned.tValue="off"; SRS.subsGrid.tValue="list"; SRS.rndPlayer.tValue="off"; SRS.playerVersion.tValue="default2014"; SRS.watchLayout.tValue="watch7beta"; SRS.relatedTabs.tValue="off"; SRS.relatedSize.tValue="small"; SRS.compactDate.tValue="off"; SRS.compactName.tValue="off"; SRS.playerSpinner.tValue="classic"; SRS.channelVersion.tValue="c3"; SRS.guideSubsAutoExpand.tValue="off"; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = true; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = false; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = true; STS.expFlatLogo = false; STS.expInvertLogo = false; STS.expGlossyLogo = false; STS.expClassicTitle = false; STS.expClassicGuide = false; STS.expClassicSubscribe = true; STS.expClassicLtod = false; STS.expNoVideosLink = false; STS.expModernGuide = false; STS.expPlaylistRedBorder = false; STS.expTrueScrollableGuide = false; STS.expViewsString = false; STS.expNoByText = false; STS.expStaticSite = true; STS.expCosmicBG=false; STS.expCosmicButtons=false; STS.expCosmicComments = true; STS.expCosmicGuideLayout = true; STS.expNotifSquare = true; STS.expChannels3TimeVisible = true; STS.expChannels3DateVisible = true; STS.expChannels3DateHidden = false; STS.expNoGuide = false; STS.expGuideOnFeedsOnly = true; STS.expAozoraComments = false; STS.expAozoraSearch = true; STS.expCenteredSearch = false; STS.expBigSearch = false; STS.expMaterialSearch = false; STS.expTopbarShadow = false; STS.expRichGridHome = false; STS.expSegmentedLtod = false; STS.expRoundedSubscribe = false; STS.expBlackSubscribe = false; STS.expRoundedSearch = false; STS.expWMRButtonsLowercase = false; STS.expWMRAddTo = false; STS.expWMRNoSaveText = false; STS.expWMRNoShareText = false; STS.expRoundedTopbarPfp = false; STS.expRingo2 = false; STS.expRingo2Gradients = 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.expCosmicButtons=true; if(STS.STPresetsAlsoSetV3Settings==true){ setV3Settings("epicreal"); } } function STCosmicPandaSettings(){ SRS.layoutSelect.tValue="cosmic2012_1"; SRS.faviconSelect.tValue="2012"; SRS.outlineIcons.tValue="off"; SRS.rndThumbs.tValue="off"; SRS.siteFont.tValue="arial"; SRS.homeRedir.tValue="feedList"; SRS.logoLink.tValue="feedList"; SRS.searchText.tValue="off"; SRS.accountMenu.tValue="me"; SRS.frostedGlass.tValue="off"; SRS.uploadBtn.tValue="modern"; SRS.appsBtn.tValue="off"; SRS.guideAlwaysPinned.tValue="off"; SRS.subsGrid.tValue="list"; SRS.rndPlayer.tValue="off"; SRS.playerVersion.tValue="default2014"; SRS.watchLayout.tValue="watch5d"; SRS.relatedTabs.tValue="off"; SRS.relatedSize.tValue="small"; SRS.compactDate.tValue="off"; SRS.compactName.tValue="off"; SRS.playerSpinner.tValue="classic"; SRS.channelVersion.tValue="c3"; SRS.guideSubsAutoExpand.tValue="off"; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = true; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = false; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = false; STS.expFlatLogo = false; STS.expInvertLogo = false; STS.expGlossyLogo = false; STS.expClassicTitle = false; STS.expClassicGuide = false; STS.expClassicSubscribe = false; STS.expClassicLtod = false; STS.expNoVideosLink = false; STS.expModernGuide = false; STS.expPlaylistRedBorder = false; STS.expPlaylistTimestamps = false; STS.expTrueScrollableGuide = true; STS.expViewsString = false; STS.expNoByText = false; STS.expStaticSite = true; STS.expCosmicBG=true; STS.expCosmicButtons=true; STS.expCosmicComments = true; STS.expCosmicGuideLayout = true; STS.expNotifSquare = true; STS.expChannels3TimeVisible = false; STS.expChannels3DateVisible = false; STS.expChannels3DateHidden = false; STS.expNoGuide = false; STS.expGuideOnFeedsOnly = true; STS.expAozoraComments = false; STS.expAozoraSearch = true; STS.expCenteredSearch = false; STS.expBigSearch = false; STS.expMaterialSearch = false; STS.expTopbarShadow = false; STS.expRichGridHome = false; STS.expSegmentedLtod = false; STS.expRoundedSubscribe = false; STS.expBlackSubscribe = false; STS.expRoundedSearch = false; STS.expWMRButtonsLowercase = false; STS.expWMRAddTo = false; STS.expWMRNoSaveText = false; STS.expWMRNoShareText = false; STS.expRoundedTopbarPfp = false; STS.expRingo2 = false; STS.expRingo2Gradients = false; STS.expHideYoodles = true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("cosmic"); } } function STCosmicPandaMidSettings(){ SRS.layoutSelect.tValue="cosmic2012_2"; STS.expChannels3TimeVisible = true; STS.expChannels3DateVisible = true; STS.expChannels3DateHidden = false; STS.expAozoraSearch = false; } function STCosmicPandaLateSettings(){ SRS.layoutSelect.tValue="cosmic2012_3"; STS.expChannels3TimeVisible = true; STS.expChannels3DateVisible = true; STS.expChannels3DateHidden = false; STS.expAozoraSearch = false; } function STAozoraSettings(){ SRS.layoutSelect.tValue="aozora2011_2"; SRS.faviconSelect.tValue="2010"; SRS.outlineIcons.tValue="off"; SRS.rndThumbs.tValue="off"; SRS.siteFont.tValue="arial"; SRS.homeRedir.tValue="off"; SRS.logoLink.tValue="home"; SRS.subsGrid.tValue="grid"; SRS.rndPlayer.tValue="off"; SRS.playerVersion.tValue="default2014"; SRS.watchLayout.tValue="watch5c"; SRS.relatedTabs.tValue="off"; SRS.relatedSize.tValue="smaller"; SRS.compactDate.tValue="off"; SRS.compactName.tValue="off"; SRS.playerSpinner.tValue="classic"; SRS.channelVersion.tValue="c3"; STS.expCosmicGuideLayout=true; STS.expCosmicBG=false; STS.expCosmicButtons=false; STS.expCosmicComments=false; STS.expChannels3TimeVisible = false; STS.expChannels3DateVisible = false; STS.expChannels3DateHidden = false; STS.expAozoraComments = 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.faviconSelect.tValue="2005"; SRS.outlineIcons.tValue="off"; SRS.rndThumbs.tValue="off"; SRS.siteFont.tValue="arial"; SRS.homeRedir.tValue="off"; SRS.logoLink.tValue="home"; SRS.searchText.tValue="off"; SRS.accountMenu.tValue="me"; SRS.frostedGlass.tValue="off"; SRS.uploadBtn.tValue="modern"; SRS.appsBtn.tValue="off"; SRS.guideAlwaysPinned.tValue="off"; SRS.guideSubsAutoExpand.tValue="off"; SRS.subsGrid.tValue="grid"; SRS.rndPlayer.tValue="off"; SRS.playerVersion.tValue="default2014"; SRS.watchLayout.tValue="watch4b"; SRS.relatedTabs.tValue="off"; SRS.relatedSize.tValue="smaller"; SRS.compactDate.tValue="off"; SRS.compactName.tValue="on"; SRS.playerSpinner.tValue="classic"; SRS.channelVersion.tValue="c3"; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = true; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = false; STS.expSharrow = false; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = false; STS.expFlatLogo = false; STS.expInvertLogo = false; STS.expGlossyLogo = false; STS.expClassicTitle = false; STS.expClassicGuide = false; STS.expClassicSubscribe = false; STS.expClassicLtod = false; STS.expNoVideosLink = false; STS.expModernGuide = false; STS.expPlaylistRedBorder = false; STS.expPlaylistTimestamps = false; STS.expTrueScrollableGuide = true; STS.expViewsString = false; STS.expNoByText = false; STS.expStaticSite = true; STS.expCosmicBG=false; STS.expCosmicButtons=false; STS.expCosmicComments = false; STS.expCosmicGuideLayout = true; STS.expNotifSquare = true; STS.expChannels3TimeVisible = false; STS.expChannels3DateVisible = false; STS.expChannels3DateHidden = false; STS.expNoGuide = true; STS.expGuideOnFeedsOnly = false; STS.expAozoraComments = true; STS.expAozoraSearch = true; STS.expCenteredSearch = false; STS.expBigSearch = false; STS.expMaterialSearch = false; STS.expTopbarShadow = false; STS.expRichGridHome = false; STS.expSegmentedLtod = false; STS.expRoundedSubscribe = false; STS.expBlackSubscribe = false; STS.expRoundedSearch = false; STS.expWMRButtonsLowercase = false; STS.expWMRAddTo = false; STS.expWMRNoSaveText = false; STS.expWMRNoShareText = false; STS.expRoundedTopbarPfp = false; STS.expRingo2 = false; STS.expRingo2Gradients = false; STS.expHideYoodles = true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("cosmic"); } } function STStargazerMid2009Settings(){ SRS.layoutSelect.tValue="stargazer2009_2"; } function STStargazerEarly2009Settings(){ SRS.layoutSelect.tValue="stargazer2009_1"; } function STStargazer2008Settings(){ SRS.layoutSelect.tValue="stargazer2008_1"; } function ST2019Settings(){ SRS.layoutSelect.tValue="poly2019"; SRS.faviconSelect.tValue="2017"; SRS.outlineIcons.tValue="off"; SRS.rndThumbs.tValue="off"; SRS.siteFont.tValue="roboto"; SRS.homeRedir.tValue="off"; SRS.logoLink.tValue="home"; SRS.searchText.tValue="on"; SRS.accountMenu.tValue="poly"; SRS.frostedGlass.tValue="off"; SRS.uploadBtn.tValue="create"; SRS.appsBtn.tValue="yt"; SRS.guideAlwaysPinned.tValue="off"; SRS.guideSubsAutoExpand.tValue="off"; SRS.subsGrid.tValue="grid"; SRS.rndPlayer.tValue="off"; SRS.playerVersion.tValue="modernV2"; SRS.watchLayout.tValue="watch9a"; SRS.relatedTabs.tValue="off"; SRS.relatedSize.tValue="large"; SRS.compactDate.tValue="on"; SRS.compactName.tValue="off"; SRS.playerSpinner.tValue="material"; SRS.channelVersion.tValue="c4"; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = true; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = true; STS.expSharrow = true; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = false; STS.expFlatLogo = false; STS.expInvertLogo = true; STS.expGlossyLogo = false; STS.expClassicTitle = false; STS.expClassicGuide = false; STS.expClassicSubscribe = false; STS.expClassicLtod = false; STS.expNoVideosLink = false; STS.expModernGuide = true; STS.expPlaylistRedBorder = false; STS.expPlaylistTimestamps = true; STS.expTrueScrollableGuide = true; STS.expViewsString = true; STS.expNoByText = true; STS.expStaticSite = false; STS.expCosmicBG=false; STS.expCosmicButtons=false; STS.expCosmicComments = false; STS.expCosmicGuideLayout = false; STS.expNotifSquare = false; STS.expChannels3TimeVisible = false; STS.expChannels3DateVisible = false; STS.expChannels3DateHidden = false; STS.expNoGuide = false; STS.expGuideOnFeedsOnly = false; STS.expAozoraComments = false; STS.expAozoraSearch = false; STS.expCenteredSearch = true; STS.expBigSearch = false; STS.expMaterialSearch = false; STS.expTopbarShadow = true; STS.expRichGridHome = false; STS.expSegmentedLtod = false; STS.expRoundedSubscribe = false; STS.expBlackSubscribe = false; STS.expRoundedSearch = false; STS.expWMRButtonsLowercase = false; STS.expWMRAddTo = false; STS.expWMRNoSaveText = false; STS.expWMRNoShareText = false; STS.expRoundedTopbarPfp = true; STS.expRingo2 = false; STS.expRingo2Gradients = false; STS.expHideYoodles = true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("poly17"); } } function ST2018PolySettings(){ SRS.layoutSelect.tValue="poly2018"; STS.expCenteredSearch = true; 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"; SRS.uploadBtn.tValue="icon"; STS.expCenteredSearch = false; STS.expWMRNoSaveText = true; STS.expWMRNoShareText = false; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("poly17"); } } function ST2017PolyEarlySettings(){ SRS.layoutSelect.tValue="polyE2017"; SRS.faviconSelect.tValue="2015"; STS.expInvertLogo=false; STS.expFlatLogo=true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("poly17"); } } function ST2016PolySettings(){ SRS.layoutSelect.tValue="poly2016"; SRS.faviconSelect.tValue="2015"; SRS.appsBtn.tValue="off"; SRS.compactDate.tValue="off"; STS.expFlatLogo = true; STS.expInvertLogo = false; STS.expBigSearch = true; STS.expMaterialSearch = true; STS.expCenteredSearch = true; STS.expWMRAddTo = true; STS.expWMRNoSaveText = true; STS.expWMRNoShareText = 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.expTopbarShadow=false; STS.expRichGridHome=true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("poly17"); } } function ST2021Settings(){ SRS.layoutSelect.tValue="poly2021"; SRS.outlineIcons.tValue="on"; SRS.playerVersion.tValue="modernV4"; STS.expBigSearch=true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("poly17"); } } function ST2022Settings(){ SRS.layoutSelect.tValue="poly2022"; SRS.appsBtn.tValue="off"; SRS.watchLayout.tValue="watch10beta"; STS.expWMRButtonsLowercase=true; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("poly17"); } } function STAmsterdamSettings(){ SRS.layoutSelect.tValue="amst2024c"; SRS.faviconSelect.tValue="2024"; SRS.outlineIcons.tValue="on"; SRS.rndThumbs.tValue="on"; SRS.siteFont.tValue="roboto"; SRS.homeRedir.tValue="feedGrid"; SRS.logoLink.tValue="feedGrid"; SRS.frostedGlass.tValue="on"; SRS.uploadBtn.tValue="createBtn"; SRS.appsBtn.tValue="off"; SRS.subsGrid.tValue="grid"; SRS.rndPlayer.tValue="on"; SRS.playerVersion.tValue="modernV4"; SRS.compactDate.tValue="off"; SRS.compactName.tValue="off"; SRS.watchLayout.tValue="watch10teaser"; STS.expSegmentedLtod=true; STS.expRoundedSubscribe=true; STS.expBlackSubscribe=false; STS.expRoundedSearch=true; STS.expRingo2=true; STS.expRingo2Gradients=true; STS.expCreateIcon=false; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("poly17"); } } function STEarly2023Settings(){ SRS.layoutSelect.tValue="amst2023_1"; SRS.faviconSelect.tValue="2017"; SRS.frostedGlass.tValue="off"; SRS.uploadBtn.tValue="create"; SRS.rndPlayer.tValue="off"; SRS.watchLayout.tValue="watch10"; STS.expBlackSubscribe=true; STS.expRingo2=false; STS.expRingo2Gradients=false; STS.expCreateIcon=true; if(STS.STPresetsAlsoSetV3Settings==true){ setV3Settings("poly17"); } } function ST2025Settings(){ SRS.layoutSelect.tValue="amst2025p"; SRS.frostedGlass.tValue="off"; SRS.compactDate.tValue="on"; SRS.compactName.tValue="on"; SRS.watchLayout.tValue="watch11"; STS.expBlackSubscribe=true; if(STS.STPresetsAlsoSetV3Settings==true){ setV3Settings("poly17"); } } function STSkybirdSettings(){ SRS.layoutSelect.tValue="sb2016"; SRS.faviconSelect.tValue="2015"; SRS.outlineIcons.tValue="off"; SRS.rndThumbs.tValue="off"; SRS.siteFont.tValue="arial"; SRS.homeRedir.tValue="off"; SRS.logoLink.tValue="home"; SRS.searchText.tValue="on"; SRS.accountMenu.tValue="poly"; SRS.frostedGlass.tValue="off"; SRS.uploadBtn.tValue="icon"; SRS.appsBtn.tValue="off"; SRS.guideAlwaysPinned.tValue="off"; SRS.guideSubsAutoExpand.tValue="off"; SRS.subsGrid.tValue="grid"; SRS.rndPlayer.tValue="off"; SRS.playerVersion.tValue="modernV2"; SRS.watchLayout.tValue="watch9b"; SRS.relatedTabs.tValue="off"; SRS.relatedSize.tValue="large"; SRS.compactDate.tValue="on"; SRS.compactName.tValue="on"; SRS.playerSpinner.tValue="classic"; SRS.channelVersion.tValue="c4"; STS.expMoveGuideMainSectionToTop = false; STS.expMoreTooltips = false; STS.expWatch9NoOwner = false; STS.expWatch9TrueExpander = false; STS.expWatch8NoMore = false; STS.expMoveCountsToButtons = true; STS.expSharrow = false; STS.expWatch7AboutTabRename = false; STS.expWatch7AboutTabRename2 = false; STS.expFlatLogo=true; STS.expInvertLogo = false; STS.expGlossyLogo = false; STS.expClassicTitle = false; STS.expClassicGuide = false; STS.expClassicSubscribe = false; STS.expClassicLtod = false; STS.expNoVideosLink = true; STS.expModernGuide=true; STS.expPlaylistRedBorder = true; STS.expPlaylistTimestamps = true; STS.expTrueScrollableGuide = true; STS.expViewsString=true; STS.expNoByText=true; STS.expStaticSite = false; STS.expCosmicBG=false; STS.expCosmicButtons=false; STS.expCosmicComments = false; STS.expCosmicGuideLayout = false; STS.expNotifSquare = false; STS.expChannels3TimeVisible = false; STS.expChannels3DateVisible = false; STS.expChannels3DateHidden = false; STS.expNoGuide = false; STS.expGuideOnFeedsOnly = false; STS.expAozoraComments = false; STS.expAozoraSearch = false; STS.expCenteredSearch=true; STS.expBigSearch = false; STS.expMaterialSearch = false; STS.expTopbarShadow = false; STS.expRichGridHome = false; STS.expSegmentedLtod = false; STS.expRoundedSubscribe = false; STS.expBlackSubscribe = false; STS.expRoundedSearch = false; STS.expWMRButtonsLowercase=true; STS.expWMRAddTo=true; STS.expWMRNoSaveText = false; STS.expWMRNoShareText = false; STS.expRoundedTopbarPfp=true; STS.expRingo2 = false; STS.expRingo2Gradients = false; STS.expHideYoodles = false; if(STS.STPresetsAlsoSetV3Settings == true){ setV3Settings("nirvana16"); } } function STSkybird2017Settings(){ SRS.layoutSelect.tValue="sb2017"; SRS.faviconSelect.tValue="2017"; SRS.uploadBtn.tValue="create"; STS.expFlatLogo=false; STS.expInvertLogo=true; } function STSkybird2024Settings(){ SRS.layoutSelect.tValue="sb2024"; SRS.faviconSelect.tValue="2024"; STS.expRingo2=true; STS.expRingo2Gradients=true; } 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.WATCH7_CREATOR_BAR_LIGHT=true; V3_SETTINGS_CONF.BACKSTAGE_POST_IS_PRESENTED_AS_FEED=false; 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.WATCH7_CREATOR_BAR_LIGHT=true; V3_SETTINGS_CONF.BACKSTAGE_POST_IS_PRESENTED_AS_FEED=false; 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.WATCH7_CREATOR_BAR_LIGHT=false; V3_SETTINGS_CONF.BACKSTAGE_POST_IS_PRESENTED_AS_FEED=true; 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.WATCH7_CREATOR_BAR_LIGHT=true; V3_SETTINGS_CONF.BACKSTAGE_POST_IS_PRESENTED_AS_FEED=true; 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.WATCH7_CREATOR_BAR_LIGHT=false; V3_SETTINGS_CONF.BACKSTAGE_POST_IS_PRESENTED_AS_FEED=true; 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.WATCH7_CREATOR_BAR_LIGHT=false; 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.WATCH7_CREATOR_BAR_LIGHT=false; 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.WATCH7_CREATOR_BAR_LIGHT=true; V3_SETTINGS_CONF.BACKSTAGE_POST_IS_PRESENTED_AS_FEED=true; 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.WATCH7_CREATOR_BAR_LIGHT=true; V3_SETTINGS_CONF.BACKSTAGE_POST_IS_PRESENTED_AS_FEED=true; 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.WATCH7_CREATOR_BAR_LIGHT=true; V3_SETTINGS_CONF.BACKSTAGE_POST_IS_PRESENTED_AS_FEED=false; 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.WATCH7_CREATOR_BAR_LIGHT=true; V3_SETTINGS_CONF.BACKSTAGE_POST_IS_PRESENTED_AS_FEED=false; 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.WATCH7_CREATOR_BAR_LIGHT=false; V3_SETTINGS_CONF.BACKSTAGE_POST_IS_PRESENTED_AS_FEED=true; 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); }); } async function wF(e,d){ while (null==document.querySelector(e)){ await new Promise(r => requestAnimationFrame(r)); } await timeout(d).then(function(){ canGo=true; return document.querySelector(e); }); } 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 st-load-more"); 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")){ let additive=0; if($("#st-sizerule-style-2")){ $("#st-sizerule-style-2").remove(); } let container2 = $("html"); let newElem2 = document.createElement("div"); let sideWidth = $("#watch7-sidebar").getBoundingClientRect(); if($("[layout^='sb']")){ 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=>{ 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]; } } if($("#watch7-creator-bar")){ CWD.isOwner=true; $("body .v3").setAttribute("is-owner",""); }else{ CWD.isOwner=false; $("body .v3").setAttribute("is-owner",""); $("body .v3").removeAttribute("is-owner"); } CWD.owner=$("#watch7-user-header").data.watch7UserHeader.userName.title.simpleText; CWD.pfp=$("#watch7-user-header").data.watch7UserHeader.userPhoto.thumbnails.thumbnails[0].url; setTimeout(function(){ CWD.pfp=$("#watch7-user-header").data.watch7UserHeader.userPhoto.thumbnails.thumbnails[0].url; },2000); 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")&&$(".video-extras-likes-dislikes")){ 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"||SRS.watchLayout.tValue=="watch11"){ 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"); }else if(SRS.watchLayout.tValue=="watch11"){ if($(".live_chat_box_iframe_holder")){ tM=document.querySelectorAll("#watch7-sidebar-contents > .watch-sidebar-section")[1]; nH=$("#below-related-holder"); nH.insertBefore(tM,nH.children[0]); tM=document.querySelectorAll("#watch7-sidebar-contents > .watch-sidebar-section")[1]; nH=$("#below-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=$("#below-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]); } } } } },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-uix-button-panel .yt-user-name-icon-verified")){ tM=$(".yt-uix-button-panel .yt-user-name-icon-verified"); nH=$(".st-owner-icon"); nH.insertBefore(tM,nH.children[0]); } if($(".yt-uix-button-panel .yt-user-name-icon-autogenerated")){ tM=$(".yt-uix-button-panel .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"|| SRS.layoutSelect.tValue=="sb2017"|| SRS.layoutSelect.tValue=="sb2024" ){ 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"||SRS.watchLayout.tValue=="watch11"){ 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"|| sets.polyG2Sub==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=="amst2023_1"|| SRS.layoutSelect.tValue=="amst2024c"|| SRS.layoutSelect.tValue=="amst2025p" ){ 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"|| SRS.layoutSelect.tValue=="sb2017"|| SRS.layoutSelect.tValue=="sb2024" ){ 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=="sb2017"|| SRS.layoutSelect.tValue=="sb2024"|| 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=="amst2023_1"|| SRS.layoutSelect.tValue=="amst2024c"|| SRS.layoutSelect.tValue=="amst2025p" ){ 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(SRS.watchLayout.tValue=="watch11"){ $("#st-comments-panel").classList.remove("st-scrollable-panel"); } 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(SRS.watchLayout.tValue=="watch11"){ $("#watch-description").classList.remove("yt-uix-expander"); $("#st-side-title-row").addEventListener("click",function(){ if($(".st-desc .yt-uix-expander-collapsed")){ $("#watch-description").classList.remove("yt-uix-expander-collapsed"); $(".st-desc").classList.add("expanded"); } }); $("#watch-description-expand").addEventListener("click",function(){ if($(".st-desc .yt-uix-expander-collapsed")){ $("#watch-description").classList.remove("yt-uix-expander-collapsed"); $(".st-desc").classList.add("expanded"); } }); $("#watch-description-collapse").addEventListener("click",function(){ setTimeout(function(){ if($(".st-desc.expanded")){ $(".st-desc").classList.remove("expanded"); $("#watch-description").classList.add("yt-uix-expander-collapsed"); } },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(SRS.watchLayout.tValue=="watch11"){ 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); } } 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; }); if($(".st-title-spec")){ document.querySelectorAll(".st-title-spec").forEach(i=>{ i.textContent=w.title; }); } document.querySelectorAll(".st-owner-name-text").forEach(i=>{ i.textContent=w.owner; }); if($(".st-sub-count")){ if(CWD.subCount!==""&&CWD.subCount!=undefined){ $(".st-sub-count").textContent=CWD.subCount+" subscribers"; }else if(CWD.channelSubCount!="0"){ $(".st-sub-count").textContent=CWD.channelSubCount+" subscribers"; }else{ $(".st-sub-count").textContent=""; } } if($("#st-edit-vid")){ $("#st-analytics").href="https://www.youtube.com/analytics#;fi=v-"+CWD.id; $("#st-edit-vid").href="https://studio.youtube.com/video/"+CWD.id+"/edit"; } 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=="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); 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"&&SRS.watchLayout.tValue!="watch11"){ $("#st-below-title-row-holder").innerHTML=STH.belowTitleRow; } if(titleOnTop==true){ $("#st-above-title-row-holder").innerHTML=STH.aboveTitleRow; } if(SRS.watchLayout.tValue=="watch11"){ $("#st-side-title-row-holder").innerHTML=STH.sideTitleRow; $("#st-side-poly-owner-row-holder").innerHTML=STH.sidePolyOwnerRow; $("#st-side-actions-row-holder").innerHTML=STH.sideActionsRow; $("#st-side-panels-row-holder").innerHTML=STH.sidePanelsRow; $("#st-below-related-row-holder").innerHTML=STH.belowRelatedRow; } 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=` © 2025 YouTube, LLC `; cont.append(nE); } let polyComment = false; function everyLoadNeo(x){ if(x==="x"&&$("#st-related-header")==null){ if(window.location.href.includes("/watch")||window.location.href.includes("/shorts/")){ $("body .v3").setAttribute("rel-head-added","false"); } } 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]; } } }); setTimeout(function(){ let pi=yt.config_.DATASYNC_ID; if(pi){ 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 } } } },200); gdp.authUser=yt.config_.SESSION_INDEX; gdp.watchLayout=SRS.watchLayout.tValue; if($("[lang='ja-JP']")){ usedLang="ja"; }else if($("[lang='pl-PL']")){ usedLang="pl"; }else{ usedLang="en"; } 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(SRS.autoLoop.tValue=="on"){ var e="video"; wF(e,10).then(function(elm){ if(canGo!=false){ $("video").setAttribute("loop",""); $(".yt-uix-button-menu-item.html5-context-menu-loop-switch").classList.add("checked"); } }); } } if(sets.polymerComments==true){ polyComment=true; } if($("#page.watch")||$("#page.all_comments")){ if(STS.expAozoraComments==true||STS.expCosmicComments == true||sets.polymerComments==true){ var elm = "#watch-discussion .distiller_yt_instance"; waitForElement10(elm).then(function(elm){ if(canGo != false && $(".distiller_content")){ setTimeout(function(){ modComments(polyComment); listenToComments(x); },100); setTimeout(function(){ modComments(polyComment); listenToComments(x); },2000); } }); } } 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"||SRS.layoutSelect.tValue=="sb2017"||SRS.layoutSelect.tValue=="sb2024"){ 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(sets.polyG2Comments==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']")&&sets.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(sets.polyG2Comments==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(sets.polymerComments==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; } } 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; 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,"nomod","browse","browseId",id); } } else{ tvB = "none"; $("html").setAttribute("c4banner",""); $("html").removeAttribute("c4banner"); } //let aboutChan = c4h.tagline.channelTaglineRenderer.moreEndpoint.showEngagementPanelEndpoint.engagementPanel.engagementPanelSectionListRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer.contents[0].continuationItemRenderer.continuationEndpoint.continuationCommand.token; gdp.currChan = { "id": id, "shortId": shortId, "currPage": currPage, "header": { "name": name, "pfp": pfp, "banner": "", "tvBanner": tvB }, "sidebar": { "description": desc } }; getActiveTab(d).then(result => { gdp.currChan.content = result; }); let test = await(d.newChannelInfoRequest.then(function(r){ $("html").setAttribute("channel-about-fetched","true"); gdp.currChan.header.subscribeButton = r.fullAboutObject.subscribeButton; if(r.fullAboutObject.videoCountText){ gdp.currChan.sidebar.videoCount = r.fullAboutObject.videoCountText; gdp.currChan.sidebar.shortVideoCount = r.fullAboutObject.videoCountText.split(" v")[0]; } else{ gdp.currChan.sidebar.videoCount = "No videos"; gdp.currChan.sidebar.shortVideoCount = "0"; } if(r.fullAboutObject.viewCountText){ gdp.currChan.header.viewCount = r.fullAboutObject.viewCountText; gdp.currChan.header.shortViewCount = r.fullAboutObject.viewCountText.split(" v")[0]; } else{ gdp.currChan.header.viewCount = "No views"; gdp.currChan.header.shortViewCount = "0"; } gdp.currChan.header.subCount = numberWithCommas(r.subscriberCount); gdp.currChan.header.shortSubCount = numberWithCommas(r.subscriberCount); if(r.fullAboutObject.joinedDateText){ gdp.currChan.sidebar.joinedDate = r.fullAboutObject.joinedDateText.content; gdp.currChan.sidebar.shortJoinedDate = r.fullAboutObject.joinedDateText.content.split("d ")[1]; } else{ gdp.currChan.sidebar.joinedDate = "Joined Dec 31, 1969"; gdp.currChan.sidebar.shortJoinedDate = "Dec 31, 1969"; } if(r.fullAboutObject.country){ gdp.currChan.sidebar.country = r.fullAboutObject.country; } if(r.fullAboutObject.links){ gdp.currChan.sidebar.links = r.fullAboutObject.links; } return r.fullAboutObject; })); } } function doChannelBanner(result){ if(result.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.header.channelHeaderRenderer.backgroundImage){ let thumbs = result.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.header.channelHeaderRenderer.backgroundImage.thumbnails; let thumbsL = thumbs.length - 1; let tvB = thumbs[thumbsL].url; gdp.currChan.header.tvBanner = tvB; $("html").style.setProperty("--tvbg",'no-repeat url(' + tvB + ')'); }else{ gdp.currChan.header.tvBanner = null $("html").style.setProperty("--tvbg",'no-repeat url(' + null + ')'); } } // EXfunct async function createChannels3Prep(){ if($("#page.channel")){ createChannels3(); }else{ if($("[playlist-data-done='true']")){ createChannels3(); }else{ var elm = "[playlist-data-done='true']"; waitForElement10(elm).then(function(elm){ if(canGo != false){ createChannels3(); } }); } } } // EXfunct async function createChannels3(){ if($("#c3-sidebar") == null){ if($("#page.channel") || $("[location='playlist']")){ let version; if($("#page.channel")){ version = "channel"; }else{ version = "playlist"; } let container = $("#content"); let newElem = document.createElement("div"); newElem.id = "c3-container"; newElem.innerHTML = ` `; container.insertBefore(newElem,container.children[0]); //$("#content").style.background = "repeat-y url(" + gdp.currChan.header.tvBanner + ")"; $("html").style.setProperty("--tvbg",'no-repeat url(' + gdp.currChan.header.tvBanner + ')'); const img = new Image(); img.onload = function(){ $("html").style.setProperty("--tvbanner-width",this.width + "px"); } $("#c3-channel-pfp img").src = gdp.currChan.header.pfp; $("#c3-channel-name .c3-name").textContent = gdp.currChan.header.name; $("#c3-channel-name .c3-name-link").textContent = gdp.currChan.header.name; if(version == "playlist"){ $("#c3-playlist-title span").textContent = gdp.currPlaylist.title; $(".c3-playall a").href = "/watch?v=" + gdp.currPlaylist.firstVideoId + "&list=" + gdp.currPlaylist.id; } img.src = gdp.currChan.header.tvBanner; if($(".c4-module-is-editable") == null){ var elm = "#c4-primary-header-contents .yt-uix-button-subscription-container"; waitForElement10(elm).then(function(elm){ if(canGo != false){ let btn = $("#c4-primary-header-contents .yt-uix-button-subscription-container"); let newHome = $("#st-space"); if(btn !== null){ newHome.append(btn); btn = $("#st-space .yt-uix-button-subscription-container"); if(version == "channel"){ newHome = $("#c3-subscribe"); }else{ newHome = $("#c3-sidebar-subscribe"); } newHome.append(btn); } } }); } if($(".c4-player-container")){ var elm = ".video-player-view-component video"; waitForElement10(elm).then(function(elm){ if(canGo != false){ //$(".c4-player-container video").remove(); let btn = $(".video-player-view-component"); let newHome = $("#st-space"); if(btn !== null){ newHome.append(btn); btn = $("#st-space .video-player-view-component"); newHome = $("#c3-featured-slot"); newHome.append(btn); } } }); } if(version == "playlist"){ var elm = ".pl-video-list"; waitForElement10(elm).then(function(elm){ if(canGo != false){ //$(".c4-player-container video").remove(); let btn = $(".pl-video-list"); let newHome = $("#st-space"); if(btn !== null){ newHome.append(btn); btn = $("#st-space .pl-video-list"); newHome = $("#c3-content-items"); newHome.append(btn); } } }); } switch (gdp.currChan.currPage){ case "featured": $("#c3-featured-tab").classList.add("active"); break; case "videos": $("#c3-videos-tab").classList.add("active"); $("#c3-uploads-nav").classList.add("active"); $(".c3").classList.add("is-videos"); fillC3Page("videos"); break; case "playlists": $("#c3-videos-tab").classList.add("active"); $("#c3-playlists-nav").classList.add("active"); $(".c3").classList.add("is-videos"); fillC3Page("playlists"); break; case "community": $("#c3-feed-tab").classList.add("active"); $("#c3-backstage-nav").classList.add("active"); $(".c3").classList.add("is-feed"); fillC3Page("backstage"); break; case "feed": $("#c3-feed-tab").classList.add("active"); $(".c3").classList.add("is-feed"); break; case "search": $("#c3-search").classList.add("active"); $(".c3").classList.add("is-search"); fillC3Page("search"); break; case "about": $("#c3-featured-tab").classList.add("active"); $(".c3").classList.add("is-home"); break; case "playlist": $(".c3").classList.add("is-playlist"); fillC3Page("playlist"); break; default: } if($('[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(gdp.currChan.content){ 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.commandMetadata.webCommandMetadata.url; let wE=i.rendererContext.commandContext.onTap.innertubeCommand.watchEndpoint; let videoId=wE.videoId; let playlistId=wE.playlistId; let title=i.metadata.lockupMetadataViewModel.title.content; let thumbVM=i.contentImage.collectionThumbnailViewModel.primaryThumbnail.thumbnailViewModel; let thumb=thumbVM.image.sources[0].url; let vidCount=thumbVM.overlays[0].thumbnailOverlayBadgeViewModel.thumbnailBadges[0].thumbnailBadgeViewModel.text; let shortVidCount=vidCount.split(" v")[0]; 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:playlistId, canonicalBaseUrl: href }, commandMetadata:{ webCommandMetadata:{ url:href } } } } } newElem.querySelector(".yt-uix-sessionlink").data={ abstractVorElement:{ navigationEndpoint:{ browseEndpoint:{ browseId:"VL"+playlistId }, commandMetadata:{ webCommandMetadata:{ url:"/playlist?list="+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 chan-name-clickable"; 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 == "relatedRichItem"){ if($("[video-id='"+i.videoId+"']")==null){ let i2 = i.contextItemData; let href; let viewCount; let publishDate; let title; let thumbnail = i.thumbnail.thumbnails[1].url; let time=""; let author; let authorNav; let authorId; let pfp; let authorHref; href = i2.href; viewCount = i2.viewCount; publishDate = i2.publishDate; title = i2.title; if(i.lengthText){ time=i.lengthText.simpleText; } if(i.shortBylineText){ let aut=i.shortBylineText.runs[0]; author=aut.text; authorNav=aut.navigationEndpoint; authorId=aut.navigationEndpoint.browseEndpoint.browseId; authorHref="/channel/"+authorId; } if(i.channelThumbnail){ pfp=i.channelThumbnail.thumbnails[0].url; } if(i.thumbnail.thumbnails[3]){ thumbnail = i.thumbnail.thumbnails[3].url; } let container = $("#below-related-holder .watch-sidebar-section"); let newElem = document.createElement("div"); newElem.classList = "channels-content-item yt-shelf-grid-item yt-rich-lockup-item"; newElem.innerHTML = `

    ${title}

    `; container.insertBefore(newElem,container.children[number]); newElem.querySelector(".yt-uix-sessionlink").setAttribute("title",title); newElem.setAttribute("video-id",i.videoId); 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 } } } } }; newElem.querySelectorAll("a")[2].data={ abstractVorElement:authorNav }; newElem.querySelector(".g-hovercard").data={ abstractVorElement: { cardNavigationEndpoint: { browseEndpoint: { browseId:authorId, canonicalBaseUrl:"/channel/"+authorId }, commandMetadata: { webCommandMetadata: { url:"/channel/"+authorId } } } } } } } 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; let chipBar1; let chipBar2; if(rgi){ chipBar0=rgi.header.feedFilterChipBarRenderer.contents[0].chipCloudChipRenderer.navigationEndpoint.continuationCommand.token; chipBar1=rgi.header.feedFilterChipBarRenderer.contents[1].chipCloudChipRenderer.navigationEndpoint.continuationCommand.token; 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){ if(e.detail.isPopstateCached==true){ isPopstate=true; }else{ isPopstate=false; } 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")&& sets.aozoraHome==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( sets.polymerStyles==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(sets.outlineIcons == 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(SRS.guideSubsAutoExpand.tValue=="on"){ $("#startube-subs-expander-container .yt-uix-expander").classList.remove("yt-uix-expander-collapsed"); } } 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 toggleSetting(setting){ let ap=$("body .v3").getAttribute(setting); let state="true"; if(ap=="true"){ ap=false; state="false"; }else{ ap=true; } $("body .v3").setAttribute(setting,ap); if($("[toggle='"+setting+"']")){ $("[toggle='"+setting+"']").setAttribute("state",state); } if(setting=="autoplay"){ //V3_SETTINGS_CONF.AUTOPLAY_ENABLED=ap; $(".autoplay-bar .checkbox-on-off input").click(); } } function createAutoplay(){ if($(".autoplay-bar")&&$("#st-related-header")==null){ let conta=$(".autoplay-bar"); let nE=document.createElement("div"); nE.id="st-related-header"; nE.classList="flex-bar st-rh"; nE.innerHTML=`
    Up next
    Suggestions
    Related
    Related videos
    More videos
    Autoplay
    ${STH0.SVG}
    When autoplay is enabled, a suggested video will automatically play next.
    `; conta.insertBefore(nE,conta.children[0]); $("body .v3").setAttribute("rel-head-added","true"); setTimeout(function(){ let ap=false; if($(".autoplay-bar .checkbox-on-off input[checked]")){ ap=true; } $("body .v3").setAttribute("autoplay",ap); if($("[toggle='autoplay']")){ $("[toggle='autoplay']").setAttribute("state",ap); } },10); setTimeout(function(){ let ap=false; if($(".autoplay-bar .checkbox-on-off input[checked]")){ ap=true; } $("body .v3").setAttribute("autoplay",ap); if($("[toggle='autoplay']")){ $("[toggle='autoplay']").setAttribute("state",ap); } },500); $("#st-ap-tog").addEventListener("click",function(){ toggleSetting("autoplay"); }); $("#st-ap-label").addEventListener("click",function(){ toggleSetting("autoplay"); }); $("#st-ap-hover").addEventListener("mouseenter",function(){ $("#st-ap-toggle-cont").setAttribute("show-card","true"); }); $("#st-ap-fence").addEventListener("mouseenter",function(){ $("#st-ap-toggle-cont").setAttribute("show-card","false"); }); if($("[poly-layout]")){ $("#st-ap-tog").classList.add("yt-uix-tooltip"); $("#st-ap-tog").title="When autoplay is enabled, a suggested video will automatically play next."; } if($("[layout^='aoz']")){ $("#st-un-label").classList.add("none"); $("#st-s-label").classList.remove("none"); } } } function createMaterialSpinner(){ if($("#st-material-spinner")==null&&$("#movie_player")){ let conta=$("#movie_player"); let nE=document.createElement("div"); nE.id="st-material-spinner"; nE.innerHTML=`
    `; conta.insertBefore(nE,conta.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]); } } }); var elm=".ytp-menu-container .ytp-menu"; waitForElement10(elm).then(function(elm){ if(canGo!=false&&$("#st-pl-settings")==null){ let conta=$(".ytp-menu-container"); //let conta=$(".ytp-menu-container .ytp-menu .ytp-menu-content"); let nE=document.createElement("div"); nE.classList="st-plm-container st-show-svgs multistate-handler"; nE.setAttribute("state","main"); nE.id="st-pl-settings"; nE.innerHTML=`
    `; conta.append(nE); movePlayerMenuItems(); setTimeout(movePlayerMenuItems,1500); setTimeout(movePlayerMenuItems,3000); let height=$("#st-main-page").offsetHeight; nE.style.height=height+"px"; document.querySelectorAll(".st-pl-trigger").forEach(i=>{ i.addEventListener("click",function(){ let trig=i.getAttribute("trigger"); nE.setAttribute("state",trig); setTimeout(function(){ let newHeight=$("#st-"+trig+"-page .st-plm-content").offsetHeight; if(trig!="main"){ if($("[data-player-size='fullscreen']")){ newHeight=newHeight+49; }else{ newHeight=newHeight+33; } } nE.style.height=newHeight+"px"; nE.style.setProperty("--page-height",newHeight+"px"); },10); }); }); if($(".st-pl-toggle.listening")==null){ document.querySelectorAll(".st-pl-toggle").forEach(i=>{ let tog=i.getAttribute("toggle"); i.classList.add("listening"); if(tog=="autoplay"){ i.addEventListener("click",function(e){ if(e.target.classList.contains("st-valid-tog")){ if($("[autoplay='true']")){ i.setAttribute("state","false"); toggleSetting(tog); }else{ i.setAttribute("state","true"); toggleSetting(tog); } } }); }else{ var elm=".ytp-menu .ytp-menu-row:nth-child(2) .ytp-segmented-control div"; waitForElement10(elm).then(function(elm){ if(canGo != false){ let btn1=$(".ytp-menu .ytp-menu-row:nth-child(2) .ytp-segmented-control div"); let btn2=$(".ytp-menu .ytp-menu-row:nth-child(2) .ytp-segmented-control div:last-child"); if(btn1.getAttribute("aria-checked")=="true"){ i.setAttribute("state","true"); $("body .v3").setAttribute(tog,"true"); }else{ i.setAttribute("state","false"); $("body .v3").setAttribute(tog,"false"); } i.addEventListener("click",function(e){ if(e.target.classList.contains("st-valid-tog")){ if(btn1.getAttribute("aria-checked")=="true"){ i.setAttribute("state","false"); btn2.click(); toggleSetting(tog); }else{ i.setAttribute("state","true"); btn1.click(); toggleSetting(tog); } } }); } }); } }); } setTimeout(function(){ // Select the node that will be observed for mutations const targetNode=$("#st-main-page"); // Options for the observer (which mutations to observe) const config = { attributes: true, childList: true, subtree: true }; // Callback function to execute when mutations are observed const callback=(mutationList, observer)=>{ for(const mutation of mutationList){ if(mutation.removedNodes[0]){ setTimeout(movePlayerMenuItems,200); setTimeout(movePlayerMenuItems,2000); } } }; // 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); },1000); $("#settings_button").addEventListener("click",function(){ nE.setAttribute("state","main"); //$("body .v3").setAttribute("opening-menu","true"); setTimeout(function(){ let newHeight=$("#st-main-page .st-plm-content").offsetHeight; //newHeight=newHeight-20; nE.style.setProperty("--page-height",newHeight+"px"); nE.style.height=newHeight+"px"; },10); /*setTimeout(function(){ $("body .v3").setAttribute("opening-menu","false"); },300);*/ }); } }); } } function movePlayerMenuItems(){ let tM; let nH; if($(".ytp-menu .ytp-menu-row:nth-child(3)")){ let hasSubtitles=false; let hasAT=false; $("body .v3").removeAttribute("has-at"); if($(".ytp-menu .ytp-menu-row:nth-child(5)")){ hasSubtitles=true; } if($(".ytp-menu .ytp-menu-row:nth-child(6)")){ hasAT=true; $("body .v3").setAttribute("has-at",""); } if($("#st-pl-settings .ytp-menu-row")){ document.querySelectorAll("#st-pl-settings .ytp-menu-row").forEach(i=>{ i.remove(); }); }else{ if(hasAT==true){ // subtitles tM=$(".ytp-menu .ytp-menu-row:nth-child(4) .ytp-drop-down-menu"); nH=$("#st-subtitles-page .st-plm-content"); nH.append(tM); // audio track tM=$(".ytp-menu .ytp-menu-row:nth-child(5) .ytp-drop-down-menu"); nH=$("#st-audio-track-page .st-plm-content"); nH.append(tM); // quality tM=$(".ytp-menu .ytp-menu-row:nth-child(6) .ytp-drop-down-menu"); nH=$("#st-quality-page .st-plm-content"); nH.append(tM); }else if(hasSubtitles==true){ // subtitles tM=$(".ytp-menu .ytp-menu-row:nth-child(4) .ytp-drop-down-menu"); nH=$("#st-subtitles-page .st-plm-content"); nH.append(tM); // quality tM=$(".ytp-menu .ytp-menu-row:nth-child(5) .ytp-drop-down-menu"); nH=$("#st-quality-page .st-plm-content"); nH.append(tM); }else{ // quality tM=$(".ytp-menu .ytp-menu-row:nth-child(4) .ytp-drop-down-menu"); nH=$("#st-quality-page .st-plm-content"); nH.append(tM); } tM=$(".ytp-menu .ytp-menu-row:nth-child(3) .ytp-drop-down-menu"); nH=$("#st-speed-page .st-plm-content"); nH.append(tM); } // autoplay //tM=$(".ytp-menu .ytp-menu-row"); //nH=$("#st-main-page .st-pl-menuitem"); //nH.append(tM); // annot //tM=$(".ytp-menu .ytp-menu-row:nth-child(2)"); //nH=$("#st-main-page .st-pl-menuitem:nth-child(2)"); //nH.append(tM); // speed tM=$(".ytp-menu .ytp-menu-row:nth-child(3)"); nH=$("#st-main-page .st-pl-menuitem:nth-child(3)"); nH.append(tM); if(hasAT==true){ // subtitles tM=$(".ytp-menu .ytp-menu-row:nth-child(3)"); nH=$("#st-main-page .st-pl-menuitem:nth-child(4)"); nH.append(tM); // audio track tM=$(".ytp-menu .ytp-menu-row:nth-child(3)"); nH=$("#st-main-page .st-pl-menuitem:nth-child(5)"); nH.append(tM); // quality tM=$(".ytp-menu .ytp-menu-row:nth-child(3)"); nH=$("#st-main-page .st-pl-menuitem:nth-child(6)"); nH.append(tM); tM=$(".st-pl-subtitles .ytp-menu-cell:last-child"); nH=$("#st-subtitles-page .st-plm-header"); nH.append(tM); }else if(hasSubtitles==true){ // subtitles tM=$(".ytp-menu .ytp-menu-row:nth-child(3)"); nH=$("#st-main-page .st-pl-menuitem:nth-child(4)"); nH.append(tM); // quality tM=$(".ytp-menu .ytp-menu-row:nth-child(3)"); nH=$("#st-main-page .st-pl-menuitem:nth-child(6)"); nH.append(tM); tM=$(".st-pl-subtitles .ytp-menu-cell:last-child"); nH=$("#st-subtitles-page .st-plm-header"); nH.append(tM); $("#st-main-page .st-pl-menuitem:nth-child(5)").classList.add("none"); }else{ // quality tM=$(".ytp-menu .ytp-menu-row:nth-child(3)"); nH=$("#st-main-page .st-pl-menuitem:nth-child(6)"); nH.append(tM); $("#st-main-page .st-pl-menuitem:nth-child(4)").classList.add("none"); $("#st-main-page .st-pl-menuitem:nth-child(5)").classList.add("none"); } } } 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 = ` ${lang[usedLang].stsets} `; 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 multiMod(w){ let list; if(w=="related"){ var elm = "#page.watch .context-data-item"; waitForElement10(elm).then(function(elm){ if(canGo != false){ list=document.querySelectorAll("#page.watch .context-data-item"); list.forEach(i=>{ if(i.querySelector(".chan-name")==null){ let pfp; let data; let href; let author; if(i.querySelector(".g-hovercard")){ author=i.querySelector(".g-hovercard .run:last-child").textContent; } if(i.data){ if(i.data.compactVideoRenderer){ pfp=i.data.compactVideoRenderer.channelThumbnail.thumbnails[0].url; data=i.data.compactVideoRenderer.contextItemData.authorNavigationEndpoint; href="/channel/"+i.data.compactVideoRenderer.contextItemData.authorNavigationEndpoint.browseEndpoint.browseId; } data={ abstractVorElement:{ navigationEndpoint:data } } i.querySelector(".g-hovercard").innerHTML=` by `; let name=i.querySelector(".chan-name"); name.textContent=author; name.data=data; name.href=href; i.classList.add("chan-name-clickable"); } } }); var elm="#watch-related .continuation_item_wrapper:not(.st-load-more)"; waitForElement10(elm).then(function(elm){ if(canGo!=false){ if($("#watch-related .continuation_item_wrapper:not(.st-load-more)")&&$(".st-related-cont")==null){ $("#watch-related .continuation_item_wrapper:not(.st-load-more)").classList.add("st-related-cont"); $("#watch-related .continuation_item_wrapper:not(.st-load-more) button").addEventListener("click",function(){ var elm=".context-data-item:not(.chan-name-clickable) .related-video"; waitForElement10(elm).then(function(elm){ if(canGo!=false){ if($(".st-related-cont")){ $(".st-related-cont").classList.remove("st-related-cont"); } multiMod("related"); setTimeout(function(){ multiMod("related"); },1000); setTimeout(function(){ multiMod("related"); },2000); setTimeout(function(){ multiMod("related"); },4000); } }); }); } } }); } }); } } // 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){ 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 } } 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.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 conta=$("#masthead-positioner-container"); let nE=document.createElement("div"); nE.id="st-frosted-glass"; conta.insertBefore(nE,conta.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(n){ if($("#yt-masthead-content") && $(".st-create") == null && layoutFactor>=367000){ let container = $("#yt-masthead-content"); let newElem = document.createElement("div"); if(n==0){ newElem.id="startube-create-icon"; newElem.setAttribute("class","st-show-svgs yt-uix-tooltip st-create"); 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); } if(n==1){ newElem = document.createElement("button"); newElem.id="startube-create-btn"; newElem.setAttribute("class","st-show-svgs yt-uix-tooltip st-create st-poly-btn poly-create-button flex-bar yt-uix-button yt-uix-button-default yt-uix-button-size-default"); newElem.innerHTML=`
    ${STH0.SVG}
    ${lang[usedLang].create}
    `; container.insertBefore(newElem, container.children[2]); newElem.querySelector(".filled-icon path").setAttribute("d",svgDefs.addTo.f); newElem.querySelector(".outline-icon path").setAttribute("d",svgDefs.addTo.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=STH0.SVG; container.insertBefore(newElem, container.children[0]); newElem.querySelector(".filled-icon path").setAttribute("d",svgDefs.search.f); newElem.querySelector(".outline-icon path").setAttribute("d",svgDefs.search.o); if(SRS.layoutSelect.tValue=="amst2024c"){ newElem.querySelector(".filled-icon path").setAttribute("d",svgDefs.prominentSearch.c); newElem.querySelector(".outline-icon path").setAttribute("d",svgDefs.prominentSearch.o); newElem.querySelector(".filled-icon path").setAttribute("fill-rule","evenodd"); } } } // 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=STH0.SVG; container.insertBefore(newElem, container.children[0]); newElem.querySelector(".filled-icon path").setAttribute("d",svgDefs.search.f); newElem.querySelector(".outline-icon path").setAttribute("d",svgDefs.search.o); if(SRS.layoutSelect.tValue=="amst2024c"){ newElem.querySelector(".filled-icon path").setAttribute("d",svgDefs.prominentSearch.c); newElem.querySelector(".outline-icon path").setAttribute("d",svgDefs.prominentSearch.o); newElem.querySelector(".filled-icon path").setAttribute("fill-rule","evenodd"); } } } // 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(sets.modernPlaylists==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("2024")|| date.includes("2025")|| date.includes("2026")|| date.includes("2027")|| date.includes("2028")|| date.includes("2029") ){ 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("2023") ){ 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!="amst2023_1"){ setAdaptiveLayout("amst2023_1"); } } 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!="amst2023_1"){ setAdaptiveLayout("amst2023_1"); } } }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")&&sets.channels3==true){ forceC4 = true; $("html").setAttribute("exp-channels3",""); $("html").removeAttribute("exp-channels3"); }else if(x==="x"&&sets.channels3==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" && sets.aozoraHome==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&&sets.polymerStyles==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(sets.polymerChannels==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(sets.polymerChannels==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(sets.polymerChannels==true){ let srch="search"; if(SRS.layoutSelect.tValue=="amst2024c"){ srch="prominentSearch"; } if($("#channel-search")&&$("#channel-search svg")==null){ let conta=$("#channel-search .epic-nav-item"); let nE=document.createElement("div"); nE.classList="st-svg"; nE.innerHTML=STH2.ST_SVG; conta.append(nE); nE.querySelector(".filled-icon path").setAttribute("d",svgDefs[srch].f); nE.querySelector(".outline-icon path").setAttribute("d",svgDefs[srch].o); }else{ var elm = "#channel-search"; waitForElement10(elm).then(function(elm){ if(canGo!=false&&$("#channel-search")&&$("#channel-search svg")==null){ let conta=$("#channel-search .epic-nav-item"); let nE=document.createElement("div"); nE.classList="st-svg"; nE.innerHTML=STH2.ST_SVG; conta.append(nE); nE.querySelector(".filled-icon path").setAttribute("d",svgDefs[srch].f); nE.querySelector(".outline-icon path").setAttribute("d",svgDefs[srch].o); } }); } } if(sets.homeTab==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.layoutSelect.tValue){ case "stargazer2008_1": layoutFactor=150000; break; case "stargazer2009_1": layoutFactor=180000; break; case "stargazer2009_3": layoutFactor=200000; break; case "aozora2011_2": layoutFactor=250000; break; case "cosmic2012_1": layoutFactor=276000; break; case "cosmic2012_2": layoutFactor=278000; break; case "cosmic2012_3": layoutFactor=280000; break; case "epic2012_2": layoutFactor=310000; break; case "epic2012_1": layoutFactor=320000; break; case "hh2013_1": layoutFactor=336000; break; case "hh2013_2": layoutFactor=338000; break; case "hh2013_3": layoutFactor=340000; break; case "hh2013alt_3": layoutFactor=350000; break; case "hh2014alt_1": layoutFactor=360000; break; case "hh2014": layoutFactor=368000; break; case "hhE2015": layoutFactor=370000; break; case "hh2015": layoutFactor=372000; break; case "hhE2016": layoutFactor=374000; break; case "hhM2016": layoutFactor=375000; break; case "hh2016": layoutFactor=376000; break; case "hhE2017": layoutFactor=377000; break; case "hh2017": layoutFactor=378000; break; case "hh2018": layoutFactor=379000; break; case "hh2024": layoutFactor=380000; break; case "sb2016": layoutFactor=410000; break; case "sb2017": layoutFactor=415000; break; case "sb2024": layoutFactor=420000; break; case "poly2016": layoutFactor=445000; break; case "polyE2017": layoutFactor=450000; break; case "poly2017": layoutFactor=455000; break; case "poly2018": layoutFactor=460000; break; case "poly2019": layoutFactor=465000; break; case "poly2020": layoutFactor=470000; break; case "poly2021": layoutFactor=475000; break; case "poly2022": layoutFactor=480000; break; case "amst2023_1": layoutFactor=490000; break; case "amst2024c": layoutFactor=500000; break; } 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 "watch6": $(".spitfire-body-container").setAttribute("wl","w6"); 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"); html.setAttribute("comment-teaser",""); break; case "watch10teaser": $(".spitfire-body-container").setAttribute("wl","w10finalteaser"); html.setAttribute("comment-teaser",""); break; case "watch10": $(".spitfire-body-container").setAttribute("wl","w10final"); break; case "watch11": $(".spitfire-body-container").setAttribute("wl","w11"); break; case "altWatch9": $(".spitfire-body-container").setAttribute("wl","aw9"); break; case "altWatch9Fancy": $(".spitfire-body-container").setAttribute("wl","aw9f"); html.setAttribute("exp-watch9-sidebar-bus",""); html.setAttribute("exp-watch9-sticky-columns",""); 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; } switch (SRS.accountMenu.tValue){ case "mhh": createAccountMenu(); html.setAttribute("exp-account-menu",""); break; case "poly": createAccountMenu(); html.setAttribute("exp-account-menu",""); html.setAttribute("exp-polymer-account-menu",""); break; } switch (SRS.uploadBtn.tValue){ case "icon": createUploadIcon(); html.setAttribute("upload-icon",""); break; case "create": createCreateIcon(0); html.setAttribute("create-icon",""); break; case "createBtn": createCreateIcon(1); html.setAttribute("create-btn",""); break; } switch (SRS.appsBtn.tValue){ case "yt": createYouTubeApps(); html.setAttribute("exp-youtube-apps",""); break; case "goog": createGoogleApps(); html.setAttribute("exp-google-apps",""); break; } if(SRS.guideAlwaysPinned.tValue=="on"){ guideAlwaysPinned(); } if(SRS.relatedGrid.tValue=="on"){ html.setAttribute("exp-related-grid",""); } if(SRS.frostedGlass.tValue=="on"){ $(".spitfire-body-container").setAttribute("frosted-glass",""); createFrostedGlass(); } if(SRS.rndPlayer.tValue=="on"){ html.setAttribute("round-player",""); } if(SRS.rndThumbs.tValue=="on"){ html.setAttribute("round-thumbs",""); } if(SRS.siteFont.tValue=="roboto"){ html.setAttribute("exp-roboto",""); } if(SRS.colorfulChannels.tValue=="on"){ html.setAttribute("exp-colorful-channels",""); } if(SRS.playerSpinner.tValue=="material"){ html.setAttribute("mtrl-spin",""); setTimeout(createMaterialSpinner,100); } if(SRS.outlineIcons.tValue=="on"){ html.setAttribute("exp-outline-icons",""); sets.outlineIcons=true; } if(SRS.channelVersion.tValue=="c3"&&!window.location.href.includes("force-c4")){ html.setAttribute("exp-channels3",""); createChannels3Prep(); } /*thesets*/ $(".spitfire-body-container").setAttribute("layout",SRS.layoutSelect.tValue); html.setAttribute("ly",SRS.layoutSelect.tValue); if(SRS.layoutSelect.tValue=="poly2022"||SRS.layoutSelect.tValue=="amst2023_1"||SRS.layoutSelect.tValue=="amst2024c"){ html.setAttribute("exp-secondary-search-icon",""); createSearchTumor(); sets.secondarySearchIcon=true; html.setAttribute("simple-reply",""); sets.simpleReply=true; } if($("[layout^='hh']")==null){ html.setAttribute("hide-appbar",""); } if($("[layout^='hh']")||$("[layout^='sb']")||$("[layout^='poly']")||$("[layout^='amst']")){ if($("[layout^='hh2013']")==null){ html.setAttribute("exp-modern-playlists",""); sets.modernPlaylists=true; html.setAttribute("exp-modern-playlist-thumbnails",""); sets.modernPlaylistThumbnails=true; } if($("[layout^='hh2013']")==null&&$("[layout^='hh2014']")==null){ html.setAttribute("exp-home-tab",""); sets.homeTab=true; html.setAttribute("exp-modern-topbar",""); sets.modernTopbar=true; } if($("[layout^='hh']")==null&&$("[layout^='sb']")==null){ html.setAttribute("exp-polymer-channels",""); sets.polymerChannels=true; } if($("[layout^='hh2013']")==null&&$("[layout^='hh2014']")==null&&$("[layout^='hhE2015']")==null&&$("[layout^='hh2015']")==null){ html.setAttribute("exp-modern-guide-button",""); sets.modernGuideButton=true; } } if($("[layout^='sb']")||$("[layout^='poly']")||$("[layout^='amst']")){ html.setAttribute("poly-comments",""); html.setAttribute("exp-polymer-comments",""); moveSortBtn(); sets.polymerComments=true; html.setAttribute("exp-material-sign-in",""); sets.materialSignIn=true; changeCommentPlaceholder(1); changeCommentHeader(1); setTimeout(createShelfIcons,200); createNotifIcon(); createSearchIcon(); setTimeout(createNotifIcon,20000); html.setAttribute("exp-modern-home",""); sets.modernHome=true; } if($("[layout^='poly']")||$("[layout^='amst']")){ html.setAttribute("exp-polymer-shell",""); sets.polymerShell=true; html.setAttribute("poly-styles",""); html.setAttribute("exp-polymer-styles",""); sets.polymerStyles=true; } if($("[layout^='hh']")){ if($("[layout^='hh2013']")==null&&$("[layout^='hh2014']")==null&&$("[layout^='hhE2015']")==null&&$("[layout^='hh2015']")==null&&$("[layout^='hhE2016']")==null){ html.setAttribute("exp-modern-notif-icon",""); sets.modernNotifIcon=true; html.setAttribute("exp-modern-title",""); sets.modernTitle=true; } if($("[layout^='hh2013']")==null&&$("[layout^='hh2014']")==null){ html.setAttribute("modern-styles",""); changeCommentPlaceholder(0); changeCommentHeader(0); sets.modernStyles=true; } if($("[layout^='hh2013']")==null){ html.setAttribute("exp-light-channel-bar",""); sets.lightChannelBar=true; html.setAttribute("exp-modern-home",""); sets.modernHome=true; html.setAttribute("modern-cards",""); } } if(SRS.gbarVersion.tValue=="material"){ html.setAttribute("exp-material-gbar",""); } if($("[layout^='star']")){ html.setAttribute("stargazer-sub",""); } if($("[layout^='stargazer2008']")){ html.setAttribute("stargazer-header","tabbed"); stargazerHeader(0); searchButtonLowercase(); } if($("[layout^='stargazer2009_1']")){ html.setAttribute("stargazer-header","bar"); stargazerHeader(1); searchButtonLowercase(); } if($("[layout^='stargazer2009_3']")){ html.setAttribute("stargazer-header","simple"); stargazerHeader(2); searchButtonLowercase(); } if($("[layout^='aoz']")||$("[layout^='star']")){ html.setAttribute("aozora-styles",""); html.setAttribute("exp-aozora-styles",""); sets.aozoraStyles=true; html.setAttribute("exp-aozora-bg",""); sets.aozoraBG=true; html.setAttribute("aozora-home",""); html.setAttribute("exp-aozora-home",""); sets.aozoraHome=true; } if($("[layout^='aoz']")){ html.setAttribute("aozora-header",""); html.setAttribute("exp-aozora-header",""); searchButtonLowercase(); sets.aozoraHeader=true; html.setAttribute("exp-aozora-topbar-links",""); createAozoraTopbarLinks(); sets.aozoraTopbarLinks=true; } if($("[layout^='cos']")){ html.setAttribute("cosmic-styles",""); sets.cosmicStyles=true; //html.setAttribute("cosmic-buttons",""); sets.cosmicButtons=true; html.setAttribute("exp-cosmic-guide-style",""); sets.cosmicGuideStyle=true; html.setAttribute("exp-aozora-topbar-links",""); createAozoraTopbarLinks(); sets.aozoraTopbarLinks=true; html.setAttribute("exp-cosmic-feeds-third-column",""); doThirdColumnVideosPrep(); html.setAttribute("aozora-home",""); html.setAttribute("exp-aozora-home",""); sets.aozoraHome=true; html.setAttribute("topbar","cosmic"); //html.setAttribute("cosmic-bg",""); } if($("[layout^='cosmic2012_1']")){ html.setAttribute("exp-cosmic-banners",""); html.setAttribute("exp-cosmic-feeds-v1",""); doCosmicFeedHeader(); } if($("[layout^='cosmic2012_2']")){ html.setAttribute("exp-cosmic-banners-v2",""); html.setAttribute("exp-cosmic-feeds-v2",""); doCosmicFeedHeader(); } if($("[layout^='cosmic2012_3']")){ html.setAttribute("exp-cosmic-banners-v2",""); html.setAttribute("exp-cosmic-feeds-v3",""); doCosmicFeedHeader(); } if($("[layout^='hhE2017']")||$("[layout^='hh2017']")||$("[layout^='hh2018']")||$("[layout^='hh2024']")||$("[layout^='poly201']")){ html.setAttribute("exp-big-search-thumbs",""); } if($("[layout^='epic2012_2']")){ //html.setAttribute("cosmic-buttons",""); sets.cosmicButtons=true; html.setAttribute("exp-aozora-topbar-links",""); createAozoraTopbarLinks(); sets.aozoraTopbarLinks=true; html.setAttribute("topbar","cosmic"); } if($("[layout^='epic2012_1']")||$("[layout^='epic2012_2']")){ html.setAttribute("exp-epic-styling",""); sets.epicStyling=true; html.setAttribute("aozora-home",""); html.setAttribute("exp-aozora-home",""); sets.aozoraHome=true; } if($("[layout^='hh2013_1']")||$("[layout^='hh2013_2']")){ html.setAttribute("aozora-home",""); html.setAttribute("exp-aozora-home",""); sets.aozoraHome=true; } if($("[layout^='epic2012_2']")){ html.setAttribute("exp-epic-feeds",""); doCosmicFeedHeader(); } if($("[layout^='epic2012_1']")){ html.setAttribute("topbar","epic"); html.setAttribute("exp-epic-watch7-flat",""); } if($("[layout^='hh2013_1']")||$("[layout^='epic2012_1']")){ html.setAttribute("exp-classic-buttons",""); } if($("[layout^='poly2016']")){ html.setAttribute("exp-beta-polymer-styles",""); sets.betaPolyStyles=true; html.setAttribute("exp-early-polymer-shell",""); sets.earlyPolymerShell=true; } if($("[layout^='poly2017']")||$("[layout^='polyE2017']")){ html.setAttribute("exp-early-polymer-shell",""); sets.earlyPolymerShell=true; } if($("[layout^='amst']")){ html.setAttribute("exp-rounded-guide",""); sets.roundedGuide=true; html.setAttribute("round-styles",""); sets.roundStyles=true; html.setAttribute("poly-g3-colors",""); sets.polyG3Colors=true; } if($("[layout^='poly201']")){ html.setAttribute("exp-polymer-subscribe",""); } if($("[layout^='poly202']")||$("[layout^='amst']")){ html.setAttribute("exp-polymer-subscribe",""); html.setAttribute("exp-polymer-gen2-subscribe",""); html.setAttribute("exp-bigger-search-thumbs",""); sets.polyG2Sub=true; } if($("[layout^='poly2021']")||$("[layout^='poly2022']")){ html.setAttribute("typography-spacing",""); } if($("[layout^='poly2019']")||$("[layout^='poly202']")||$("[layout^='amst']")){ html.setAttribute("poly-g2-colors",""); html.setAttribute("exp-polymer-gen2-colors",""); sets.polyG2Colors=true; html.setAttribute("poly-g2-comments",""); sets.polyG2Comments=true; } if($("[layout^='sb']")){ html.setAttribute("skybird",""); createSearchIcon(); createNotifIcon(); setTimeout(createNotifIcon,20000); sets.sb=true; html.setAttribute("skybird-cards",""); sets.sbCards=true; html.setAttribute("exp-polymer-subscribe",""); html.setAttribute("exp-polymer-gen2-subscribe",""); sets.polyG2Sub=true; html.setAttribute("modern-cards",""); sets.modernCards=true; } if($("[layout^='sb']")||$("[layout^='poly']")||$("[layout^='amst']")){ $("body .v3").setAttribute("poly-layout",""); } if($("[layout^='poly']")||$("[layout^='amst']")){ $("body .v3").setAttribute("poly-layout","true"); } if($("[layout^='hh2013_1']")==null&&$("[layout^='hh2013_2']")==null&&$("[layout^='star']")==null&&$("[layout^='epic']")==null&&$("[layout^='aoz']")==null&&$("[layout^='coz']")==null){ html.setAttribute("exp-skinny-subscribe",""); } if($("[layout^='hh2013']")==null&&$("[layout^='hh2014alt']")==null){ html.setAttribute("exp-modern-upload",""); } if($("[layout^='hh2013_1']")){ html.setAttribute("classic-styles",""); } if($("[layout^='hhE2016']")||$("[layout^='hhM2016']")||$("[layout^='hh2016']")||$("[layout^='hhE2017']")||$("[layout^='hh2017']")||$("[layout^='hh2018']")||$("[layout^='hh2024']")||$("[layout^='poly']")||$("[layout^='ams']")){ html.setAttribute("exp-modern-search-icon",""); } if($("[layout^='poly2022']")||$("[layout^='amst2023_1']")||$("[layout^='amst2024c']")){ if($("[wl^='w9']")==null){ html.setAttribute("exp-yt-sans-title",""); } } /*if($("[layout^='amst2024c']")){ html.setAttribute("create-btn",""); createCreateIcon(1); }*/ html.setAttribute("config-watch7-sidebar-card-shadow",""); html.setAttribute("exp-comments-full-width",""); html.setAttribute("exp-fixed-share-icons",""); replaceFavicon(SRS.faviconSelect.tValue); $(".spitfire-body-container").setAttribute("search-text",SRS.searchText.tValue); $(".spitfire-body-container").setAttribute("rel-size",SRS.relatedSize.tValue); $(".spitfire-body-container").setAttribute("compact-date",SRS.compactDate.tValue); createNewWatchPrep(); if(SRS.compactName.tValue=="on"&&$("#page.watch")){ multiMod("related"); } if(V3_SETTINGS_CONF.WATCH_AUTOPLAY_DELEGATION==true&&$("[location='watch']")){ var elm=".autoplay-bar"; waitForElement10(elm).then(function(elm){ if(canGo!=false){ createAutoplay(); setTimeout(createAutoplay,1500); setTimeout(createAutoplay,3000); } }); } },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 == "expWatch9NoOwner"){ html.setAttribute("exp-watch9-no-owner", ""); }else if(value == true && name == "expWatch9TrueExpander"){ html.setAttribute("exp-watch9-true-expander",""); }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 == "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 == "expClassicLtod"){ html.setAttribute("exp-classic-ltod",""); }else if(value == true && name == "expNoVideosLink"){ html.setAttribute("exp-no-videos-link",""); }else if(value == true && name == "expModernGuide"){ html.setAttribute("exp-modern-guide",""); doModernGuide(); }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 == "expNoByText"){ html.setAttribute("exp-no-by-text",""); }else if(value == true && name == "expStaticSite"){ html.setAttribute("static", ""); }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 == "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 == "expNotifSquare"){ html.setAttribute("notif-square",""); }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 == "expAozoraComments"){ html.setAttribute("exp-legacy-comments",""); html.setAttribute("exp-aozora-comments",""); }else if(value == true && name == "expAozoraSearch"){ html.setAttribute("aozora-search",""); }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 == "expMaterialSearch"){ html.setAttribute("exp-material-search",""); createSearchIcon(); }else if(value == true && name == "expTopbarShadow"){ html.setAttribute("exp-topbar-shadow",""); }else if(value == true && name == "expRichGridHome"){ html.setAttribute("exp-rich-grid-home",""); setTimeout(doRichGridHome,200); }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 == "expRoundedSearch"){ html.setAttribute("round-search",""); }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 == "expRoundedTopbarPfp"){ html.setAttribute("exp-rounded-topbar-pfp",""); }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 == "expHideYoodles"){ html.setAttribute("exp-hide-yoodles",""); hideYoodles(); }else if(value == true && name == "expFixedXIcon"){ html.setAttribute("exp-fixed-x-icon",""); } }); }); 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 = `
    ${lang[usedLang].stsets}
    `; 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 conta=$('.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=`
    ${STH.astroSettings} `; conta.insertBefore(nE,conta.children[1]); function createSetting(i,container,n,theSet){ let newE=document.createElement("div"); newE.classList="astro-setting astro-radio-setting"; newE.setAttribute("c",theSet); newE.setAttribute("value",i.value); newE.innerHTML=STH.astroSetting; container.insertBefore(newE,container.children[n]); newE.querySelector(".astro-setting-title span").textContent=i.name; if(i.mText){ let mT=i.mText; let aM=newE.querySelector(".astro-minitext"); aM.innerHTML=mT.text; if(mT.color){ aM.classList.add("astro-"+mT.color); } } } function createSector(i,container,n,theSet,ix){ let newE=document.createElement("div"); newE.classList="astro-sector"; newE.innerHTML=STH.astroSector; container.insertBefore(newE,container.children[n]); newE.querySelector("h5").textContent=i.sectorTitle.text; let settNumb=1; i.opts.forEach(i=>{ if(i.opt){ createSetting(i.opt,newE,settNumb,theSet); }else{ createSector(i.sector,newE,settNumb,theSet); } settNumb++; }); } function createSection(tab,ix,n){ let conta=$("[state-id='"+tab+"'] .astro-scroller-inner"); nE=document.createElement("div"); nE.id=ix.section.id; nE.classList="astro-section"; nE.innerHTML=STH.astroSection; conta.insertBefore(nE,conta.children[n]); nE.querySelector("h4").textContent=ix.section.title.text; if(ix.section.desc){ nE.querySelector(".astro-description span").innerHTML=ix.section.desc.text; } if(ix.section.cW){ nE.querySelector(".astro-cw-cont").innerHTML=ix.section.cW.text; } if(ix.section.new){ // nE.querySelector(".astro-title"); } let setNumb=2; let theSet=ix.section.id; ix.section.opts.forEach(i=>{ if(i.opt){ createSetting(i.opt,nE,setNumb,theSet); }else{ createSector(i.sector,nE,setNumb,theSet); } setNumb++; }); if(ix.section.new){ let conta=nE.querySelector(".astro-title"); let newerE=document.createElement("div"); newerE.classList.add("st-new"); newerE.innerHTML=` New in ${currStarVer} `; conta.append(newerE); } } radioSets.pages.forEach(i=>{ let obj=i.page; let tab=obj.tab; let sectNumb=0; obj.sections.forEach(ix=>{ createSection(tab,ix,sectNumb); sectNumb++; }); }); 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"); }); let nH=$("[state-id='config'] .astro-scroller-inner"); let tM=$("#st-logo-section"); nH.insertBefore(tM,nH.children[0]); $("#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:not(.astro-link)").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"); } } }); /*let FX=$("#st-fancy-fx"); html.addEventListener("mousemove",(e)=>{ var x=e.clientX; var y=e.clientY; x=x-10; y=y-10; FX.style.left=x+'px'; FX.style.top=y+'px'; });*/ 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(); } })();