mirror of
https://github.com/meowarex/TidaLuna-Plugins.git
synced 2026-10-15 07:53:13 +11:00
WIP | Switch to Local CSS
This commit is contained in:
1 parent
40d6e25d00
commit
14a8521940
6 files changed
+453
-162
No files matched your search
@@ -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";
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[class^="_lyricsText"]>div>span {
|
||||
user-select: text;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
::selection {
|
||||
background: rgb(72, 0, 60);
|
||||
color: rgb(255, 255, 255);
|
||||
}
|
||||
Reference in new issue
Block a user