mirror of
https://github.com/d0zingcat/BroadcastChannel.git
synced 2026-06-03 23:16:50 +00:00
fix: improve accessibility and remove unnecessary attributes
Enhanced accessibility by wrapping time display in a semantic `<time>` element, ensuring better screen reader support. Removed inline styles and onclick attributes from elements, simplifying the code and improving performance.
This commit is contained in:
@@ -100,9 +100,9 @@ function getReply($, item, { channel }) {
|
||||
}
|
||||
|
||||
function modifyHTMLContent($, content, { index } = {}) {
|
||||
$(content).find('.emoji')?.attr('style', '')
|
||||
$(content).find('.emoji')?.removeAttr('style')
|
||||
$(content).find('a')?.each((_index, a) => {
|
||||
$(a)?.attr('title', $(a)?.text())?.attr('onclick', '')
|
||||
$(a)?.attr('title', $(a)?.text())?.removeAttr('onclick')
|
||||
})
|
||||
$(content).find('tg-spoiler')?.each((_index, spoiler) => {
|
||||
const id = `spoiler-${index}-${_index}`
|
||||
|
||||
Reference in New Issue
Block a user