User:CanonNi/Scripts/VoteVisualizer.js: Difference between revisions

Content deleted Content added
fix
fix?
 
(One intermediate revision by the same user not shown)
Line 56:
Object.entries(shortConfig).forEach(([key, value]) => {
key.split(' ').forEach((keyword) => {
longConfig[keyword.replace('_', ' ')] = value;
});
});
Line 71:
];
if (voteSymbol) {
boldElement.innerHTMLconst imageUrl = `<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/${voteSymbol}/30px-${voteSymbol.replace(
/..\/..\/(.*)/,
'$1'
)}${`;
const finalUrl = voteSymbol.includesendsWith('.svg') ? '`${imageURL}.png' `: ''imageUrl
boldElement.innerHTML = `<img src="${finalUrl}" alt="${boldElement.textContent} vote" height="15" /> ${boldElement.innerHTML}`;
}
});