MediaWiki:Skin/dateSpecific/CAPSLOCK.js

function genCapsTable(arr) {   var out = {}; for(var i=0; i<arr.length; i++) {       out[arr[i][0]] = arr[i][1]; out[arr[i][1]] = arr[i][0]; }   return out; } function stringCaps (string, table) { var out = ""; for(var i=0; i<string.length; i++) {       var char = string[i]; if (char != char.toLowerCase) out += char.toLowerCase; else if (char != char.toUpperCase) out += char.toUpperCase; else if (table[char] != null) out += table[char]; else out += char; }   return out; } var capsTable = genCapsTable(["^°","1!","2\"","3§","4$","5%","6&","7/","8(","9)","0=","ß?","´`",",;",".:","-_","#'","+*"]); /* das da unten müsste man dann als onloadHook ausführen … */ addOnloadHook( function { if (window.NO_CAPS_ON_CAPSLOCKDAY)    return; jQuery("div,span,a,b,i,s,li,p,h1,h2,h3,h4,h5,small,big,td,th,dd")  .contents  .filter(function {    return this.nodeType == 3; // IE-FIX: use the number 3 instead of Node.TEXT_NODE  })  .each( function (x,y) {    if(y != null) y.textContent = stringCaps(y.textContent, capsTable);  }); });