It's got to be something like that, unfortunately I just don't know the exact syntax. I've got some other javascript bookmarklets in firefox, but looking now at their links, they are a mess of %-encoding, and I'm not sure if that's important or not (perhaps they got mangled through an old import)
FWIW, here's a bookmark to get rid of static bars (the kind of thing annoying websites have stuck at the top of the page and won't go away when you scroll):