MediaWiki:Common.js: Difference between revisions
MediaWiki interface page
More actions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/* Golden Retriever Wiki Custom Enhancements */ | /* Golden Retriever Wiki Custom Enhancements */ | ||
(function() { | (function() { | ||
var logoUrl = "https://wiki.goldenretrieverapp.com/images/thumb/a/ad/GRLogo.png/1200px-GRLogo.png?_=20260924164344"; | var logoUrl = "https://wiki.goldenretrieverapp.com/images/thumb/a/ad/GRLogo.png/1200px-GRLogo.png?_=20260924164344"; | ||
// 1. Force Browser Favicon Update | // 1. Force Browser Tab Favicon Update | ||
var link = document.querySelector("link[rel*='icon']") || document.createElement('link'); | var link = document.querySelector("link[rel*='icon']") || document.createElement('link'); | ||
link.type = 'image/png'; | link.type = 'image/png'; | ||
| Line 23: | Line 10: | ||
document.getElementsByTagName('head')[0].appendChild(link); | document.getElementsByTagName('head')[0].appendChild(link); | ||
// 2. Inject Logo into Footer | // 2. Inject Logo ONLY into the Footer (Targeting Citizen footer containers directly) | ||
$(document).ready(function() { | $(document).ready(function() { | ||
var footerText = $('.mw-logo-wordmark'); | var footerText = $('.citizen-footer .mw-logo-wordmark, footer .mw-logo-wordmark'); | ||
if (footerText.length && !$('#footer-logo-img').length) { | if (footerText.length && !$('#footer-logo-img').length) { | ||
footerText.prepend('<img id="footer-logo-img" src="' + logoUrl + '" style="height: 52px; margin-right: 12px; vertical-align: middle;">'); | footerText.prepend('<img id="footer-logo-img" src="' + logoUrl + '" style="height: 52px; margin-right: 12px; vertical-align: middle;">'); | ||
Revision as of 17:23, 24 September 2026
/* Golden Retriever Wiki Custom Enhancements */
(function() {
var logoUrl = "https://wiki.goldenretrieverapp.com/images/thumb/a/ad/GRLogo.png/1200px-GRLogo.png?_=20260924164344";
// 1. Force Browser Tab Favicon Update
var link = document.querySelector("link[rel*='icon']") || document.createElement('link');
link.type = 'image/png';
link.rel = 'shortcut icon';
link.href = logoUrl;
document.getElementsByTagName('head')[0].appendChild(link);
// 2. Inject Logo ONLY into the Footer (Targeting Citizen footer containers directly)
$(document).ready(function() {
var footerText = $('.citizen-footer .mw-logo-wordmark, footer .mw-logo-wordmark');
if (footerText.length && !$('#footer-logo-img').length) {
footerText.prepend('<img id="footer-logo-img" src="' + logoUrl + '" style="height: 52px; margin-right: 12px; vertical-align: middle;">');
}
});
})();