Benutzer:Gronkh/monobook.jsAus OPwiki//if(wgAction == "view" && wgPageName !="Spezial:Letzte_Änderungen" && wgPageName != //"Benutzer:Gronkh/monobook.js" && wgNamespaceNumber != 3 && !document.hasFocus()) { //window.close(); //} /** Autofill und Autodelete
/*** Entfernt die "manga" angaben aus den Refvorlagen
function cleanRef(){ let tBox = document.getElementById("wpTextbox1");
tBox.value = tBox.value.replace(/\|[Mm]anga\|/g,"||");
tBox.value = tBox.value.replace(/ref\/S/g,"ref");
tBox.value = tBox.value.replace(/\n\|\s*?auftritt\s*=\s*\*\s*keine/,"");
tBox.value = tBox.value.replace(/\[\[Ruffy\]\]/g,"Ruffy");
//tBox.value = tBox.value.replace(/<\/ref>\./g,"</ref>");
//tBox.value = tBox.value.replace(/([^.]) ?<ref([\s\S]+?)<\/ref>\./g,"$1.<ref$2</ref>");
//tBox.value = tBox.value.replace(/\.\s*?\./g,".");
tBox.value = tBox.value.replace(/\|herkunft\s*?=\s*?
if(/\|datum\s*?=\s*?\d\./.test(tBox.value)){
tBox.value= tBox.value.replace(/\|datum\s*?=\s*/,"|datum=0")
}
if(/\|jap_datum\s*?=\s*?\d\./.test(tBox.value)){
tBox.value= tBox.value.replace(/\|jap_datum\s*?=\s*/,"|jap_datum=0")
}
// Crunchyroll // tBox.value= tBox.value.replace(/\{\{[Ee]pinfo/,"{{epinfo\n|streamdatum=16. Mai 2021") } function customBar(){ let x = document.getElementsByClassName("mw-editTools");
x[0].innerHTML = "";
let btn;
let t;
let att;
let labels = ["[[]]", "Ref/S","REF", "SpoilerS","SpoilerT"];
let schablonen = ["insertTags('','',);return false",
"insertTags('[1]','Kapitelnummer eintragen');return false",
"insertTags('[2]','Kapitelnummer eintragen');return false",
"insertTags('','Text eingeben');return false",
"insertTags('
','Text eingeben');return false" ]; for (let i = 0 ; i<labels.length;i++){
btn = document.createElement("A");
t = document.createTextNode(labels[i]);
btn.appendChild(t);
x[0].appendChild(btn);
att = document.createAttribute("onclick");
att.value = schablonen[i];
btn.setAttributeNode(att);
att = document.createAttribute("href");
att.value = '#';
btn.setAttributeNode(att);
}
let y = document.getElementsByClassName("pBody");
y[3].innerHTML = x[0].innerHTML; } document.querySelectorAll('img').forEach(img => { img.setAttribute('loading', 'lazy');
img.removeAttribute('srcset');
});
window.addEventListener('DOMContentLoaded', (event) => { document.querySelector("#affis").remove() document.querySelector("#toplists").remove() document.querySelector("#footer").remove() /*document.getElementById("content").innerHTML += ``*/if((wgAction === "submit" || wgAction === "edit")&& wgPageName !="Spezial:Letzte_Änderungen" && wgPageName != "Benutzer:Gronkh/monobook.js" && wgNamespaceNumber != 3){
//redi();
//customBar();
cleanRef();
//document.getElementById("wpSave").click();
} })
if(wgTitle.startsWith("Episode")){
let x = document.getElementById("wpTextbox1");
x.value = x.value.replace(/(.*?)<\/div>/,"$1").replace("
",""); //document.getElementById("wpSummary").value = "Test, Dinge automatisch und fast gleichzeitig entfernen zu lassen"
//document.getElementById("wpSave").click(); window.stop(); } })();*/ |
|

