User:HenHei~enwiki/monobook.js

//- //Links entfernen function removeLinks { var content = document.getElementById("content"); var links = content.getElementsByTagName("a"); while(links.length != 0){ for(var i = 0; i < links.length; i++){ var cur = links.item(i); var parent = cur.parentNode; var childs = cur.childNodes; var newNode = document.createElement("span"); for(var j=0; j < childs.length; j++){ newNode.appendChild(childs[j].cloneNode(true), cur); }      parent.replaceChild(newNode, cur); }    links = content.getElementsByTagName("a") } } function createTabSearchable{ var tabs = document.getElementById("p-cactions"); var li = document.createElement("li"); var link = document.createElement("a"); var oc = document.createAttribute("href"); oc.nodeValue = "javascript:removeLinks"; link.setAttributeNode(oc); link.appendChild(document.createTextNode("Delink")); li.appendChild(link); tabs.getElementsByTagName("ul")[0].appendChild(li); } if(location.search.indexOf("searchable=true")!=-1){ addOnloadHook(removeLinks); } else{ addOnloadHook(createTabSearchable); }