Script Summary: Adds a default title for safari.com/print page's title is blank. This is necessary if you wish to save into some other format like PDF.
Safari is a site for reading books by many technical publishers. I use the Oreilly
version at http://safari.oreilly.com/. If you signed up with another service you
will need to modify this script to match your domain instead. Or if someone sends
me a list of the domains I will add them to this script.
This script takes the text from the first heading on the page (an h3 element with
an ID="-100000") and sets it to be the title of the page. This is useful for things
like saving a page or two off to another format. I typical view Safari on my pepper
pad (http://www.pepper.com/). Well it is 800x600 display and the newer version is
something like 800x480 display. So I use this extension to view JUST the html without
all of the buttons and bars and so forth. But I cannot tell what page is what normally,
since they have no titles. Now I can see the titles. This works well with my userstyle
over at http://userstyles.org/style/show/757 .
Also I KNOW it is annoying, but I had to put an alert. Currently without the alert the
the page. So the page load takes a while. Thus, by the time it finally generates the
head portion of the html, the greasemonkey script has finished and wont change the title.
Also if I try to access the dom after document.title= line, the script does not work.
Ive tried all sorts of things, looping, delaying, longer setTimeouts ...but to no avail.
If I ever figure it out I will update the script. If anyone has any suggestions, I will