Check/toggle ‘em all
Recently I decided to clean up all the spam from an abandoned phpBB forum of mine, there was a lot to delete. In the phpBB version that I use there is no option to "check all" topics you want to moderate. So I came up with a little bookmarklet to do this for me. Here it is, only improved to work within frames and toggle (check if not checked, uncheck otherwise) all checkboxes in sight. Tested in FF and IE6/7.
To install, add this to your bookmarks/favourites:
The reading friendly code:
javascript:(function(){ function checkFrames(w) { try { var inputs = w.document.getElementsByTagName('input'); for (var i = 0; i < inputs.length; i++) { if (inputs[i].type && inputs[i].type == 'checkbox'){ inputs[i].checked = !inputs[i].checked; } } } catch (e){} if(w.frames && w.frames.length>0){ for(var i = 0; i < w.frames.length;i++){ var fr = w.frames[i]; checkFrames(fr); } } } checkFrames(window); })()

August 1st, 2007 at 10:40 am
Why don’t you provide a sort of test page?
August 1st, 2007 at 11:27 am
yes, good idea. I’ll add a few check boxes in this post.
August 9th, 2007 at 1:35 pm
Thanks for this! Big help.
October 22nd, 2007 at 8:21 pm
Thanks!
March 1st, 2008 at 10:49 pm
Wow!… I needed this last night! It works! Kinda spooky!