User:JuhkoDev/summary.js

addOnloadHook(summary);

function summary { if((wgAction=="edit")||(wgAction=="submit")) { var downsums=document.getElementById('editpage-copywarn'); switch(wgNamespaceNumber) { case 0: setAutoSummary("fix"); document.getElementById("contentSub").innerHTML += "Summaries: " + "fix" + "rv" + "wikitys" + "stub</li>" + "<li style='display:inline; padding-right:1em;'><a href='javascript:sum_mt;'>mt</a></li>" + "<li style='display:inline; padding-right:1.5em;'><a href='javascript:sum_hups;'>hups</a></li>" + "<li style='display:inline; padding-right:1.5em;'><a href='javascript:sum_typo;'>typo</a></li>" + "<li style='display:inline; padding-right:1.5em;'><a href='javascript:sum_refq;'>ref?</a></li>" + "<li style='display:inline; padding-right:1em;'><a href='javascript:sum_rpois;'>Removing junk</a></li>" + "<li style='display:inline; padding-right:1.5em;'><a href='javascript:sum_db;'>Junk</a></li>" + "<li style='display:inline; padding-right:1em;'><a href='javascript:sum_l;'>Category</a></li>" + "<li style='display:inline; padding-right:1em;'><a href='javascript:sum_lis;'>Adding some information</a></li>" + "<li style='display:inline; padding-right:1em;'><a href='javascript:sum_tark;'>Focusing</a></li>" + "</ul> "; var downremake = " " + document.getElementById("contentSub").innerHTML + " "; downsums.innerHTML = downremake; break; case 1: case 5: case 7: case 9: case 11: case 13: case 15: document.getElementById("contentSub").innerHTML += "Summaries: <ul style='list-style-type:none; display:inline; padding:0;'>" + "<li style='display:inline; padding-right:1em;'><a href='javascript:sum_answer;'>Answer</a></li>" + "<li style='display:inline; padding-right:1.5em;'><a href='javascript:sum_tark;'>Focusing</a></li>" + "<li style='display:inline; padding-right:1.5em;'><a href='javascript:sum_question;'>Question</a></li>" + "<li style='display:inline; padding-right:1.5em;'><a href='javascript:sum_hups;'>oops</a></li>" + "</ul> "; var downremake = " " + document.getElementById("contentSub").innerHTML + " "; downsums.innerHTML = downremake; break; case 2: case 4: case 6: case 8: case 10: case 14: setAutoSummary("fix"); document.getElementById("contentSub").innerHTML += "Summaries: <ul style='list-style-type:none; display:inline; padding:0;'>" + "<li style='display:inline; padding-right:1em;'><a href='javascript:sum_fix;'>fix</a></li>" + "<li style='display:inline; padding-right:1em;'><a href='javascript:sum_kh;'>kh</a></li>" + "<li style='display:inline; padding-right:1em;'><a href='javascript:sum_rv;'>rv</a></li>" + "<li style='display:inline; padding-right:1.5em;'><a href='javascript:sum_tark;'>Focusing</a></li>" + "<li style='display:inline; padding-right:1.5em;'><a href='javascript:sum_hups;'>hups</a></li>" + "</ul> "; var downremake = " " + document.getElementById("contentSub").innerHTML + " "; downsums.innerHTML = downremake; break; case 3: document.getElementById("contentSub").innerHTML += "Summaries: <ul style='list-style-type:none; display:inline; padding:0;'>" + "<li style='display:inline; padding-right:1.5em;'><a href='javascript:sum_answer;'>Answer</a></li>" + "<li style='display:inline; padding-right:1.5em;'><a href='javascript:sum_notab;'>Notability</a></li>" + "<li style='display:inline; padding-right:1.5em;'><a href='javascript:sum_huom;'>Note</a></li>" + "<li style='display:inline; padding-right:1.5em;'><a href='javascript:sum_tark;'>Focusing</a></li>" + "<li style='display:inline; padding-right:1.5em;'><a href='javascript:sum_question;'>Question</a></li>" + "<li style='display:inline; padding-right:1.5em;'><a href='javascript:sum_hups;'>oops</a></li>" + "</ul> "; var downremake = " " + document.getElementById("contentSub").innerHTML + " "; downsums.innerHTML = downremake; break; } } } function sum_hok { document.getElementById("wpSummary").value="Hauki on kala -artikkeli"; } function sum_notab { document.getElementById("wpSummary").value="Notability"; } function sum_db { document.getElementById("wpSummary").value="Sivun luoja ei saa poistaa roskamerkintää"; } function sum_answer { document.getElementById("wpSummary").value="Answer"; } function sum_huom { document.getElementById("wpSummary").value="Note"; } function sum_tark { document.getElementById("wpSummary").value="Focusing"; } function sum_lis { document.getElementById("wpSummary").value="Add"; } function sum_question { document.getElementById("wpSummary").value="Question"; } function sum_fix { document.getElementById("wpSummary").value="fix"; } function sum_fix2 { document.getElementById("wpSummary").value="b, w, t, l"; } function sum_fix3 { document.getElementById("wpSummary").value="b, w, mt, l"; } function sum_fix4 { document.getElementById("wpSummary").value="b, w, t"; } function sum_fix5 { document.getElementById("wpSummary").value="b, w, mt"; } function sum_fix6 { document.getElementById("wpSummary").value="fix, b"; } function sum_fix7 { document.getElementById("wpSummary").value="fix, t, l"; } function sum_kh { document.getElementById("wpSummary").value="kh"; } function sum_rv { document.getElementById("wpSummary").value="rv"; } function sum_w { document.getElementById("wpSummary").value="w"; } function sum_typo { document.getElementById("wpSummary").value="typo"; } function sum_refq { document.getElementById("wpSummary").value="Reference?"; } function sum_rpois { document.getElementById("wpSummary").value="Removing junk"; } function sum_t { document.getElementById("wpSummary").value="Stub"; } function sum_mt { document.getElementById("wpSummary").value="Minitynkä"; } function sum_l { document.getElementById("wpSummary").value="l"; } function sum_nohok { document.getElementById("wpSummary").value="Ei enää HOK"; } function sum_bgin { document.getElementById("wpSummary").value="Määritelmää parannettu"; } function sum_hups { document.getElementById("wpSummary").value="oops"; } function sum_db { document.getElementById("wpSummary").value="Marked as junk"; } function setAutoSummary(txt) { if((getValue("undo")=="") && (!(wgArticleId==0)) && (wgAction=="edit")) { sumfield = document.getElementById("wpSummary"); sumfield.value = txt; sumfield.setAttribute("onClick","emptySum;") } } function emptySum { sumfield = document.getElementById("wpSummary"); sumfield.value = ""; sumfield.setAttribute("onClick","") }