MediaWiki:Common.js: Difference between revisions

add epic header stuff
No edit summary
Tag: Manual revert
(add epic header stuff)
Line 11: Line 11:
if (sitenotice) {
if (sitenotice) {
sitenotice.classList.add('sitenoticestyling');
sitenotice.classList.add('sitenoticestyling');
}
// Add extra info to infobox's cost header to notify users to take it with a grain of salt
const headers = document.querySelectorAll('.pi-header')
if (headers) {
    for (const header of headers) {
        const paragraph = header.querySelector('p')
        if (paragraph.textContent.includes('Cost')) {
            header.style.textDecoration = 'underline dashed'
            header.style.cursor = "help"
            header.title = "The cost section is meant to be taken with a grain of salt. Price fluctuates based on the economy, and the cost section is meant to be a rough estimate of the price of the item."
        }
    }
}
}