afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
[personal profile] afuna
Google recently published an API for Greasemonkey scripts. I haven't had a chance to test it yet, or to even look closely, but if it's possible to use it to easily access and edit content in a message, that would be perfect.

(And even if it isn't, just the concept excites pleases me very much.)

Update:
Yes, it is possible, because I've just managed to add in a userpic input field for LJ comment notifications. It took me longer to figure out how to get the script to load in Greasemonkey, than it took to figure out the logic to add in the input textbox. I should have scrolled down -- there's a sample script on the API page which explains that you have to add an onload event listener.

Still not done, as I'm too lazy to do the three items on the todo list for the script:

// TODO: make it a dropdown (Can use this and then store it, I suppose)
// TODO: check that it *is* a comment notification ;-0
// need to add something for when a message is expanded, if it's possible via the API

But I now have a fair grasp of the way around the API. Want to play with it so badly, but I need to sleep because I promised myself I would get that student's license by tomorrow.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org