Difference between revisions of "MediaWiki:Common.js"
(Fix typo) |
(Fix link) |
||
Line 8: | Line 8: | ||
var header = $('.allset-page-heading h1'); | var header = $('.allset-page-heading h1'); | ||
if(cefr !== "") { | if(cefr !== "") { | ||
− | header.html(headerText + "<span id='header-levs' style='float:right'><span id='header-cefr'><a href='https://resources.allsetlearning.com/vocabulary/" + cefr + "'>" + cefr + "</a></span>/<span id='header-hsk'><a href='https://resources.allsetlearning.com/vocabulary/" + hsk + "'>" + hsk + "</a></span><a href='/chinese/vocabulary/" + link + "' title='" + link + "'><img src='https://resources.allsetlearning.com/gramwiki/images/silk/link.png'></a></span>"); | + | header.html(headerText + "<span id='header-levs' style='float:right'><span id='header-cefr'><a href='https://resources.allsetlearning.com/chinese/vocabulary/" + cefr + "'>" + cefr + "</a></span>/<span id='header-hsk'><a href='https://resources.allsetlearning.com/chinese/vocabulary/" + hsk + "'>" + hsk + "</a></span><a href='/chinese/vocabulary/" + link + "' title='" + link + "'><img src='https://resources.allsetlearning.com/gramwiki/images/silk/link.png'></a></span>"); |
// modify settings cog location so it aligns with the right-floated header items | // modify settings cog location so it aligns with the right-floated header items | ||
$('#settings-button').css('margin', '-0.5em 0 0 0.5em'); | $('#settings-button').css('margin', '-0.5em 0 0 0.5em'); |
Revision as of 17:19, 10 October 2021
$(function() { /* START Change DisplayTitle */ var cefr = $('#info-cefr').text(); var hsk = $('#info-hsk').text(); var link = $('#info-link').text(); var headerText = $('.allset-page-heading h1').text(); var header = $('.allset-page-heading h1'); if(cefr !== "") { header.html(headerText + "<span id='header-levs' style='float:right'><span id='header-cefr'><a href='https://resources.allsetlearning.com/chinese/vocabulary/" + cefr + "'>" + cefr + "</a></span>/<span id='header-hsk'><a href='https://resources.allsetlearning.com/chinese/vocabulary/" + hsk + "'>" + hsk + "</a></span><a href='/chinese/vocabulary/" + link + "' title='" + link + "'><img src='https://resources.allsetlearning.com/gramwiki/images/silk/link.png'></a></span>"); // modify settings cog location so it aligns with the right-floated header items $('#settings-button').css('margin', '-0.5em 0 0 0.5em'); } /* END */ });