From db1c5253bf15983f5f601e938683a9778e295d6c Mon Sep 17 00:00:00 2001 From: Inrixia Date: Thu, 7 Mar 2024 21:52:17 +0000 Subject: [PATCH] deploy: ea44c8d8d63ad1fc93cabb0a9d3ed8b3d12e141b --- TidalTags/index.js | 14 +++++++------- TidalTags/manifest.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/TidalTags/index.js b/TidalTags/index.js index 1d7bcb75..1b894544 100644 --- a/TidalTags/index.js +++ b/TidalTags/index.js @@ -81,7 +81,7 @@ input:checked + .slider { input:checked + .slider:before { transform: translateX(26px); } -`);import{store as Mm}from"@neptune";import{storage as Lo}from"@plugin";var Ro=a=>{let e=[],t=document.querySelectorAll(`[${a}]`);for(let r of t)e.push({elem:r,attr:r.getAttribute(a)});return e},dr=()=>{let a=[...Ro("data-track-id"),...Ro("data-track--content-id")];if(a.length===0)return;let e=Mm.getState().content.mediaItems;for(let{elem:t,attr:r}of a){if(r==null)continue;let i=e[+r]?.item;if(i?.contentType!=="track")continue;let n=i.mediaMetadata?.tags;if(n===void 0||n.length===1&&n[0]==="LOSSLESS")continue;let s=t.querySelector('[data-test="table-row-title"], [data-test="list-item-track"]');if(s===null)continue;let o=t.querySelector(".quality-tag-container")??document.createElement("span");if(o.getAttribute("track-id")!==r){o.innerHTML="",o.className="quality-tag-container",o.setAttribute("track-id",r),n.includes("HIRES_LOSSLESS")&&!Lo.showAllQualities&&(n=n.filter(c=>c!=="MQA"));for(let c of n){if(c==="LOSSLESS"||!Lo.showAtmosQuality&&c==="DOLBY_ATMOS")continue;let h=At[c];if(h===void 0)continue;let l=document.createElement("span");l.className=h.className,l.textContent=h.textContent,l.style.color=h.color,o.appendChild(l)}s.appendChild(o)}}};import{html as Om}from"@neptune/voby";import{storage as L}from"@plugin";L.showTags??=!0;L.showFLACInfo??=!0;L.showFLACInfoBorder??=!1;L.showAllQualities??=!0;L.showAtmosQuality??=!0;var zm=()=>{setTimeout(()=>{let e=document.getElementById("showTags");e instanceof HTMLInputElement&&e.checked!==L.showTags&&(e.checked=L.showTags);let t=document.getElementById("showFLACInfo");t instanceof HTMLInputElement&&t.checked!==L.showFLACInfo&&(t.checked=L.showFLACInfo);let r=document.getElementById("showFLACInfoBorder");r instanceof HTMLInputElement&&r.checked!==L.showFLACInfoBorder&&(r.checked=L.showFLACInfoBorder);let i=document.getElementById("showAllQualities");i instanceof HTMLInputElement&&i.checked!==L.showAllQualities&&(i.checked=L.showAllQualities);let n=document.getElementById("showAtmosQuality");n instanceof HTMLInputElement&&n.checked!==L.showAtmosQuality&&(n.checked=L.showAtmosQuality)});let a=e=>t=>{L[e]=t.target.checked,ur(),dr()};return Om`
+`);import{store as Mm}from"@neptune";import{storage as Lo}from"@plugin";var Ro=a=>{let e=[],t=document.querySelectorAll(`[${a}]`);for(let r of t)e.push({elem:r,attr:r.getAttribute(a)});return e},dr=()=>{let a=[...Ro("data-track-id"),...Ro("data-track--content-id")];if(a.length===0)return;let e=Mm.getState().content.mediaItems;for(let{elem:t,attr:r}of a){if(r==null)continue;let i=e[+r]?.item;if(i?.contentType!=="track")continue;let n=i.mediaMetadata?.tags;if(n===void 0||n.length===1&&n[0]==="LOSSLESS")continue;let s=t.querySelector('[data-test="table-row-title"], [data-test="list-item-track"]');if(s===null)continue;let o=t.querySelector(".quality-tag-container")??document.createElement("span");if(o.getAttribute("track-id")!==r){o.innerHTML="",o.className="quality-tag-container",o.setAttribute("track-id",r),n.includes("HIRES_LOSSLESS")&&!Lo.showAllQualities&&(n=n.filter(c=>c!=="MQA"));for(let c of n){if(c==="LOSSLESS"||!Lo.showAtmosQuality&&c==="DOLBY_ATMOS")continue;let h=At[c];if(h===void 0)continue;let l=document.createElement("span");l.className=h.className,l.textContent=h.textContent,l.style.color=h.color,o.appendChild(l)}s.appendChild(o)}}};import{html as Om}from"@neptune/voby";import{storage as L}from"@plugin";L.showTags??=!0;L.showAllQualities??=!0;L.showAtmosQuality??=!0;L.showFLACInfo=!1;L.showFLACInfoBorder=!1;var zm=()=>{setTimeout(()=>{let e=document.getElementById("showTags");e instanceof HTMLInputElement&&e.checked!==L.showTags&&(e.checked=L.showTags);let t=document.getElementById("showFLACInfo");t instanceof HTMLInputElement&&t.checked!==L.showFLACInfo&&(t.checked=L.showFLACInfo);let r=document.getElementById("showFLACInfoBorder");r instanceof HTMLInputElement&&r.checked!==L.showFLACInfoBorder&&(r.checked=L.showFLACInfoBorder);let i=document.getElementById("showAllQualities");i instanceof HTMLInputElement&&i.checked!==L.showAllQualities&&(i.checked=L.showAllQualities);let n=document.getElementById("showAtmosQuality");n instanceof HTMLInputElement&&n.checked!==L.showAtmosQuality&&(n.checked=L.showAtmosQuality)});let a=e=>t=>{L[e]=t.target.checked,ur(),dr()};return Om`

Display Tags

Display Quality Tags.


-

Show FLAC Info

-

Show Sample Rate/Bit Depth

+

Show FLAC Info

+

Show Sample Rate/Bit Depth (unavalible)


-

Show FLAC Info Border

-

Show a border around the FLAC Info

+

Show FLAC Info Border

+

Show a border around the FLAC Info (unavalible)

`};import{storage as Lm}from"@plugin";var Rm=Nm(["playbackControls/SET_PLAYBACK_STATE","playbackControls/MEDIA_PRODUCT_TRANSITION"],()=>{setTimeout(ur)}),Uo=()=>{pr.disconnect(),dr(),pr.observe(document.body,{childList:!0,subtree:!0})},mr,Um=()=>{Lm.showTags&&(mr===null?Uo():clearTimeout(mr),mr=setTimeout(()=>{Uo(),mr=null},5))},pr=new MutationObserver(Um);pr.observe(document.body,{childList:!0,subtree:!0});var hh=()=>{pr.disconnect(),Rm()};export{zm as Settings,hh as onUnload}; diff --git a/TidalTags/manifest.json b/TidalTags/manifest.json index 4d001cbb..fcc61b62 100644 --- a/TidalTags/manifest.json +++ b/TidalTags/manifest.json @@ -1 +1 @@ -{"name":"Tidal Tags","description":"Adds tags showing track qualities and current song quality.","author":"Inrixia","hash":"d4eab00bae82e75e5d537b916d0852a2"} \ No newline at end of file +{"name":"Tidal Tags","description":"Adds tags showing track qualities and current song quality.","author":"Inrixia","hash":"bc86bda08ab3bdf0138fb16182f25e6c"} \ No newline at end of file