MediaWiki:Common.js: verschil tussen versies

Uit Handje Wiki
Naar navigatie springen Naar zoeken springen
Geen bewerkingssamenvatting
Label: Ongedaan gemaakt
Geen bewerkingssamenvatting
Labels: Handmatige ongedaanmaking Ongedaan gemaakt
Regel 19: Regel 19:
     $('body').css('visibility', 'visible');
     $('body').css('visibility', 'visible');
});
});
 
*/


$(document).ready(function() {
$(document).ready(function() {
Regel 30: Regel 30:
     }
     }
});
});
*/

Versie van 10 nov 2024 14:12

/* JavaScript die hier wordt geplaatst heeft invloed op alle pagina's voor alle gebruikers */


/*
$(document).ready(function() {
    // Temporarily hide the body to prevent a flash of content before the elements are hidden
    $('body').css('visibility', 'hidden');

    // Get the browser's user agent
    var userAgent = navigator.userAgent;

    // Check if 'ZFBrowser' is part of the user agent string
    if (userAgent.includes("ZFBrowser")) {
        // Select all the elements in a single call and hide them
        $('#ca-talk, #ca-viewsource, #footer-places-disclaimer, #pt-createaccount, #p-tb, #ca-history, #footer-places-about, #pt-login, #footer-info-lastmod, #n-recentchanges, #n-help-mediawiki').addClass('hide-element');
    }

    // Show the body again after hiding the elements
    $('body').css('visibility', 'visible');
});
*/

$(document).ready(function() {
    // Get the browser's user agent
    var userAgent = navigator.userAgent;

    // If 'ZFBrowser' is not in the user agent, remove the 'hide-element' class from hidden elements
    if (!userAgent.includes("ZFBrowser")) {
        $('#ca-talk, #ca-viewsource, #footer-places-disclaimer, #pt-createaccount, #p-tb, #ca-history, #footer-places-about, #pt-login, #footer-info-lastmod, #n-recentchanges, #n-help-mediawiki').removeClass('hide-element');
    }
});