User:Tejgad/monobook.js

function iwk_principal { var r_1 = new RegExp("iwk"); var r_2 = new RegExp("&iwk=(.*)&iwk=(.*)$"); var url=document.location;

if(r_1.test(url)) { var contenu = document.editform.wpTextbox1.value; motif=r_2.exec(url); var nom = decodeURIComponent(motif[2]); contenu += "\n"+motif[1]+":"+decodeURIComponent(nom)+"";

summary = new Array ; summary.push ("+ interwiki "+motif[1]); document.editform.wpSummary.value = summary.join; document.editform.wpTextbox1.value = contenu; } }

addOnloadHook(iwk_principal);