Difference between revisions of "MediaWiki:Common.js"
(add change display title code) |
|||
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. */ | ||
+ | |||
+ | $(document).ready(function(){ | ||
/* Change DisplayTitle | /* Change DisplayTitle | ||
Line 13: | Line 15: | ||
/* END */ | /* END */ | ||
+ | |||
+ | }); |
Revision as of 16:59, 26 September 2021
/* Any JavaScript here will be loaded for all users on every page load. */ $(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 */ });