User:Jj137/archive.js

function archive { var f = document.editform, t = f.wpTextbox1; t.value = "" + '\n' + t.value; '\n' + '\n' + t.value; f.wpSummary.value = "Archived old comments on talk page."; }

function tabs { // Only add for pages with the right string somewhere in the title if (document.title.indexOf("Editing Talk:") != -1) {     mw.util.addPortletLink('p-cactions', 'javascript:archive', "archive"); } } $(tabs); //