Do you wish to have firefox auto-refresh a certain page/tab? Are you tired of having to focus the firefox window (means, leaving vim) just to switch tab, go back a couple of pages, open a new page, etc?
Fear no more.
Since I had prior knowledge of the WWW::Mechanize class, I went with WWW::Mechanize::Firefox and started hacking.
So far, I’ve created several functions:
- load new page $page
- refresh the current page
- back / forward
- get current URI
- save current page as HTML
- show basic information about the current page
- extract all links
- click (yep! :)
- load a local page / directory
- dump the current page as a png. This will dump what firefox have rendered - not only what you see. That means, you can make a full-sized PNG copy, no matter how big the page is. It also tries to be smart by naming the captured pictures after title-tag (escaped to some extent). This have been possible with webkit for ages and something I missed in Fx.
The ::Firefox subclass does not support all features of the main WWW::Mechanize module yet, and therefore I’m using both.
If you want to try it out, you’ll need the modules first:
When cpan is ready, just clone my repository:
And like always: feel free to fork and/or patch!