Difference between revisions of "MediaWiki:Common.js"

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. */
 
+
alert('here');
 
$(document).ready(function(){
 
$(document).ready(function(){
  

Revision as of 17:01, 26 September 2021

/* Any JavaScript here will be loaded for all users on every page load. */
alert('here');
$(document).ready(function(){

/* Change DisplayTitle
   START */
let cfer = $('#info-cfer').text();
let hsk = $('#info-hsk').text();
let link = $('#info-link').text();
let headerText = $('.allset-page-heading h1').text();
let header = $('.allset-page-heading h1');
header.html(headerText + 
            "<span style='float:right'>" + cfer + "/" + hsk +
            "<a href='/chinese/vocabulary/" + link + "' title='" + link + "'><img src='https://resources.allsetlearning.com/gramwiki/images/silk/link.png'></a></span>");

/* END */

});