Difference between revisions of "MediaWiki:Common.js"

From Conceptual Reconstructionism Project
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
/* Any JavaScript here will be loaded for all users on every page load. */
console.debug('fine');
 
window.onload = function b() {
$(window).on( "load", {
console.debug('so good');
 
$('*[data-def]').click( function a(){
$('*[data-def]').click( function(){
     var url = location.href;
     var url = location.href;
     location.href = "#" + this.dataDef;
     location.href = "#" + this.dataDef;
     history.replaceState(null, null, url);
     history.replaceState(null, null, url);
} );
} );
console.debug('very fine');
}
}

Revision as of 20:59, 6 December 2021

/* Any JavaScript here will be loaded for all users on every page load. */

$(window).on( "load", {

$('*[data-def]').click( function(){
    var url = location.href;
    location.href = "#" + this.dataDef;
    history.replaceState(null, null, url);
} );
}