Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.js: Difference between revisions

MediaWiki interface page
No edit summary
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Add Golden Retriever logo next to footer text */
/* Golden Retriever Wiki Custom Enhancements */
$(document).ready(function() {
(function() {
    var footerText = $('.mw-logo-wordmark');
    var logoUrl = "https://wiki.goldenretrieverapp.com/images/thumb/a/ad/GRLogo.png/1200px-GRLogo.png?_=20260924164344";
    if (footerText.length && !$('#footer-logo-img').length) {
 
        footerText.prepend('<img id="footer-logo-img" src="https://wiki.goldenretrieverapp.com/images/thumb/a/ad/GRLogo.png/1200px-GRLogo.png?_=20260924164344" style="height: 52px; margin-right: 12px; vertical-align: middle;">');
    // 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 actual page footer (ignoring the drawer menu)
    $(document).ready(function() {
        var footerText = $('footer.citizen-footer .mw-logo-wordmark, #footer .mw-logo-wordmark').not('.citizen-drawer *');
        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;">');
        }
     });
})();

Latest revision as of 17:24, 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 actual page footer (ignoring the drawer menu)
    $(document).ready(function() {
        var footerText = $('footer.citizen-footer .mw-logo-wordmark, #footer .mw-logo-wordmark').not('.citizen-drawer *');
        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;">');
        }
    });
})();