PAUSE UI Enhancement with Greasemonkey
Last week, Marcel Grünauer (hanekomu) tweeted about his PAUSE deletions possibly triggered by one of the recent discussions about the CPAN ecosystem (and mirroring deficiencies). PAUSE sends deleted files to the BackPAN which has everything released to CPAN. However, selecting the files to delete is not much fun since PAUSE UI is sadly not dynamic and if you have lots of distributions you'll have even more released files on PAUSE.
I have relatively small number of distributions, but after talking with hanekomu, I wondered whether it can be easy to inject some JavaScript to alter the behaviour or add some little functionality to the PAUSE UI. I've played with Greasemonkey and spent much time to finally discover I need addEventListener() to do the magic. The result is my tiny user script: http://bitbucket.org/burak/gm-pause/src/. You'll need Firefox + Greasemonkey plugin. Then either you can download the code and install it manually or just click here to install the latest version in the code repository. Next time you logon to PAUSE there will be three more buttons to click (they'll be displayed on every page, but will work only on the deletions section).
Disclaimer: the code is new and possibly has missing parts and/or bugs. Be sure to check the deletion list and undelete files from PAUSE if necessary. And you can also fork the project to improve it.
That's nice, it also works out of the box with Google Chrome which has Greasemonkey support built-in.
When I install it it says it needs access to "all data on all sites". I couldn't find out how to modify it to only request HTML munging permissions for
pause.perl.org
.Hmm... I haven't tried it with Chrome but Firefox did not give me such a warning. I use Firefox for development stuff and Opera for normal browsing :)
I think you can only limit the script to a specific part of the site but can not define something similar like Safe.pm/opcodes if I understood you correctly. However, GM user scripts run inside a sandbox separate from the code in the normal page.