mirror of
https://github.com/meowarex/TidaLuna-Plugins.git
synced 2026-06-18 03:43:10 +10:00
WIP | Switch to Local CSS
This commit is contained in:
@@ -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