User:Arbitrarily0/closeDRV.js

//See User:Lifebaka/closedrv.js function autodrv_result { var close = prompt("Result of debate?") var f = document.editform, t = f.wpTextbox1; t.value = t.value.split('====').join('[['); t.value = t.value.split('====').join(']]|2=' + close + '|undefined'); if (t.value.length > 0) t.value += '\n'; t.value += ""; f.wpSummary.value += "closing: " + close; } function autodrv_add_drv_tabs { // Only add for pages with the right string somewhere in the title if ((document.title.indexOf("Editing Wikipedia:Deletion review/Log/") != -1) && (document.title.indexOf("(section)") != -1)) {     mw.util.addPortletLink('p-cactions', 'javascript:autodrv_result', "close"); } } $(autodrv_add_drv_tabs);