Difference between revisions of "MediaWiki:Common.js"
From Conceptual Reconstructionism Project
Thaumasnot (talk | contribs) |
Thaumasnot (talk | contribs) |
||
Line 2: | Line 2: | ||
$(window).on( "load", function() { | $(window).on( "load", function() { | ||
console.debug('ok'); | |||
$('*[data-def]').click( function(){ | $('*[data-def]').click( function(){ | ||
var url = location.href; | var url = location.href; | ||
Line 8: | Line 8: | ||
history.replaceState(null, null, url); | history.replaceState(null, null, url); | ||
}); | }); | ||
console.debug('ok 2'); | |||
}); | }); |
Revision as of 21:03, 6 December 2021
/* Any JavaScript here will be loaded for all users on every page load. */ $(window).on( "load", function() { console.debug('ok'); $('*[data-def]').click( function(){ var url = location.href; location.href = "#" + this.dataDef; history.replaceState(null, null, url); }); console.debug('ok 2'); });