Difference between revisions of "MediaWiki:Common.js"

From CompetenceBase
(Blanked the page)
Tag: Blanking
 
Line 1: Line 1:
  
$(document).ready(function() {
 
    // Listen for language changes from the ULS
 
    $(document).on('languagechange', function() {
 
console.log('asfd');
 
 
        var url = new URL(window.location.href);
 
        url.searchParams.delete('uselang');
 
 
        window.history.replaceState({}, '', url.toString());
 
    });
 
 
    mw.hook('uls.language.change').add(function() {
 
        // Manually trigger the language change event
 
        $(document).trigger('languagechange');
 
    });
 
});
 

Latest revision as of 11:34, 5 August 2024


Wikidata