Fix Blogger Post Greasemonkey Script
Posted by ark, ,
Over in my baby blog I've been posting a lot of images and text. Using blogger's include image option is really annoying so what I do is just drag images from picasaweb over into the compose window in blogger, it works great. However I have to do some slight adjustments to make the images how I want them. I want them left aligned with text flowing around them. I also want the text with each image to stay with that image. This involves adding stuff to the style attribute for my img elements and also wrapping each img with a div tag. I could do all this with the style sheets on my page but I also have my blog posts mailed out to a notify list and if I do it with style sheets the emails will look like ass. Previously I was doing this by keeping the snippets of HTML I needed to add in a Google Notebook and just copying them over when I needed to, it worked kinda o.k.

So I wrote a greasemonkey script to give me a new button at the bottom of the posting page that will fix the style of the current post. It adds the styles and divs I want and can also do other stuff. At some point I'm going to make it replace teh with the and wont with won't.

I borrowed some code from userscripts which gave me a new button at the bottom and then wrote the rest myself. It's not pretty but it works.