SEE IMPORTANT UPDATE below narrative.
For those of you with Mac OSX Tiger or Leopard (and beyond), I've created an Applescript program that takes a Basic HTML Gmail page shown in Firefox, Safari or Google Chrome, and creates a couple of Desktop files from that page, the 2nd of which has all the checkboxes "checked". For example, if you are viewing your Trash folder in Basic HTML Gmail, you can run this program to create exactly that same page with all the checkboxes "checked". That file then replaces your currently displayed Trash page, and it will turn into the same page, but with all checkboxes "checked". The temporary Desktop files are erased. You can then do whatever you like with the page, such as uncheck a few entries, and then for all the rest of them, "Delete Forever" or "Move to Inbox".
Why did I write this program? Well simply because I got tied of having to mouse over each checkbox, and click the mouse button to "check" it. This program does "Select All" for you, which is something that is missing in the current Basic HTML Gmail. I've suggested to Google a way they could do it by adding "Select All" to the "More Actions..." menu, and when you select that option and click "Go", they would read the page and append "checked" to the end of each "checkbox" line. They would then return that page to you as a response. This is what they do for other changes that require modifications, such as adding or removing labels, or "Delete" of checked items.
Meanwhile, for those familiar with Applescript, just download the attached script, double-click it to launch the "Script Editor", and "Compile" it. Then under the File menu, choose "Save As..." and then on that page choose File Format of "application", chose Options of "Run Only", and choose where you want the program saved. Click the "Save" button to complete the process. Then, Quit the Script Editor. I placed mine in my Applications folder, and then dragged it to my Dock.
You might want to copy the program (SelectAll) to your Dock. To use it, in your browser, view the Basic HTML Gmail page you wish to transform. Launch SelectAll, either by clicking it on the Dock, or double-clicking it from Applications. You are told to click on the original browser page because SelectAll has taken control, but you need to be back on the browser page within 5 seconds. Two files will be created on your Desktop: mail.page and mail.checked.htm, where the last one is the transformation of the first. The 2nd file, which is the checked version, replaces your broswer page, and voila, it transforms to the "Select All" version of your original page. Then wait for the "file://..." URL to be replaced by the original URL value.
There are some browser Preferences you should set to use this program. Launch your browser and click on its name to see its menu. Choose "Preferences", and within that, choose the "General" tab. On that page, you may have to uncheck the ability to "Show the Downloads window..." because that can interfere with the timing, although the program waits some time for the file to be created. Also, and MOST IMPORTANT, you must choose "Save files to Desktop" (or Downloads) without asking. Finally, the download Format must be "Web Page, HTML only". The Applescript program can't control these things, and it relies upon them.
----------------------------------------
If you are using Maverics, Yosemite, El Capitan (or beyond), you may need to use Automator to compile your Applescript code, and make some Security changes. Please visit my "Assistive Devices" page for more details.
IMPORTANT Update: I've rewritten the Applescript, and I've created an Intel-based version called "SelectAll", which now handles Firefox, TenFourFox, Safari and Google Chrome. The code checks for all four, and requires a couple of "fix..." files in /User/Shared for Safari and Google Chrome, but NOT for Firefox or TenFourFox. Everything is packaged in another download called "SelectAll.dmg". Download that, double-click it and then drag the left-side items to the corresponding right-side. Safari needs all three items, but Firefox or TenFourFox only needs the SelectAll application. The corresponding Applescript is also available for download, just in case the SelectAll application doesn't work on your Intel-based Mac OS X (10.4 and above). To learn how SelectAll.dmg was constructed, visit my FancyDMG.