mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 05:11:20 -08:00
Add new utility functions and update styles
This commit is contained in:
1 parent
29ff487547
commit
780124d84b
5 files changed
+47
-25
No files matched your search
@@ -95,3 +95,15 @@ export function getIcon(key = '', html = '') {
|
||||
append(icon, html);
|
||||
return icon;
|
||||
}
|
||||
|
||||
export function setStyleText(id, style) {
|
||||
const $style = document.getElementById(id);
|
||||
if ($style) {
|
||||
$style.textContent = style;
|
||||
} else {
|
||||
const $style = createElement('style');
|
||||
$style.id = id;
|
||||
$style.textContent = style;
|
||||
document.head.appendChild($style);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user