Jump to content

MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 5: Line 5:
document.getElementById('switch-input').addEventListener('click', toggleView);  
document.getElementById('switch-input').addEventListener('click', toggleView);  


var toggleStatus = 'no';
var toggleStatus = 'yes';


function toggleView() {
function toggleView() {
   if (toggleStatus == 'no') {
   if (toggleStatus == 'no') { //shows Unicode graphics
     document.getElementById('slider').classList.add("slider-alt");
     document.getElementById('slider').classList.add("slider-alt");
     document.getElementById('rend-literal-included').style.display = "block";
     document.getElementById('rend-literal-included').style.display = "block";
     document.getElementById('rend-bitmap-only').style.display = "none";
     document.getElementById('rend-bitmap-only').style.display = "none";
     toggleStatus = 'yes';
     toggleStatus = 'yes';
   } else {
   } else { //hides Unicode graphics
     document.getElementById('slider').classList.remove("slider-alt");
     document.getElementById('slider').classList.remove("slider-alt");
     document.getElementById('rend-literal-included').style.display = "none";
     document.getElementById('rend-literal-included').style.display = "none";