FINAL PUSH!!!

This commit is contained in:
ItzzExcel
2025-02-22 20:02:17 -06:00
parent 15dc0a4dbd
commit 4b467460aa
5 changed files with 116 additions and 11 deletions
+7
View File
@@ -2,6 +2,13 @@
This repository a repository containing my Neptune (TIDAL Modded Client) projects.
<hr>
### Credits to [Inrixia](https://github.com/inrixia) for some of the libraries/files used in this repository.
- tracer.js (tracer.ts)
- Get the cover URL method
<hr>
## Index:
- [Copy Lyrics](#copy-lyrics)
- [OLED Theme](#oled-theme)
+6 -1
View File
@@ -1 +1,6 @@
var h=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var O=(t,e)=>()=>(t&&(e=t(t=0)),e);var b=(t,e)=>{for(var n in e)h(t,n,{get:e[n],enumerable:!0})},S=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of I(e))!N.call(t,r)&&r!==n&&h(t,r,{get:()=>e[r],enumerable:!(s=x(e,r))||s.enumerable});return t};var _=t=>S(h({},"__esModule",{value:!0}),t);var T={};b(T,{Tracer:()=>m,libTrace:()=>$});import{actions as f}from"@neptune";var m,$,g=O(()=>{"use strict";m=t=>{let e=c=>{let a=(...o)=>{c(t,...o)};return a.withContext=o=>(...d)=>{c(t,o,...d)},a},n=e(console.log),s=e(console.warn),r=e(console.error),w=e(console.debug),p=(c,a,o)=>{let d=l=>{c(l),a({message:`${t} - ${l}`,category:"OTHER",severity:o})};return d.withContext=l=>{let R=c.withContext(l);return i=>{R(i),i instanceof Error&&(i=i.message),a({message:`${t}.${l} - ${i}`,category:"OTHER",severity:o})}},d};return{log:n,warn:s,err:r,debug:w,msg:{log:p(n,f.message.messageInfo,"INFO"),warn:p(s,f.message.messageWarn,"WARN"),err:p(r,f.message.messageError,"ERROR")}}},$=m("[lib]")});g();import{intercept as E}from"@neptune";g();var k=m("[OLED Theme]"),A="https://raw.githubusercontent.com/ItzzExcel/neptune-projects/refs/heads/main/themes/black-neptune-theme.css",C,u;function U(t){let e=document.createElement("style");return e.type="text/css",e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t)),document.head.appendChild(e),e}function D(){u&&u.parentNode&&u.parentNode.removeChild(u)}async function L(t){try{let e=await fetch(t);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);return await e.text()}catch(e){return k.msg.err(`Failed to fetch URL: ${e.message}`),null}}(async()=>(C=await L(A),u=U(C)))();function y([t]){}E("playbackControls/PREFILL_MEDIA_PRODUCT_TRANSITION",y);E("playbackControls/MEDIA_PRODUCT_TRANSITION",y);function z(){D()}export{z as onUnload};
var y=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var R=(t,e)=>()=>(t&&(e=t(t=0)),e);var N=(t,e)=>{for(var r in e)y(t,r,{get:e[r],enumerable:!0})},O=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of w(e))!S.call(t,c)&&c!==r&&y(t,c,{get:()=>e[c],enumerable:!(a=T(e,c))||a.enumerable});return t};var v=t=>O(y({},"__esModule",{value:!0}),t);var C={};N(C,{Tracer:()=>p,libTrace:()=>k});import{actions as h}from"@neptune";var p,k,f=R(()=>{"use strict";p=t=>{let e=o=>{let i=(...l)=>{o(t,...l)};return i.withContext=l=>(...g)=>{o(t,l,...g)},i},r=e(console.log),a=e(console.warn),c=e(console.error),s=e(console.debug),n=(o,i,l)=>{let g=m=>{o(m),i({message:`${t} - ${m}`,category:"OTHER",severity:l})};return g.withContext=m=>{let I=o.withContext(m);return d=>{I(d),d instanceof Error&&(d=d.message),i({message:`${t}.${m} - ${d}`,category:"OTHER",severity:l})}},g};return{log:r,warn:a,err:c,debug:s,msg:{log:n(r,h.message.messageInfo,"INFO"),warn:n(a,h.message.messageWarn,"WARN"),err:n(c,h.message.messageError,"ERROR")}}},k=p("[lib]")});f();import{intercept as E}from"@neptune";f();var A=p("[OLED Theme]"),_="https://raw.githubusercontent.com/ItzzExcel/neptune-projects/refs/heads/main/themes/black-neptune-theme.css",x,u;function $(t){let e=document.createElement("style");return e.type="text/css",e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t)),document.head.appendChild(e),e}function P(){u&&u.parentNode&&u.parentNode.removeChild(u)}async function U(t){try{let e=await fetch(t);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);return await e.text()}catch(e){return A.msg.err(`Failed to fetch URL: ${e.message}`),null}}(async()=>(x=await U(_),u=$(x)))();var b=function([t]){let e=document.querySelector('figure[class*="albumImage"] > div > div > div > img'),r;e&&(r=e.src,r=r.replace(/\d+x\d+/,"1280x1280"),e.src=r);let a=document.querySelector('[class*="nowPlayingContainer"]');if(a&&r){a.querySelectorAll(".corner-image").forEach(o=>o.remove());let s=document.createElement("img");s.src=r,s.className="corner-image",s.style.position="absolute",s.style.left="50%",s.style.top="50%",s.style.transform="translate(-50%, -50%)",s.style.width="75vw",s.style.height="150vh",s.style.objectFit="cover",s.style.zIndex="-1",s.style.filter="blur(100px) brightness(0.6) contrast(1.2) saturate(2)",s.style.animation="spin 35s linear infinite",a.appendChild(s);let n=document.createElement("img");if(n.src=r,n.className="corner-image",n.style.position="absolute",n.style.left="50%",n.style.top="50%",n.style.transform="translate(-50%, -50%)",n.style.width="75vw",n.style.height="150vh",n.style.objectFit="cover",n.style.zIndex="-1",n.style.filter="blur(100px) brightness(0.6) contrast(1.2) saturate(2)",n.style.animation="spin 35s linear infinite",a.appendChild(n),!document.querySelector("#spinAnimation")){let o=document.createElement("style");o.id="spinAnimation",o.textContent=`
@keyframes spin {
from { transform: translate(-50%, -50%) rotate(0deg); }
to { transform: translate(-50%, -50%) rotate(360deg); }
}
`,document.head.appendChild(o)}}},q=E("playbackControls/PREFILL_MEDIA_PRODUCT_TRANSITION",b),D=E("playbackControls/MEDIA_PRODUCT_TRANSITION",b);function W(){P(),q(),D()}export{W as onUnload};
+1 -1
View File
@@ -1 +1 @@
{"name":"OLED Theme","description":"A working theme. ong.","author":"itzzexcel@github","hash":"d6f50bec7e0b1f8d7b829666128cb241","metafile":{"inputs":{"plugins/oled-theme/src/tracer.js":{"bytes":1596,"imports":[{"path":"@neptune","kind":"import-statement","external":true}],"format":"esm"},"plugins/oled-theme/src/index.js":{"bytes":1729,"imports":[{"path":"plugins/oled-theme/src/tracer.js","kind":"import-statement","original":"./tracer"},{"path":"@neptune","kind":"import-statement","external":true},{"path":"plugins/oled-theme/src/tracer.js","kind":"require-call","original":"./tracer"}],"format":"esm"}},"outputs":{"plugins/oled-theme/dist/index.js":{"imports":[{"path":"@neptune","kind":"import-statement","external":true},{"path":"@neptune","kind":"import-statement","external":true}],"exports":["onUnload"],"entryPoint":"plugins/oled-theme/src/index.js","inputs":{"plugins/oled-theme/src/tracer.js":{"bytesInOutput":693},"plugins/oled-theme/src/index.js":{"bytesInOutput":800}},"bytes":1963}}}}
{"name":"OLED Theme","description":"A working theme. ong.","author":"itzzexcel@github","hash":"9dc95fd9e70e3eb67d7765dd0400c463","metafile":{"inputs":{"plugins/oled-theme/src/tracer.js":{"bytes":1596,"imports":[{"path":"@neptune","kind":"import-statement","external":true}],"format":"esm"},"plugins/oled-theme/src/index.js":{"bytes":5423,"imports":[{"path":"plugins/oled-theme/src/tracer.js","kind":"import-statement","original":"./tracer"},{"path":"@neptune","kind":"import-statement","external":true},{"path":"plugins/oled-theme/src/tracer.js","kind":"require-call","original":"./tracer"}],"format":"esm"}},"outputs":{"plugins/oled-theme/dist/index.js":{"imports":[{"path":"@neptune","kind":"import-statement","external":true},{"path":"@neptune","kind":"import-statement","external":true}],"exports":["onUnload"],"entryPoint":"plugins/oled-theme/src/index.js","inputs":{"plugins/oled-theme/src/tracer.js":{"bytesInOutput":693},"plugins/oled-theme/src/index.js":{"bytesInOutput":2261}},"bytes":3424}}}}
+90 -6
View File
@@ -1,6 +1,6 @@
require("./tracer")
import { Tracer } from "./tracer";
import { intercept, store } from "@neptune"
import { intercept, store, utils } from "@neptune"
const trace = Tracer("[OLED Theme]");
const themeUrl = "https://raw.githubusercontent.com/ItzzExcel/neptune-projects/refs/heads/main/themes/black-neptune-theme.css";
@@ -42,16 +42,100 @@ async function HttpGet(url) {
(async () => {
style = await HttpGet(themeUrl);
styleElement = ApplyCSS(style);
// trace.msg.log("CSS Applied!");
})();
function onTrackChanged([track]) {
/* How to get the album cover URL 💔💔💔 */
const onTrackChanged = function ([track]) {
// Tu amor tan liminal, tu amor tan liminal
// - Ghouljaboy, 2021
let albumImageElement = document.querySelector('figure[class*="albumImage"] > div > div > div > img');
let albumImageSrc;
if (albumImageElement) {
albumImageSrc = albumImageElement.src;
// Set res to 1280x1280
albumImageSrc = albumImageSrc.replace(/\d+x\d+/, '1280x1280');
albumImageElement.src = albumImageSrc;
}
// Setting background to the *="nowPlayingContainer" element
let nowPlayingContainerElement = document.querySelector('[class*="nowPlayingContainer"]');
if (nowPlayingContainerElement && albumImageSrc) {
// Remove existing corner images if they exist
const existingImages = nowPlayingContainerElement.querySelectorAll('.corner-image');
existingImages.forEach(img => img.remove());
// Create and append center image
const centerImg = document.createElement('img');
centerImg.src = albumImageSrc;
centerImg.className = 'corner-image';
centerImg.style.position = 'absolute';
centerImg.style.left = '50%';
centerImg.style.top = '50%';
centerImg.style.transform = 'translate(-50%, -50%)';
centerImg.style.width = '75vw';
centerImg.style.height = '150vh';
centerImg.style.objectFit = 'cover';
centerImg.style.zIndex = '-1';
centerImg.style.filter = 'blur(100px) brightness(0.6) contrast(1.2) saturate(2)';
centerImg.style.animation = 'spin 35s linear infinite';
nowPlayingContainerElement.appendChild(centerImg);
const centerImg2 = document.createElement('img');
centerImg2.src = albumImageSrc;
centerImg2.className = 'corner-image';
centerImg2.style.position = 'absolute';
centerImg2.style.left = '50%';
centerImg2.style.top = '50%';
centerImg2.style.transform = 'translate(-50%, -50%)';
centerImg2.style.width = '75vw';
centerImg2.style.height = '150vh';
centerImg2.style.objectFit = 'cover';
centerImg2.style.zIndex = '-1';
centerImg2.style.filter = 'blur(100px) brightness(0.6) contrast(1.2) saturate(2)';
centerImg2.style.animation = 'spin 35s linear infinite';
nowPlayingContainerElement.appendChild(centerImg2);
// Add keyframe animation if it doesn't exist
if (!document.querySelector('#spinAnimation')) {
const styleSheet = document.createElement('style');
styleSheet.id = 'spinAnimation';
styleSheet.textContent = `
@keyframes spin {
from { transform: translate(-50%, -50%) rotate(0deg); }
to { transform: translate(-50%, -50%) rotate(360deg); }
}
`;
document.head.appendChild(styleSheet);
}
}
}
intercept("playbackControls/PREFILL_MEDIA_PRODUCT_TRANSITION", onTrackChanged);
intercept("playbackControls/MEDIA_PRODUCT_TRANSITION", onTrackChanged);
// const onTrackPaused = function ([track]) {
// [...document.getElementsByClassName("corner-image")].forEach((element) => {
// element.style.animation = "spin 50s linear infinite";
// });
// }
// const onTrackResumed = function ([track]) {
// [...document.getElementsByClassName("corner-image")].forEach((element) => {
// element.style.animation = "spin 20s linear infinite";
// });
// }
const unOnTrackChanged1 = intercept("playbackControls/PREFILL_MEDIA_PRODUCT_TRANSITION", onTrackChanged);
const unOnTrackChanged2 = intercept("playbackControls/MEDIA_PRODUCT_TRANSITION", onTrackChanged);
// const unOnTrackPaused1 = intercept("playbackControls/STOP", onTrackPaused);
// const unOnTrackPaused2 = intercept("playbackControls/PAUSE", onTrackPaused);
// const unOnTrackResumed = intercept("playbackControls/PLAY", onTrackResumed);
export function onUnload() {
CleanUpCSS();
unOnTrackChanged1();
unOnTrackChanged2();
// unOnTrackPaused1();
// unOnTrackPaused2();
// unOnTrackResumed();
}
+12 -3
View File
@@ -19,7 +19,7 @@
--track-vibrant-color: white !important;
--wave-color-opacity-contrast-fill-ultra-thin: #fffafa1a !important;
--wave-color-solid-rainbow-yellow-darkest: #fffafa1a !important;
--wave-color-solid-accent-dark: gray;
--wave-color-solid-accent-dark: rgb(128, 128, 128);
}
[class^="followingButton"],
@@ -262,14 +262,22 @@ button[data-test="close-now-playing"]:hover {
[data-current="true"] {
text-shadow: 0 0 2px #fff, 0 0 20px #fff;
padding-left: 15px;
padding-left: 20px;
transition-duration: 0.7s;
}
[data-current="false"] {
text-shadow: 0 0 0px transparent, 0 0 0px transparent;
transition-duration: 0.25s;
color: var(--wave-color-solid-accent-dark);
color: rgba(128, 128, 128, 0.4);
}
[data-current="false"]:hover {
text-shadow: 0 0 2px lightgray, 0 0 20px lightgray;
color: lightgray;
padding-left: 20px;
transition-duration: 0.7s;
}
[class^="lyricsContainer"]>div>div>span {
@@ -277,6 +285,7 @@ button[data-test="close-now-playing"]:hover {
opacity: 1;
font-family: -apple-system-headline, BlinkMacSystemFont, sans-serif;
font-weight: bolder;
font-size: 38px !important;
}
[class^="lyricsProvider"] {