Difference between revisions of "MediaWiki:Common.js"

From NewlyPossible.org
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. */
  
$( function () {
+
mw.loader.using( [ 'mediawiki.util' ] ).done( function () {
  
 
node = document.getElementsbyClassName('mw-headline');
 
node = document.getElementsbyClassName('mw-headline');

Revision as of 06:49, 27 February 2021

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

mw.loader.using( [ 'mediawiki.util' ] ).done( function () {

node = document.getElementsbyClassName('mw-headline');
node.insertAdjacentHTML('afterend', '<span id="BackToTop"></span><div class="noprint" style="background-color:#FAFAFA; position:fixed; bottom:2%; right:0.25%; padding:0.1em; margin:0.1em; opacity=0.8">[[#BackToTop|Go to Top]]</div>');

} );