diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index ee8c01ff80..95e993bbb7 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -1183,9 +1183,8 @@ module.exports = (_ => { notice.insertBefore(icon, noticeText); } if (config.customIcon) { - let iconInner = BDFDB.DOMUtils.create(config.customIcon) - let icon = BDFDB.DOMUtils.create(``); - if (iconInner.tagName == "span" && !iconInner.firstElementChild) icon.style.setProperty("background", `url(${config.customIcon}) center/cover no-repeat`); + let icon = document.createElement("i"), iconInner = BDFDB.DOMUtils.create(config.customIcon); + if (iconInner.nodeType == Node.TEXT_NODE) icon.style.setProperty("background", `url(${config.customIcon}) center/cover no-repeat`); else icon.appendChild(iconInner); BDFDB.DOMUtils.addClass(icon, BDFDB.disCN.noticeplatformicon); BDFDB.DOMUtils.removeClass(icon, BDFDB.disCN.noticeicon); diff --git a/Library/_res/BDFDB.raw.css b/Library/_res/BDFDB.raw.css index 91f8a8a12d..974aceadca 100644 --- a/Library/_res/BDFDB.raw.css +++ b/Library/_res/BDFDB.raw.css @@ -1120,6 +1120,9 @@ img:not([src]), img[src=""], img[src="null"] { transform: translateY(-10px); } [REPLACE_CLASS_toasticon] { + display: flex; + justify-content: center; + align-items: center; flex: 0 0 auto; width: 24px; height: 24px;