MediaWiki:Common.js: Difference between revisions
No edit summary |
No edit summary |
||
| Line 648: | Line 648: | ||
} else { | } else { | ||
applyCatImages(); | applyCatImages(); | ||
} | |||
})(); | |||
// Add Impressum link to footer places row | |||
(function() { | |||
function addImpressumToFooter() { | |||
// Find the footer-places list | |||
var footerPlaces = document.getElementById('footer-places'); | |||
if (!footerPlaces) return; | |||
// Check if Impressum link already exists | |||
if (document.getElementById('footer-places-impressum')) return; | |||
// Create the new list item | |||
var li = document.createElement('li'); | |||
li.id = 'footer-places-impressum'; | |||
var a = document.createElement('a'); | |||
a.href = '/Impressum'; | |||
a.textContent = 'Impressum'; | |||
li.appendChild(a); | |||
footerPlaces.appendChild(li); | |||
} | |||
if (document.readyState === 'loading') { | |||
document.addEventListener('DOMContentLoaded', addImpressumToFooter); | |||
} else { | |||
addImpressumToFooter(); | |||
} | } | ||
})(); | })(); | ||