Fixing web applications with Greasemonkey
In Greasemonkey FUD, I highlighted the importance of Greasemonkey as a tool for fixing interface problems in “enterprise” web applications. DJ Adams has done exactly that for OSS Notes, part of the SAP service portal. His user script ditches the frames in the interface, makes the page title more useful and adds hyperlinks to other note references on the page—significantly improving the user experience in less than 40 lines of code. The improvements are clearly explained in the accompanying screencast.
Spotted via Jeremy on the Greasemonkey mailing list.
- top.document.location = document.location: This will break the back button and is bad practice. location.replace() is better suited. In fact, he should probably just set the top frame height to 0 and change top.document.title. That will save from jumping pages at all.
- No anonymous function wrapper. With variable names like "node", "s", and "newNode", you are almost sure to run into problems. Even if you don't, it is bad practice.
Other than that, cool stuff.David Schontzler - 24th May 2005 02:32 - #
Simon Willison - 24th May 2005 03:18 - #
Thanks for the comments and pointers. I'm a Javascript newbie and am willing to learn. In checking this difference (location= vs location.replace()) I can't seem to see any difference in the Back button, i.e. the Back button is not broken when I use top.document.location = document.location.
What am I missing?
Cheers!dj
DJ Adams - 24th May 2005 08:11 - #
Sencer - 24th May 2005 08:17 - #
Hey Sencer, there's a mailing list for that sort of thing. :)
My FF used a bunch of memory yesterday, but I didn't think anything of it because I was doing several pretty abusive things with it.
Jeremy Dunck - 24th May 2005 16:02 - #
Stephen Clay - 6th June 2005 03:02 - #
biil gates - 10th July 2005 04:24 - #