User talk:Nx/Scripts/Autoarchive.js

Is this usable, or just under construction? 14:57, 12 March 2009 (EDT)
 * I fixed a few critical bugs after adding the description, so it's usable now, but there are a few caveats:
 * It identifies sections solely by number, so if someone changes the page while you're viewing it, and you click the archive link for the second section, it will archive the second section on the changed page, which might not be what you wanted to do.
 * I don't know how to fix this, since you can put all kinds of stuff into section headers, like links, images, extlinks etc., and the generated html is different every time.
 * The mw editing code is not yet robust enough, mw can deny your edit if you lose session info or if there's a lot of lag . The script will simply silently fail
 * After clicking an archive button, you can click another one, or click the same one again. In that case behavior is undefined (that's specificationese for don't do it). It should be simple to fix, I just didn't have time.
 * Done.
 * You can only archive one section, then the page will reload. This isn't ideal when you want to archive a lot of sections, because that's sections*2 edits. I'll improve that in a new version of the script
 * There's no progress report, except the archive button disappearing and the reload when it's done. It's best not to do anything while it's working. If it's taking a lot of time, just close the tab, then check your contribs and undo any damage.
 * There also might be hidden bugs with strange wikicode etc, although it does detect commented out and nowikied sections.
 * The script creates a new archive page if the previous one is larger than a specified size (rkive_maxsize). The default is 30000 bytes, to change it:  This has not been tested at all.
 * So, yes, it's usable, but always verify that it did what you wanted it to do. --  Nx / talk 15:18, 12 March 2009 (EDT)
 * Forgot this one: when you click the archive button, there's no confirmation, so be careful, especially since it takes over the edit button's position. --  Nx / talk 15:20, 12 March 2009 (EDT)
 * I fixed another stupid bug, so now it's usable. --  Nx / talk 18:06, 12 March 2009 (EDT)


 * Isn't this far more trouble than it's worth? Archiving isn't something that needs to be done at the drop of a dime, nor does it need to be done en masse across many pages at a time.  Nor is it particularly tedious.  Ergo, there is no need to speed up the process.  And given all the bugs, it would just be more effective to do it by hand anyways.   18:29, 12 March 2009 (EDT)

Fixing
This could be useable if the archive and edit buttons were swapped. Can this be done? 16:56, 17 April 2009 (EDT)
 * IIRC no, otherwise I would've done it. --  Nx / talk 17:06, 17 April 2009 (EDT)
 * Nope, I can't get it to display before edit. It's right-floated, and having two things right floated at the same position causes all kinds of weirdness. --  Nx / talk 17:24, 17 April 2009 (EDT)