Difference between revisions of "MediaWiki:Common.js"

Line 1: Line 1:
 
$(function() {
 
$(function() {
  
/* Change DisplayTitle
+
/* START Change DisplayTitle */
  START */
+
var cfer = $('#info-cfer').text();
let cfer = $('#info-cfer').text();
+
var hsk = $('#info-hsk').text();
let hsk = $('#info-hsk').text();
+
var link = $('#info-link').text();
let link = $('#info-link').text();
+
var headerText = $('.allset-page-heading h1').text();
let headerText = $('.allset-page-heading h1').text();
+
var header = $('.allset-page-heading h1');
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>");
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 */
 
/* END */
  
 
});
 
});

Revision as of 17:47, 26 September 2021

$(function() {

/* START Change DisplayTitle */
var cfer = $('#info-cfer').text();
var hsk = $('#info-hsk').text();
var link = $('#info-link').text();
var headerText = $('.allset-page-heading h1').text();
var 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 */

});