WIP | Switch to Local CSS

This commit is contained in:
2025-06-02 11:26:43 +10:00
parent 40d6e25d00
commit 14a8521940
6 changed files with 453 additions and 162 deletions
+3 -13
View File
@@ -1,23 +1,13 @@
import { LunaUnload, Tracer } from "@luna/core";
// Import CSS directly using Luna's file:// syntax
import unlockSelection from "file://styles.css?minify";
export const { trace } = Tracer("[Copy Lyrics]");
// clean up resources
export const unloads = new Set<LunaUnload>();
const unlockSelection = `
[class^="_lyricsText"]>div>span {
user-select: text;
cursor: text;
}
::selection {
background: rgb(0, 0, 0);
color: rgb(255, 255, 255);
}
`;
function ApplyCSS(style: string): HTMLStyleElement {
const styleElement = document.createElement("style");
styleElement.type = "text/css";
+9
View File
@@ -0,0 +1,9 @@
[class^="_lyricsText"]>div>span {
user-select: text;
cursor: text;
}
::selection {
background: rgb(72, 0, 60);
color: rgb(255, 255, 255);
}