Honey Web

about all things sweet and web-ish

Posts Tagged ‘xulrunner

Bookmarklets! Userstyles! Userscripts(sort of)!

leave a comment »

As you can infer from the title, I’m quite excited about my latest progress.

Firstly, Browse can now save bookmarklets. When you trigger the palette (right click) on a bookmarklet, the ‘Download link’ option in the palette is replaced with a ‘Save bookmarklet’ option. A new toolbar appears where all the bookmarklets are lined up as buttons. They work rather well and are saved through to SSBs.

Secondly, userstyles now work. There’s a new button in the edit toolbar (I’m open to suggestions about the UI) that opens a small window with a gtksourceview inside. You can write (or copy/paste) CSS in there and click ‘Save’. TheĀ CSS is immediately applied to the page and is saved in a file in the activity preferences.

Thirdly, userscripts almost work. The UI and store are not quite ready, but the main part is that I’ve figured out how to very nicely do javascript injection. Like userstyles, I can make userscripts to be immediately executed, but it’ll be slightly harder.

There’s another small feature I’ve added. When you create an SSB, the activity preferences of Browse (without caches and cookies) are saved in the SSB bundle. When first run, they are copied over to that specific SSB’s activity data.

Here are some screenshots:

You can get this commit and try it out.

Written by Lucian

July 6, 2009 at 12:28 am