chore: 更新版本至 5.1.6,修复样式加载失败问题并优化样式插入逻辑

This commit is contained in:
Harvey Zack committed 2025-01-19 20:50:26 +08:00
1 parent c89b9e7871
commit 4b4973eeb3
9 files changed
+45 -32

No files matched your search

@@ -1561,14 +1561,16 @@ class Setting {
exports.default = Setting;
if (typeof document !== "undefined") {
const id = "artplayer-plugin-danmuku";
const $style = document.getElementById(id);
if ($style) $style.textContent = (0, _styleLessDefault.default);
else {
const $style = document.createElement("style");
let $style = document.getElementById(id);
if (!$style) {
$style = document.createElement("style");
$style.id = id;
$style.textContent = (0, _styleLessDefault.default);
document.head.appendChild($style);
if (document.readyState === "loading") document.addEventListener("DOMContentLoaded", ()=>{
document.head.appendChild($style);
});
else (document.head || document.documentElement).appendChild($style);
}
$style.textContent = (0, _styleLessDefault.default);
}
},{"bundle-text:./style.less":"uaCsY","bundle-text:./img/on.svg":"a9r0e","bundle-text:./img/off.svg":"luia6","bundle-text:./img/config.svg":"lo6sV","bundle-text:./img/style.svg":"1Aemm","bundle-text:./img/mode_0_off.svg":"jKvDJ","bundle-text:./img/mode_0_on.svg":"7eesQ","bundle-text:./img/mode_1_off.svg":"DalV6","bundle-text:./img/mode_1_on.svg":"i0F2W","bundle-text:./img/mode_2_off.svg":"1phDW","bundle-text:./img/mode_2_on.svg":"iHUBM","bundle-text:./img/check_on.svg":"fQ6fo","bundle-text:./img/check_off.svg":"dz3tU","@parcel/transformer-js/src/esmodule-helpers.js":"5dUr6"}],"uaCsY":[function(require,module,exports) {