GreaseMonkey - My LJ Style

Apr 10, 2005 17:18

For those who use Firefox and has the GreaseMonkey extension installed, I wrote this for YOU:

My LJ StyleThis will add "?style=mine" to the URL of everybody's livejournals and communities. Plus, it will add it to all LJ links in the page, too ( Read more... )

Leave a comment

timwi April 12 2005, 13:05:43 UTC

// @include http://www.livejournal.com/users/*
// @include http://www.livejournal.com/~*
// @include http://www.livejournal.com/community/*
// @exclude http://*.livejournal.com/*.bml*This seems to be missing an @include http://*.livejournal.com/* before the @exclude.

Also - not knowing GreaseMonkey - when is this script executed? It would seem that it's executed when a page finishes loading, which would cause the "unwanted" layout to appear first and then a reload taking place. Is that right?

Reply

happysteve April 12 2005, 14:13:04 UTC
I did try the "@include http://*.livejournal.com/*" at first, but it was causing some pages to break, which is why I now specify these @include statements... just to be on the safe side. You can always add it yourself under Tools->Manage User Scripts->My LJ Style

GreaseMonkey is supposed to execute after the DOM is fully loaded, but before the page finishes loading. In the script I set the new location right off the bat, but yeah I see the "unwanted" page first load as well. (I've manually added the ?style=mine to all my LJ bookmarks now.)

If anybody knows a way of immediately changing the location BEFORE even starting to load the page, I'll gladly credit you in the script. Thanks.

Reply

camomiletea April 12 2005, 17:41:22 UTC
Okay, never mind my comment above. I'll just add

http://*.livejournal.com/
http://*.livejournal.com/friends*

Reply

timwi April 12 2005, 23:58:10 UTC
Why only Recent Entries and Friends?

Reply

camomiletea April 13 2005, 00:08:25 UTC
Because I don't feel like adding a bunch of years, since you can post with almost any year, and because I forgot about other views at first...

I added http://*.livejournal.com/*.html* -- which is an entry. I don't think .html is used anywhere else on LJ, so that shouldn't break any pages. I suppose I could add http://*.livejournal.com/calendar/*

Reply

timwi April 12 2005, 23:59:52 UTC
I was only asking out of curiosity; I don't actually have a use for your script because I have already solved this with Proxomitron (shortly after style=mine was made). :-)

Reply


Leave a comment

Up