Jump to content

User:Jj137/archive.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Jj137 (talk | contribs) at 22:46, 25 January 2008 (moved User:Jj137/archiving.js to User:Jj137/archive.js). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
function archive()
{
  var f = document.editform, t = f.wpTextbox1;
  t.value = "{{User:MiszaBot/config" + '\n' + "|maxarchivesize = 100K" + '\n' + "|counter = 1" + '\n' + "|algo = old(28d)" + '\n' + "|archive = Talk:Jj137/Archive %(counter)d" + '\n' + "}}" + '\n' + "{{archive box|auto=yes" + "}}" + '\n' + t.value;
 '\n' + '\n' + t.value;
  if (t.value.length > 0)
    t.value += '\n';
  t.value += "== Archiving ==" + '\n' + '\n' + "I set up archiving on this talk page due to some very outdated comments. ~~" + "~~";
  f.wpSummary.value = "Adding [[WP:ARCHIVE|archiving]] to talk page.";
}

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