From e4446cd7e90e2f91fcaacaa942353fbbec71ebff Mon Sep 17 00:00:00 2001 From: Bnyro Date: Fri, 9 Sep 2022 12:40:18 +0200 Subject: [PATCH 1/3] proxy channel feeds --- src/components/ChannelPage.vue | 2 +- src/components/WatchVideo.vue | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/ChannelPage.vue b/src/components/ChannelPage.vue index 0db3e085..d08ce459 100644 --- a/src/components/ChannelPage.vue +++ b/src/components/ChannelPage.vue @@ -28,7 +28,7 @@ title="RSS feed" role="button" v-if="channel.id" - :href="`https://www.youtube.com/feeds/videos.xml?channel_id=${channel.id}`" + :href="`${apiUrl()}/feed/unauthenticated/rss?channels=${channel.id}`" target="_blank" class="btn flex-col ml-3" > diff --git a/src/components/WatchVideo.vue b/src/components/WatchVideo.vue index d1c773f5..9db70e3f 100644 --- a/src/components/WatchVideo.vue +++ b/src/components/WatchVideo.vue @@ -102,9 +102,7 @@ title="RSS feed" role="button" v-if="video.uploaderUrl" - :href="`https://www.youtube.com/feeds/videos.xml?channel_id=${ - video.uploaderUrl.split('/')[2] - }`" + :href="`${apiUrl()}/feed/unauthenticated/rss?channels=${video.uploaderUrl.split('/')[2]}`" target="_blank" class="btn flex-col" > From 949e845257487eb9694d34e077c37857ab057ce4 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Fri, 9 Sep 2022 19:11:23 +0200 Subject: [PATCH 2/3] dynamically resolve audio path --- efy/efy.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/efy/efy.js b/efy/efy.js index dcdab643..db30f78a 100644 --- a/efy/efy.js +++ b/efy/efy.js @@ -1,4 +1,4 @@ -/*EFY UI 2022.09.08*/ let e$ = document.querySelector.bind(document), e$all = document.querySelectorAll.bind(document), e$create = document.createElement.bind(document), e$body, e$root; window.onload =()=>{ e$root = e$(":root"), e$body = e$("body"); +/*EFY UI 2022.09.08*/ let e$ = document.querySelector.bind(document), e$all = document.querySelectorAll.bind(document), e$create = document.createElement.bind(document), e$body, e$root; window.onload =async ()=>{ e$root = e$(":root"), e$body = e$("body"); /*Check LocalStorage*/ try {let x = 'LS'; localStorage.setItem(x, x); let y = localStorage.getItem(x); localStorage.removeItem(x); if (x !== y) {throw new Error();}} catch (exception) {e$('body').innerHTML = `
EFY - Your browser blocks LocalStorage

You can block 3rd party cookies, no worries, Privacy matters! But please allow 1st party cookies in your browser's settings. EFYdoesn't use cookies or track you, but the settings related to LocalStorage are grouped as "cookies", although different. Have fun! 🥳

`} @@ -290,8 +290,8 @@ await importIDB(); }; reader.readAsText(file); }); /*Reset Settings*/ e$all(".efy_localstorage_reset").forEach(x =>{ x.onclick = () => { Object.entries(localStorage).forEach(([k])=>{ if (k.includes('efy')){ localStorage.removeItem(k)} }); location.reload() }}); - -/*Audio*/ let efyaudio = {}; ['pop','ok','ok2','ok3','ok4','hover','slide','squish','step','error','disabled'].forEach(x => { efyaudio[x] = new Audio(`./audio/${x}.mp3`) }); e$body.addEventListener("pointerdown", efyaudio_fn, {once: true}); +/*Determine Audio Path*/ let audioPath; await fetch('./audio/ok.mp3').then((response) => { audioPath = response.ok ? './audio' : '/audio'; }); +/*Audio*/ let efyaudio = {}; ['pop','ok','ok2','ok3','ok4','hover','slide','squish','step','error','disabled'].forEach(x => { efyaudio[x] = new Audio(`${audioPath}/${x}.mp3`) }); e$body.addEventListener("pointerdown", efyaudio_fn, {once: true}); async function efyaudio_fn() { if (localStorage.efy_audio_status == 'on' ){ if (localStorage.efy_audio_click == 'on') { /*Ok*/ e$body.addEventListener("pointerup", ()=>{ if (event.target.matches('button:not([disabled], [type=submit], [type=reset], [efy_tab], .shaka-overflow-menu button, .shaka-overflow-menu-button, .shaka-back-to-overflow-button), .video-grid>div')) { efyaudio.ok.cloneNode().play() }}); From 8bd7efa96f3a1eeaa7e9f17fd0545266351aeea4 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Fri, 9 Sep 2022 19:16:57 +0200 Subject: [PATCH 3/3] fix 404 --- src/components/PageNotFound.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/PageNotFound.vue b/src/components/PageNotFound.vue index d132c35c..a135bc84 100644 --- a/src/components/PageNotFound.vue +++ b/src/components/PageNotFound.vue @@ -1,7 +1,7 @@