Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A collection of bookmarklets to control Safari windows Web Browsers
I've seen other hints regarding Bookmarklets in Safari, and I figured I'd share a few that I've created to resize/reposition the browser window. Note: All "Clickable" Bookmarklet examples in this hint can be dragged directly into your Safari "Bookmarks Bar" to save them. Also, if you decide to manually enter them, all bookmarklets should be entered as ONE line. First, I created this "generic" bookmarklet:
javascript:function rsz(s,i,w,h,m){if(i.screenX<0||i.outerWidth>
that has three user-modifiable parameters:

WIDTH: window width in pixels
HEIGHT: window height in pixels
H_ALIGN: align to one side of the screen (1 = left align, 2 = right align)

Just copy the Bookmarklet text above and change those three parameters to what you want. Special javascript values can be used as well, such as screen.availWidth for the full width of the screen and screen.availHeight for the full height of the screen.
read more (222 words)   Post a comment  •  Comments (18)  
  • Currently 2.80 / 5
  You rated: 2 / 5 (5 votes cast)
[31,301 views]  View Printable Version
Paste clipboard contents to secure Safari pages Web Browsers
Some web pages, such as login pages, do not permit one to paste a password into the password field. While Safari offers AutoFill, I still occasionally find myself looking up a password in Web Confidential, which allows one to copy a password. I wrote the following script to 'type' the clipboard contents into the active text field in Safari's frontmost window.

The script uses GUI scripting to do it's thing. GUI scripting is available by default in Panther. Jaguar users can use the script if they have installed the beta version of System Events (download). I haven't done extensive testing (the script relies on common sense) but it appears to overcome this issue satisfactorily.
  set clip to the clipboard
  tell application "Safari" to activate
  tell application "System Events" to keystroke clip
  set the clipboard to ""
  on error e
  display dialog e buttons {"OK"} default button 1 with icon 0
end try
I'm sure that the script can be improved, and easily changed to work with other browsers, but it can serve as a starting point.
  Post a comment  •  Comments (2)  
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
[18,749 views]  View Printable Version
Export Omniweb Bookmarks to XBEL Web Browsers
For accessing my Omniweb Bookmarks while on the road, I have a little web application running which makes use of the ever more popular XBEL format. So here's my little Perl script to convert Omniweb's Bookmarks into XBEL format. In addition, it offers to compile a description from the pages' contents (time intensive). Hope it is as useful to someone as it is to me. Use at your own risk as usual.

[robg adds: I have not tested this one, and please note that some of the script is in German, though that won't have any impact on its ability to write your bookmarks out in XBEL format.]
  Post a comment  •  Comments (0)  
  • Currently 2.50 / 5
  You rated: 3 / 5 (4 votes cast)
[2,295 views]  View Printable Version
Corrupt Keychain entries can cause Safari crashes Web Browsers
My Safari 1.1.1 kept crashing when I wanted to access any secure website via the https protocol. Other user accounts on the same computer didn't experience that problem. After some digging, I discovered that if I removed my keychain file from ~/Library/Keychains, the problem disappeared -- meaning that the problem was in the keychain file. Eventually, by trial and error, I found the entry that caused Safari to crash, removed it, and all was back to normal again.

Caused me quite a headache to solve this so I thought submitting this to the other readers might save someone similar aggravations.
  Post a comment  •  Comments (2)  
  • Currently 2.75 / 5
  You rated: 2 / 5 (4 votes cast)
[12,983 views]  View Printable Version
Hard disk naming can cause Safari page load issues Web Browsers
I was having trouble with Safari not loading my pages. When I first ran the browser it would load about five pages normally, then it kept saying "Contacting" (i.e. any site) and never loaded a thing. So I opened the Console app and found these message:

2004-01-15 17:42:28.961 Safari[542] Conversion to encoding 30 
 failed for string "(?  ?) iBook:private..."
So I figured the odd characters or the spaces in the name of my hard drive were causing some kind of conflict. When I changed it to a simple "iBook," it fixed the issue for me.

Hope this helps someone; if you keep having trouble, I would suggest taking a look at your Console.
  Post a comment  •  Comments (10)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
[6,292 views]  View Printable Version
10.3: Use IPv6 by default in Safari Web Browsers

I have been frustrated by Safari using IPv4 by default for websites that have both IPv4 and IPv6 address (most other browsers and IPv6 enabled applications will attempt to use IPv6 before IPv4 if you and the remote server have v6 addresses). Then I noticed that Safari was attempting to connect to servers with an IPv6 address first when accessing secure sites using https: (SSL).

So I turned on the Safari Debug menu. If you go to Debug -> Supported Protocols and turn off http: (Simple Loader), then http: behaves the same way as https: using the CFNetwork loader (correctly).

Sadly this option is not preserved between launches of Safari, and I cannot see a way of setting it in the preferences .plist. Perhaps it can be scripted ?

  Post a comment  •  Comments (15)  
  • Currently 2.25 / 5
  You rated: 1 / 5 (8 votes cast)
[38,486 views]  View Printable Version
Use Delete to move back a page in Safari Web Browsers
I tend to google a lot and click through a lot of links in one window. If the URL window is active and you hit the delete button, it will bring you back to the last link, this is sort of a last link snapback. I was used to hitting the back button with the mouse, but now i can just Delete away. Please note that Command-[ does this, too, but this is yet another way to move around Safari quickly.

[robg adds: I thought this had been documented here before, but I can only find a passing mention of it in the comments. The shortcut is documented in Safari, but only if you've enabled the debug menu; you can then see it (and others) on the Keyboard and Mouse Shortcuts page ... or just click this link to view the page (assuming you have Safari installed in the default location).]
  Post a comment  •  Comments (15)  
  • Currently 3.00 / 5
  You rated: 3 / 5 (5 votes cast)
[8,495 views]  View Printable Version
Extend Safari timeout beyond 60 seconds Web Browsers
Tired of Safari timeout when you're waiting for a database query, a large upload, etc? SafariNoTimeout 1.0 (Released: 4/16/2003) is a hack that changes the Safari 60 second connection timeout limit to be 10 minutes instead; for Mac OS X 10.2 or newer.
  Post a comment  •  Comments (6)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
[11,174 views]  View Printable Version
Check fonts if Safari won't load any pages Web Browsers
Okay, this happened to a friend and I. Safari just suddenly stopped working for us. It acted like it was loading the page, but it never actually displayed anything. It would just hang there and do nothing. Another hint that you might be having this problem is when you load up your Console (in Applications, Utilities), you get error messages like:

2003-12-28 02:35:42.830 Safari[365] *** -[NSCFString characterAtIndex:]:
  Range or index out of bounds
2003-12-28 02:35:43.766 Safari[365] ***NSTimer discarding exception
  'NSRangeException' (reason
  '*** -[NSCFString characterAtIndex:]: Range or index out of bounds')
  that raised during firing of timer with target 192c670 and selector
This seems to happen after installing Windows True Type fonts on your Mac. I'm not exactly sure what about the fonts caused Safari to explode, but I seem to have found a way to fix it.

Basically, you just go into your Safari preferences and change the font, and then you can change it back after you can see that Safari will load pages again. It appears that the default font that seems to cause trouble is Times. You might be using something else, but it's a worth a shot to try this anyway. If it won't let you change the font in Safari (it wouldn't let me do this), you can go into Font Book under Applications and temporarily disable the font. Then open up Safari and it should be using a different font (Helvetica for me). Then it started loading pages again for me.

Of course, if you liked Times better, you can then go back, reenable Times, and set it back again. I did this just fine, and am currently using Safari with the Times font again. Everything I wrote here worked fine for me, but I have yet to see if it'll work for my friend.

[robg adds: This seems like an issue related to one particular font; I have several Windows TrueType fonts on my machine, and Safari is working just fine ... but it does point to the subtle nature of font problems -- it's odd to connect a page not loading with a font issue; you'd think the page would just load with a default font instead.]
  Post a comment  •  Comments (16)  
  • Currently 3.20 / 5
  You rated: 3 / 5 (5 votes cast)
[25,833 views]  View Printable Version
Change the next/previous tab shortcuts in Safari and Camino Web Browsers
Are you tired of having to press Command-Shift-arrow in Safari, and Command-Shift-[ in Camino to change tabs? The solution's actually pretty obvious, and this bugged me enough to fix it. I prefer using Command-arrow to switch tabs, and all you have to do to fix it is edit the MainMenu.nib file.

Note: you must have the developer tools installed to do this

Control-click on /Applications/Safari and choose Show Package Contents. Go to Contents -> Resources and open up MainMenu.nib. Click the Window submenu, and then double-click on the shortcut key command-shift-arrow. After you double click on it, you can rebind it to whatever you like by just typing your shortcut keys.

This can be done similarly in Camino by going to /Applications -> -> Contents -> Resources -> English.lproj/ and opening MainMenu.nib.
  Post a comment  •  Comments (9)  
  • Currently 2.71 / 5
  You rated: 5 / 5 (7 votes cast)
[43,238 views]  View Printable Version