User:Liliana-60/monobook.js

//versuchsweiser Fix für das Rahmenproblem auf Diskussionsseiten //von de:Benutzer:Wiegels/test.js

function firstNotEmptyNode(node) { while (node && node.nodeName=='#text' && node.nodeValue.match(/^\s*$/)) { var nextNode = node.nextSibling; node.parentNode.removeChild(node); node = nextNode; } return node; } addOnloadHook( function {    if (wgNamespaceNumber%2==1) {      var contentNode = document.getElementById('content');      var mode = false;      var count = 0;      while (true) {        var nodeName = (mode ? 'DD' : 'DL');       var nodes = contentNode.getElementsByTagName(nodeName);        if (!mode)          if (nodes.length==count)            break;          else            count = nodes.length;        for (var number = nodes.length-1; number>=0; number--) {          var node = nodes[number];          var nextNode = firstNotEmptyNode(node.nextSibling);          if (nextNode && nextNode.nodeName==nodeName) {            var firstNode = firstNotEmptyNode(nextNode.firstChild);            if (firstNode && (nextNode.nodeName=='DD' && firstNotEmptyNode(nextNode.firstChild).nodeName=='DL' ||             firstNode.nodeName=='DD' && firstNotEmptyNode(firstNode.firstChild).nodeName=='DL')) {              while (firstNode) {                node.appendChild(nextNode.removeChild(firstNode));                firstNode = firstNotEmptyNode(nextNode.firstChild);                }              node.parentNode.removeChild(nextNode);              }            }          }        mode = !mode;        }      }    }  );

//en:User:Tra/sidebartranslate.js function languagereplace { if (document.getElementById('p-lang')) { var LangNodes=document.getElementById('p-lang').getElementsByTagName('ul')[0].getElementsByTagName('li'); for( var x = 0; x < LangNodes.length; x++ ) { LangNodes[x].getElementsByTagName('a')[0].innerHTML = localtoEnglish(LangNodes[x].getElementsByTagName('a')[0].innerHTML); } } } $ (languagereplace) function localtoEnglish(localname) { switch (localname) {

case 'Српски / Srpski': return 'Српски'; break; case 'Srpskohrvatski / Српскохрватски': return 'Српскохрватски'; break; case 'O\'zbek': return 'Ўзбек'; break; case 'Tatarça/Татарча': return 'Татарча'; break; case 'Azərbaycan': return 'Азәрбајҹан'; break; case 'ئۇيغۇرچە / Uyghurche‎': return 'Уйғурчә'; break; case 'Türkmençe': return 'Түркмен'; break; case 'Qırımtatarca': return 'Къырымтатарджа'; break; case 'Тоҷикӣ/tojikī': return 'Тоҷикӣ'; break; case 'Qaraqalpaqsha': return 'Қарақалпақша'; break; default: return localname; } }

mw.loader.load("http://en.wiktionary.org/w/index.php?title=User:Conrad.Irwin/edittools.js&action=raw&ctype=text/javascript");