Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 133 additions & 1 deletion app/2015YTm.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ transition: margin .2s, padding .2s;
display: none;
}

.text-selection *:not(input):not(select):not(code):not(textarea):not([contenteditable]) { -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }

/* Tab content */
.tabs-content-container {
display: flex;
Expand Down Expand Up @@ -605,6 +607,9 @@ animation: none;
width: auto;
animation: overlay-fade .3s ease-in-out;
}
.no-animation .tabs-content-container>.spinner-container {
animation: none;
}
.spinner-container[hidden] {
animation-name: fade;
animation-duration: .28s;
Expand Down Expand Up @@ -903,6 +908,10 @@ ytm15-icon>svg {
box-shadow: none;
}

.underline button:not(h2):not(.secondary-text):not(.menu-item-button):not(.error-content),.pivot-bar-item-title {
text-decoration:underline;
}

/* Header bar */
ytm15-header-bar {
display: flex;
Expand Down Expand Up @@ -997,6 +1006,9 @@ ytm15-header-bar[ischannel="true"] {
display: flex;
align-items: center;
}
.header-no-shadow ytm15-header-bar {
box-shadow: none !important;
}

/* Header logo */
.youtube-logo-icon.ringo-logo {
Expand Down Expand Up @@ -1143,6 +1155,9 @@ input.searchbox-input {
.searching-overlay[hidden] {
animation: overlay-fade-out .2s;
}
.searching-overlay {
animation: none !important;
}
@keyframes overlay-fade {
0% {
opacity: 0;
Expand Down Expand Up @@ -1190,6 +1205,35 @@ overflow: hidden;
display: block;
animation: page-expand-in .2s;
}
.no-animations .page-container,.error-container,page.home,.lazy-list,.error-content {
animation: none !important;
}
.no-animations .ytm15-img.lazy {
opacity: 1 !important;
}
/*.no-animations .searching-overlay~.page-container>page {
display: block;
animation: ios-page-slide 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}*/
.no-animations ytm15-settings.page-visible {
animation: ios-page-slide 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.no-animations ytm15-settings {
animation: ios-page-slide 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.no-animations .settings-categories-container,.settings-pages-container {
transition: none !important;
}
.no-animations .page-visible .settings-pages-container {
display: inherit;
}
.no-animations .settings-pages-container {
display:none;
}
/*.no-animations .page-visible .settings-categories-container {
animation: ios-page-slide-left 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}*/
ytm15-settings.page-visible
.searching-overlay:not([hidden])~.page-container>page {
animation: page-expand-out .2s;
transform: scale(1.1);
Expand Down Expand Up @@ -2034,6 +2078,18 @@ h2 {
font-size: 1.75rem;
}

.ios-spinner .spinner-container.full-height {
height: 76px;
}

.ios-spinner .spinner .path {
stroke: rgba(0,0,0,0.5);
}

.dark.ios-spinner .spinner .path {
stroke: rgba(255, 255, 255, 0.6);
}

/* Badges */
ytm15-badge {
display: inline-block;
Expand Down Expand Up @@ -2106,6 +2162,24 @@ ytm15-video-metadata.item:first-child, ytm15-video-metadata.item:last-child {
max-height: 3.5em;
}
}
@keyframes ios-page-slide {
0% {
transform: translateX(100%);
}
100% {
transform: translateX(0%);
}
}
@keyframes ios-page-slide-left {
0% {
opacity:1;
transform: translateX(0%);
}
100% {
opacity:0;
transform: translateX(-100%);
}
}
.video-metadata-title {
-webkit-line-clamp: 2;
max-height: 2.5em;
Expand Down Expand Up @@ -3828,7 +3902,7 @@ ytm15-icon.post-image-icon {
.shorter-pivot [has-pivot-bar="true"] .tabs-content-container>.spinner-container {
margin-bottom: 48px;
}
html:not(.dark) .pivot-bar-item-tab.has-ripple::before {
/*html*/:not(.dark) .pivot-bar-item-tab.has-ripple::before {
background-color: rgba(238, 0, 0, 0.15);
}
ytm15-pivot-bar {
Expand Down Expand Up @@ -4158,6 +4232,12 @@ label.radio-label {
text-align:center;
margin-top: 10px;
}
.tap-to-retry .error-text {
font-weight: unset;
}
.tap-to-retry .error-container {
border-bottom: unset !important;
}
@media (min-width: 749px) {
.tap-to-retry .error-icon {
width:45px;
Expand Down Expand Up @@ -5679,6 +5759,15 @@ html.dark {
.dark [data-viewing-replies="true"]>ytm15-comment {
background-color: #282828;
}
html.dark.seperate-dark-color {
background-color: #1D1D1D !important;
}
.transparent-text {
color:#fff;
}
.dark .transparent-text {
color:#303030;
}

/* Dark 28 */
html.dark.dark-28 {
Expand All @@ -5704,6 +5793,46 @@ html.dark.dark-28 {
.dark.dark-28 [data-viewing-replies="true"]>ytm15-comment {
background-color: #212121;
}
.dark.dark-28 .transparent-text {
color:#282828;
}

/* Dark 25 */
html.dark.dark-25 {
background-color: #252525;
}
.dark.dark-25 ytm15-header-bar.non-red:not([ischannel="true"]) {
background-color: #252525;
}
.dark.dark-25 ytm15-pivot-bar {
background-color: #252525;
}
.dark.dark-25 .searching-overlay {
background-color: #252525;
}
.dark.dark-25 .watchpage-frame-items ytm15-watch {
background-color: #252525;
}
@media (min-width: 800px) and (min-device-width: 550px) and (orientation: landscape) {
.dark.dark-25 .watchpage-frame-items ytm15-watch::after {
background-color: #252525;
}
}
.dark.dark-25 ytm15-channels-header {
background-color: #222222;
}
.dark.dark-25 .playlist-header-container {
background-color: #222222;
}
.dark.dark-25 dialog.ytm15-dialog {
background-color: #252525;
}
.dark.dark-25 [data-viewing-replies="true"]>ytm15-comment {
background-color: #232323;
}
.dark.dark-25 .transparent-text {
color:#252525;
}

/* Dark 21 */
html.dark.dark-21 {
Expand Down Expand Up @@ -5738,6 +5867,9 @@ html.dark.dark-21 {
.dark.dark-21 [data-viewing-replies="true"]>ytm15-comment {
background-color: #191919;
}
.dark.dark-21 .transparent-text {
color:#212121;
}

/* Global dark theme for dematerialized/2013 UI */
.style-2013.dark .card {
Expand Down
70 changes: 66 additions & 4 deletions app/2015ytm.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,31 @@ PIVOT_HIDE_NOTIFICATIONS_expflag = localStorage.getItem("PIVOT_HIDE_NOTIFICATION
PIVOT_NOTIFICATIONS_IS_ACTIVITY_expflag = localStorage.getItem("PIVOT_NOTIFICATIONS_IS_ACTIVITY");
APP_HELVETICA_NEUE_FONT_expflag = localStorage.getItem("APP_HELVETICA_NEUE_FONT");
APP_NEW_ERROR_SCREEN_expflag = localStorage.getItem("APP_NEW_ERROR_SCREEN");
APP_CUSTOM_INVIDIOUS_URL_expflag = localStorage.getItem("APP_CUSTOM_INVIDIOUS_URL");
if (APP_CUSTOM_INVIDIOUS_URL_expflag == undefined) {
localStorage.setItem("APP_CUSTOM_INVIDIOUS_URL", "https://api.allorigins.win/raw?url=https://yt.omada.cafe/");
APP_CUSTOM_INVIDIOUS_URL_expflag = localStorage.getItem("APP_CUSTOM_INVIDIOUS_URL");
}
APP_DONT_AUTH_TO_INVIDIOUS_expflag = localStorage.getItem("APP_DONT_AUTH_TO_INVIDIOUS");
if (APP_DONT_AUTH_TO_INVIDIOUS_expflag == undefined) {
localStorage.setItem("APP_DONT_AUTH_TO_INVIDIOUS", "true");
APP_DONT_AUTH_TO_INVIDIOUS_expflag = localStorage.getItem("APP_DONT_AUTH_TO_INVIDIOUS");
}
APP_NO_ANDROID_ANIMATIONS_expflag = localStorage.getItem("APP_NO_ANDROID_ANIMATIONS");
WEB_IOS_SPINNER_expflag = localStorage.getItem("WEB_IOS_SPINNER");
HEADER_NO_SHADOW_expflag = localStorage.getItem("HEADER_NO_SHADOW");
DARK_THEME_SEPERATE_BACKGROUND_COLOR_expflag = localStorage.getItem("DARK_THEME_SEPERATE_BACKGROUND_COLOR");
APP_UNDERLINE_BUTTONS_expflag = localStorage.getItem("APP_UNDERLINE_BUTTONS");
HEADER_CAST_BUTTON_AS_URL_BOX_expflag = localStorage.getItem("HEADER_CAST_BUTTON_AS_URL_BOX");
HEADER_CAST_ALTERNATE_ICON_expflag = localStorage.getItem("HEADER_CAST_ALTERNATE_ICON");
APP_STOP_TEXT_SELECTION_expflag = localStorage.getItem("APP_STOP_TEXT_SELECTION");
if (APP_STOP_TEXT_SELECTION_expflag == undefined) {
localStorage.setItem("APP_STOP_TEXT_SELECTION", "true");
APP_STOP_TEXT_SELECTION_expflag = localStorage.getItem("APP_STOP_TEXT_SELECTION");
}

newErrorHtml = `<button class="error-content" onClick="location.reload();">
<img class="error-icon ytm15-img" src="alert_error.png"></img><br>
<div class="transparent-text" style="border-radius:50%;background: #c1c1c1;display: inline-block;width: 3.5rem;/*! padding: 10px; */font-size: 30px;font-weight: 500;height: 3.5rem;text-align: center;vertical-align: unset;margin-bottom: 1rem;">!</div><br>
<span class="error-text">Error loading<br>Tap to retry</span>
</div></button>`;
if (PIVOT_SHRINK_SPACING_expflag == undefined) {
Expand Down Expand Up @@ -214,6 +237,9 @@ if (DARK_THEME_HASH_COLOR_expflag == "#30") {
} else if (DARK_THEME_HASH_COLOR_expflag == "#28") {
documentHTML.classList.add("dark-28");
documentHTML.classList.remove("dark-21");
} else if (DARK_THEME_HASH_COLOR_expflag == "#25") {
documentHTML.classList.add("dark-25");
documentHTML.classList.remove("dark-21");
} else if (DARK_THEME_HASH_COLOR_expflag == "#21") {
documentHTML.classList.remove("dark-28");
documentHTML.classList.add("dark-21");
Expand Down Expand Up @@ -266,6 +292,42 @@ if (APP_NEW_ERROR_SCREEN_expflag == "true") {
} else {
documentHTML.classList.remove("tap-to-retry");
}

if (APP_NO_ANDROID_ANIMATIONS_expflag == "true") {
documentHTML.classList.add("no-animations");
} else {
documentHTML.classList.remove("no-animations");
}

if (WEB_IOS_SPINNER_expflag == "true") {
documentHTML.classList.add("ios-spinner");
} else {
documentHTML.classList.remove("ios-spinner");
}

if (HEADER_NO_SHADOW_expflag == "true") {
documentHTML.classList.add("header-no-shadow");
} else {
documentHTML.classList.remove("header-no-shadow");
}

if (DARK_THEME_SEPERATE_BACKGROUND_COLOR_expflag == "true") {
documentHTML.classList.add("seperate-dark-color");
} else {
documentHTML.classList.remove("seperate-dark-color");
}

if (APP_UNDERLINE_BUTTONS_expflag == "true") {
documentHTML.classList.add("underline");
} else {
documentHTML.classList.remove("underline");
}

if (APP_STOP_TEXT_SELECTION_expflag == "true") {
documentHTML.classList.add("text-selection");
} else {
documentHTML.classList.remove("text-selection");
}
};

localStorageChange();
Expand Down Expand Up @@ -301,7 +363,7 @@ metaColorElm.content = "#000000";
}
}

APIbaseURL = "https://invidious.nerdvpn.de/";
APIbaseURL = APP_CUSTOM_INVIDIOUS_URL_expflag//"https://invidious.nerdvpn.de/";
APIbaseURLWatch = "https://inv.nadeko.net/";
APIbaseURLNew = "https://yt-api.p.rapidapi.com/";
APIbaseURLPiped = "https://pipedapi.leptons.xyz/";
Expand Down Expand Up @@ -568,7 +630,7 @@ dataModeChange();
renderHeader();

function renderCommentSection(parent, mediaType, cmSource, isCMPage, comntId, comntContinuation){
var cmBaseAPIURL = 'https://invidious.nerdvpn.de/api/v1/comments/';
var cmBaseAPIURL = APP_CUSTOM_INVIDIOUS_URL_expflag + 'api/v1/comments/';//'https://invidious.nerdvpn.de/api/v1/comments/';

const commentSection = document.createElement("div");
commentSection.classList.add("comment-section");
Expand Down Expand Up @@ -632,7 +694,7 @@ function renderCommentSection(parent, mediaType, cmSource, isCMPage, comntId, co

const getCommentsData = new XMLHttpRequest();
getCommentsData.open('GET', cmBaseAPIURL + cmSource + "?continuation=" + continuation, true);
getCommentsData.setRequestHeader('Authorization','Basic eXRtMTU6SlFKNTNLckxBRVk2RTVxaGdjbTM4UGtTenczYlpYbWs=');
if (APP_DONT_AUTH_TO_INVIDIOUS_expflag == "false"){getCommentsData.setRequestHeader('Authorization','Basic eXRtMTU6SlFKNTNLckxBRVk2RTVxaGdjbTM4UGtTenczYlpYbWs=');};

getCommentsData.onerror = function(event) {
console.error("An error occurred with this operation (" + getCommentsData.status + ")");
Expand Down
18 changes: 13 additions & 5 deletions app/Material Spinner/spinner.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
function spinner() {
var spinner = document.createElement("div");
spinner.classList.add("spinner-container");
spinner.innerHTML = `
<svg class="spinner" width="45px" height="45px" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg">
<circle class="path" fill="none" stroke-width="6" stroke-linecap="spuare" cx="33" cy="33" r="30"></circle>
</svg>
`;
if (localStorage.getItem("WEB_IOS_SPINNER") == "true") {
spinner.innerHTML = `
<svg class="spinner" width="30px" height="30px" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg">
<circle class="path" fill="none" stroke-width="7" stroke-linecap="spuare" cx="33" cy="33" r="30"></circle>
</svg>
`;
} else {
spinner.innerHTML = `
<svg class="spinner" width="45px" height="45px" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg">
<circle class="path" fill="none" stroke-width="6" stroke-linecap="spuare" cx="33" cy="33" r="30"></circle>
</svg>
`;
}
spinnerParent.appendChild(spinner);
if (spinnerParent === document.querySelector("#app")) {
spinner.classList.add("full-height");
Expand Down
Loading