Spaces:
No application file
No application file
File size: 533 Bytes
3883c60 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
const titlesMap = {
bycontent: {
'π': 'Refresh',
'π': 'Load',
'π£': 'Unload'
}
}
export function createTitles() {
for (const content in titlesMap.bycontent) {
for (const btn of document.getElementsByTagName('button')) {
if (btn.innerText === content) {
btn.title = titlesMap.bycontent[content]
}
}
}
}
export function titles() {
createTitles()
document.addEventListener('change', () => {
createTitles()
})
} |