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

Quick history browsing in Safari 4 beta Web Browsers
I just accidentally discovered how to rapidly access the new 'Cover Flow' view mode for browsing history in Safari 4 beta.

I have my windows set to open with the 'Top Sites' view. From here, hitting Tab will take the input from the URL entry box to the Google Search box. If you hit Tab again (i.e. twice in succession in a new window), the whole window will be replaced with the Cover Flow view of your browsing history.

[robg adds: The reason this trick works is that the Top Sites page contains a search box at the lower right for history; it's two Tab presses away from the URL entry bar. Note that this only works if you've got the "Full keyboard access" setting (on the Keyboard Shortcuts tab of the Keyboard & Mouse System Preferences panel) set to "Text boxes and lists only." If it's set to "All controls," the second Tab will move from the Google box to the URL bar. I also noticed that the history search box doesn't recognize Shift-Tab to move backwards out of it; you'll need to press Tab again to jump back to the URL entry bar.]
  Post a comment  •  Comments (11)  
  • Currently 1.14 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (7 votes cast)
 
[8,517 views] Email Article To a Friend View Printable Version
Cursor positioning in the Safari 4 Beta Google search box Web Browsers
In Safari 3, you could use the Up Arrow key to get to the front of the Google search field (while entering search terms) if you wanted to add quotation marks, or make other changes. With Safari 4 Beta's new Google Suggestions feature, this editing trick stopped working. However, you can use Command-Up Arrow instead, which will mimic the Safari 3 behavior.
  Post a comment  •  Comments (7)  
  • Currently 1.43 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (7 votes cast)
 
[6,383 views] Email Article To a Friend View Printable Version
Spotlight your way to the topsites page in Safari 4 Beta Web Browsers
As this site has pointed out, you can set your homepage to (or create a bookmark for) the new Top Sites page in Safari 4 Beta by using the URL topsites://. I wanted to be able to access the bookmark I made for this page from Spotlight. When I tried though, I got an error dialog saying that "There is no default application for URL topsites://."

RCDefaultApp, which I use, lets me change URL's default apps, but I can't add URL types. User shellac over at the Macintosh Achaia at arstechnica pointed me to More Internet, which allows one to add URL types (as well as change their handling apps). So I added topsites:// as a URL type, and specified that it open in Safari 4 Beta.

This works like a charm. Now when I Spotlight my Top Sites bookmark (or click on a topsites:// link), it opens the Top Sites page in Safari 4 Beta.
  Post a comment  •  Comments (1)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)
 
[6,581 views] Email Article To a Friend View Printable Version
Enhance experience on twitter.com with CSS3 animations Web Browsers
How do you enjoy tweeting on Mac OS X? Do you feel better when actually using an iPhone Twitter client such as the iPhone's Tweetie and others? In my expeirence, most Mac OS X clients don't provide the rich set of information available from twitter.com. So I wrote an experimental bit of code that works on twitter.com.

pbtweet is small javascriptlet (bookmarklet) that relies on GreaseKit and shows conversation chains and images sent from twitpic.com and brightkite.com as cool icon badges on twitter.com. All animation effects and interactive motions are based on WebKit's early implementation of CSS3 transitions. Thus, pbtweet works only Safari, and I recommend Safari 4. Here are some of pbtweet's features:
  • Shows conversation chain balloons based on in_reply_to_status_id
  • Removes redundant tweets
  • Picture posts to twitPic.com and brightkite.com are placed on twitter.com as picture badges
  • Inserts a [more] page when you scroll down to page bottom
  • In the dev version only, new tweets are automatically updated at the top of timeline
Go to this URL, and drag the pbtweet bookmarklet onto your bookmark bar. (If you're using Safari 4, I recommend using the dev version). Then click the bookmarklet while viewing twitter.com.

[robg adds: The submitter's native language isn't English, so I've edited the submission quite a bit; I apologize if I got anything wrong while editing. From reading the linked page, I think you'll also need to install GreaseKit, as well as a user.js file (on the linked page) for use with GreaseKit. In case it's not obvious, I haven't tested this one.]
  Post a comment  •  Comments (2)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)
 
[6,435 views] Email Article To a Friend View Printable Version
Fix locked Safari 4 Beta / SafariStand windows Web Browsers
Very often I deal with Safari 4 Beta's windows crashing. Usually it is caused by typing outside a text box, after recently using one. When the problem occurs, the window locks up, and appears to select all of the content (a-la Command-A), and it's sometimes accompanied by a CPU spike as well. This is very irritating indeed. (Note that I have SafariStand installed, which might be the source of the problem, but I'm not sure.)

Solution: Control-click on Safari 4 Beta's Dock icon, and select New Window from the contextual menu. A new window should open, and all of the actions you took (post-freeze) will execute rapidly in this window. You may then close that window and return to the original, which will be working again.

Once frozen, I do not think Command-N will work, so you really have to use the Dock. Also, once one tab has frozen, clicking into any other currently-open tab will cause it to freeze as well. It would be nice to have a script for this, but despite it being very simple, I am far too lazy to write one.
  Post a comment  •  Comments (7)  
  • Currently 1.14 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (7 votes cast)
 
[10,193 views] Email Article To a Friend View Printable Version
Change Safari's search box to search Google UK Web Browsers
Here's how to set Google UK as the search engine in Safari. You can use the following technique to change it to any location you prefer -- for example, France (.fr) -- but you must add (or remove) other characters to the string to keep it the same length. Please note you should not remove any of the URL, and you should also not remove or add %@ characters, as they are used as variables.

Here's what to do:
  1. Control-click on Safari in the Finder and select Show Package Contents from the pop-up menu.
  2. Navigate into the Contents » MacOS folder, and make a copy of the Safari file you find there. This is your backup in case anything goes wrong.
  3. Open the Safari file in MacOS with TextEdit. It will mainly look like a bunch of gibberish.
  4. Press Command-F to bring up the Find dialog, and then find this string: http://%@.google.com/%@?q=%@&ie=UTF-8&oe=UTF-8.
  5. Change that string to http://%@.google.co.uk/%@?q=%@&=UTF-8&oe=UTF-8. Note there are two changes here: .com to .co.uk (which adds two characters) and ie=UTF to =UTF (which removes two characters). The new string must be exactly the same length as the old or Safari will not work!
  6. Save your changes, close the file in TextEdit, and launch Safari.
I take no responsibility if you break anything, so make sure you back up the Safari file first!

[robg adds: Occasional hints editor Kirk McElhearn did some testing with the International System Preferences panel for me on this one -- Safari will use the local version of Google that matches the settings in the Language/Format tabs, as long as you also delete your Google cookies when making the changes. So this hint would mainly be useful to those who wish to have one location set via the International panel, but want to use a different local version of Google.

Please note that we covered something very similar nearly six years ago; this version is just focused on changing Google's default country, as opposed to changing the search engine entirely.

Update: More than likely, this hint will cause Safari's code signature to fail, resulting in Safari no longer being able to access the Keychain -- see this hint for more details on this problem (in 10.5 only).]
  Post a comment  •  Comments (13)  
  • Currently 2.84 / 5
  You rated: 3 / 5 (19 votes cast)
 
[67,151 views] Email Article To a Friend View Printable Version
Set Safari 4 Beta's Top Sites page as home page Web Browsers
If you'd like Safari 4 Beta's Top Sites screen to be your default home page, here's all you need to do. Open Safari 4's Preferences, and choose the General tab. In the Home Page box, enter topsites:, then close Preferences.

Your home page is now set as the Top Sites screen -- click the Home button in Safari 4's tool bar, and your current page will be replaced with the Top Sites screen.
  Post a comment  •  Comments (15)  
  • Currently 2.64 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (11 votes cast)
 
[40,785 views] Email Article To a Friend View Printable Version
Make Safari 4's active tab more visible Web Browsers
One of the issues people are having with tabs on top in Safari 4 is that it's hard to distinguish which tab is currently frontmost. I found this an issue even with the previous location of the tab bar in Safari 3. The problem, for me at least, is that the Unified interface theme doesn't provide sufficient distinction between the tab which is frontmost and those which are in the background. I don't have this problem with the interface in other areas, like the Finder, and I suspect it's because windows don't get grouped as closely as tabs do.

My solution is simple and only takes me a few minutes:
  1. Quit Safari then navigate to it in the Finder.
  2. Control-click on Safari and select Show Package Contents from the pop-up menu. Navigate into Contents » Resources.
  3. Make a copy of the following four files somewhere outside of the Safari package to serve as a backup: AW_ActiveTabCenterFill.png, AW_ActiveTabLeftCap.png, AW_ActiveTabLeftCapFirstTab.png, AW_ActiveTabRightCap.png.
  4. Open the original files (within the Safari package) in your image editor of choice.
  5. I added a two-pixel wide red border to each image as indicated here:
    • AW_ActiveTabCenterFill.png: Add a border only at the top.
    • AW_ActiveTabLeftCap.png: Add a border on the left side of the image. (I didn't add the border to the curved portion at the bottom left.)
    • AW_ActiveTabLeftCapFirstTab.png: Add a border only to the left side of the image.
    • AW_ActiveTabRightCap.png: Add a border only to the right side of the image. (I didn't add the border to the curved portion at the bottom right.)
    I used a red color because I find it's easy to locate when I look at the tab bar, but it's not visually distracting the rest of the time. Others may, of course, prefer a different color.
For users of Safari prior to version 4, the same effect can be achieved by modifying these files in a similar way, though I find a one-pixel wide border is sufficient: TabBevel_Caps.tif (left, right and bottom edges) and TabBevel_Middle.tif (bottom edge only).

[robg adds: I tried this, and it worked very nicely, though I had to use PNG-24 to insure a transparent background. As an experiment, I took the editing even further, and replaced the entire gray gradient with something more colorful:
With a colored tab, I find the top tab bar location doesn't bother me nearly as much as it did when all the tabs were a near-uniform shade of gray. Because these files are under Apple's copyright, we cannot distribute modified versions, but only instructions on which files to modify.]
  Post a comment  •  Comments (36)  
  • Currently 1.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)
 
[20,994 views] Email Article To a Friend View Printable Version
Create clickable PDFs in Safari and OmniWeb Web Browsers
Many PDF readers will make obvious links (such as www.macosxhints.com and someone@example.org) clickable. But for non-trivial links (like Mac OS X Hints), the PDF reader needs additional information to know what to refer to. Since Leopard, apparently, many Apple programs support creating clickable PDFs simply by using the PDF button in the Print dialog. So this is nothing new, but many people do not seem to be aware of this, so this might be worth a hint of its own.

Many non-Apple programs still depend on other methods. For example: this earlier hint explained that OpenOffice.org does not create clickable PDFs unless one explicitely uses the built-in Export to PDF function. Using the latter, one can click the table of contents to jump to some specific page, or click links to open a browser for an external web site.

As for web browsers, both Apple's Safari and the non-Apple OmniWeb (a free download since February 25th), create such clickable PDFs. Bottom line: simply choose File » Print, click the PDF button, and then select Save as PDF to create a PDF with clickable links. Or, if you don't want clickable links, then create the PDF using, for example, Firefox.

And web developers, please create nice CSS media="print" stylesheets!
  Post a comment  •  Comments (1)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)
 
[7,471 views] Email Article To a Friend View Printable Version
Tweet active Safari tab from command line Web Browsers
I wrote a small Ruby script which allows me to post my currently-active Safari tab on Twitter, including the possibility of adding hashtags. Here's the code, though you you'll find any updates to the script over here, and a bit more detail can be found in this blog post.
#!/usr/bin/ruby -W0
 
=begin
Quick and dirty way to tweet the currently active
Safari tab (title + shortened URL). Hashtags get
passed in as parameters (the hash sign gets added
by the script, so don't do it yourself)
 
Adapt to your needs!
=end
 
# I don't believe in requiring rubygems itself
#require 'rubygems'
require 'highline'
require 'rbosa'
require 'ShortURL'
gem('twitter4r', '0.3.0')
require 'time'
require 'twitter'
 
# OSA stuff to get to the active Safari tab
OSA.utf8_strings = true
tab = OSA.app('Safari').windows.first.current_tab
 
tweet = "#{tab.name} - #{ShortURL.shorten(tab.url)} "
ARGV.each { |tag| tweet << "##{tag} " }
 
unless tweet.length < 140
  puts "Tweet too long :-("
  exit 1
end
 
# I didn't feel like having my pw in the file
# therefore using highline to ask for it
hl = HighLine.new
twitter_user = 'your_twitter_username'
twitter_pass = hl.ask('Enter password: ') { |q| q.echo = "*" }
 
# post tweet
client = Twitter::Client.new(:login => twitter_user, :password => twitter_pass)
Twitter::Status.create(:text => tweet, :client => client)
This script uses the RubyOSA bridge for AppleScript support from within Ruby, as well as quite a few other gems (why reinvent the wheel?).

[robg adds: If (like me) you're not a Ruby user, it will take a bit of effort to get this script to work. First, save the above as a text file somewhere on your path and make it executable (chmod a+x tweetsafari.rb). In order to get it working on my machine, I had to uncomment the require 'rubygems' line, and edit the twitter_user = 'your_twitter_username'. I also had to install some of the listed gems from the script. You can do this with the sudo gem install gem_name command. On my machine, I had to install rubyosa, shorturl, and twitter4r in order to get the script to work. Once I had all those bits, though, it worked as described, and tweeted a shortened URL version of my active Safari tab.]
  Post a comment  •  Comments (1)  
  • Currently 1.14 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (7 votes cast)
 
[7,198 views] Email Article To a Friend View Printable Version