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

Import Sogudi's Safari shortcuts to Firefox Web Browsers
If you are a Safari user and use Sogudi, you'll know how easy it is to use its shortcuts. When I moved to Linux, I needed a way to import my shortcuts to Mozilla Firefox, which has the same feature (known as Quick Searches). So, I wrote sogudi2qs.py, a Python script that exports all shortcuts into a file that can then be imported into Firefox's bookmarks.

To use it, download the script [view source], then type this in Terminal:
$ cd /path/to/download/location
$ unzip sogudi2qs.py_.zip
$ python sogudi2qs.py >quicksearches.html
That will create a file named quicksearches.html in the current directory. Then just import that file into Firefox's Bookmarks, and you've transferred all your Sogudi shortcuts.

[robg adds: There's a Sogudi Beta available for 10.5 users; I haven't tested it, however.]
  Post a comment  •  Comments (1)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[6,272 views]  View Printable Version
Force 'new window' links to open in new tabs in Safari Web Browsers
After browsing for a few hours in Safari, it's possible to end up with a dozen windows or so because of links that open a new window (links with target="_blank"). I've always wished there was a way to have these links open in a new tab instead of a new window (sometimes referred to as single window mode).

In the latest Safari 3.1, Apple finally added a (hidden) preference to do just this! To enable single window mode, which forces all links that would normally open a new window appear in a new tab instead, we only need to enable the TargetedClicksCreateTabs preference using the following command (paste it into Terminal):
defaults write com.apple.Safari TargetedClicksCreateTabs -bool true
[robg adds: This worked for me, but note that it will create those new tabs in the foreground, not the background. Command-clicking the link, however, will open the page in a new tab in the background (this has always been true, as I recall). The preference setting is mostly useful for sites you haven't visited before -- with it set, you'll not have window proliferation if you just click instead of command-clicking. To undo the setting, you can just delete the preference: defaults delete com.apple.Safari TargetedClicksCreateTabs. Make sure Safari's not running before you use either command.]
  Post a comment  •  Comments (29)  
  • Currently 2.86 / 5
  You rated: 4 / 5 (14 votes cast)
 
[91,173 views]  View Printable Version
10.5: Automatically Quick Look certain downloaded files Web Browsers
I have wanted to Quick Look files directly from the browser for a while (especially .doc and .ppt files). A switch to Firefox recently exacerbated this problem, as there is no PDF plug-in. So I wrote a simple script that monitors the Downloads directory and opens any new files with qlmanage, and thought others might find it useful. Copy and paste the code below into a file (say ql_downloaded.sh) and make it executable (chmod a+x ql_downloaded.sh). Launch the script in a separate Terminal window, then start browsing. This bit -- if [[ $i == *.(pdf|ppt|xls|doc) ]]; then -- restricts which files are Quick Looked. In Firefox, the handling option for these types of files should be set to Save to Disk. The above code should work with most any browser; it works most of the time for me, but there are still some random issues once in a while (probably due to the temporary ".part" files created during downloads). Hope you find this useful!

[robg adds: This worked for me in testing with Firefox and Safari.]
  Post a comment  •  Comments (6)  
  • Currently 1.44 / 5
  You rated: 2 / 5 (9 votes cast)
 
[19,914 views]  View Printable Version
Create new tabs via double-click in Safari 3.1 Web Browsers
As of Safari 3.1, double-clicking on a free area in the tab bar opens a new tab. I've wanted this feature since it was introduced in Firefox, and now my favorite browser has it, too.
  Post a comment  •  Comments (5)  
  • Currently 1.17 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)
 
[9,077 views]  View Printable Version
View higher quality videos on YouTube Web Browsers
Many people are using a trick to view any YouTube video in high-quality -- simply append &fmt=18 to the end of the URL. This is a job for AppleScript! Here are two simple versions; the first, for for OmniWeb:
tell application "OmniWeb"
  set current_url to the address of active tab of browser 1
  set current_url to current_url & "&fmt=18"
  set the address of active tab of browser 1 to current_url
end tell
...and the second, for Safari:
tell application "Safari"
  set current_url to the URL of current tab of window 1
  set current_url to current_url & "&fmt=18"
  set URL of current tab of window 1 to current_url
end tell
These can be placed in ~/Library » Scripts » Applications » AppName for easy access via the Script menu.

[robg adds: Queue user fds suggests that a JavaScript bookmarklet may work better, and it will work in any browser. Create a new bookmark for any site (or a blank bookmark), then change its URL to this: javascript:window.location+="&fmt=18";. Choose that bookmark while viewing a YouTube video, and you should get the high quality version.]
  Post a comment  •  Comments (11)  
  • Currently 2.67 / 5
  You rated: 2 / 5 (9 votes cast)
 
[27,425 views]  View Printable Version
Save Flash video files from local cache Web Browsers
The Flash plug-in stores its temporary files in /private » var » tmp » folders.501 » TemporaryItems, in files named FlashTmp0, FlashTmp1, and so on.

So if you want to do a quick save without looking at Safari's Activity window, press Command-Shift-G in the Finder (or use the Go » Go to Folder menu item), enter /tmp, and dive down the specified folder hierarchy. You can then move the FlashTmp0 file to the Desktop, add the .flv extension, and watch it with VideoLanClient, MPlayer OSX, or QuickTime with the Perian.component installed. I tested this with Safari and Firefox 3 beta.
  Post a comment  •  Comments (15)  
  • Currently 2.47 / 5
  You rated: 5 / 5 (17 votes cast)
 
[154,228 views]  View Printable Version
Fix an issue with the Firefox download folder location Web Browsers
If you migrate from a previous machine to a new machine using Apple's Migration Assistant, and in the process you create a new user -- this can happen if you create your old user account on the new machine prior to migrating -- you may have issues with Firefox and the Downloads folder. Because of a shortcoming in the migration tool, the OS X Downloads folder for the new account will have the path for the old account, and Firefox will then be unable to save because it does not have the correct permissions. I encountered this issue with 10.5 Leopard (both machines), migrating from an old Mac mini to new Mac pro.

The solution is to open ~/Library » Preferences » com.apple.internetconfig.plist with the Property List Editor (Xcode required), navigate to the Download Folder item, and delete the value (not the key; just the value under it), then save the property list file.

The next time you save a downloaded file in Firefox, OS X will ask you where you want it. Answer the question, and the problem goes away permanently.

[robg adds: A commenter on the queue review site notes: "This is a bug with Firefox that I see with our users all the time. In prefs, the download folder looks like it's set correctly, but Firefox wants to download to some read-only folder on the hard drive (it's always arbitrary). We have had to delete ~/Library » Preferences » com.apple.internetconfig.plist -- but we ALSO have had to delete ~/Library » Preferences » com.apple.LaunchServices.plist to resolve it."]
  Post a comment  •  Comments (13)  
  • Currently 2.20 / 5
  You rated: 1 / 5 (10 votes cast)
 
[35,009 views]  View Printable Version
Use Safari 3 textareas to help with form printing Web Browsers
Safari 3 has resizable textareas -- multi-line text input boxes -- on its forms. This can be a big help when completing a form (for example, submitting a long hint!), but can also help with printing those forms.

By default, when Safari prints a form, it appears just as it does on screen. This means that any textareas that have more text than will fit in the visible space will show a vertical scrollbar and some of your content will be hidden -- not much help for record keeping. However, printing (including Save as PDF) honors resized textareas, so the trick is to make sure you have resized (using the handle at the bottom right corner) to show all your content before printing. You'll also get better looking output with no scrollbars!

I use this technique when submitting information to sites that don't offer a printable version after submission.
  Post a comment  •  Comments (0)  
  • Currently 1.75 / 5
  You rated: 1 / 5 (8 votes cast)
 
[5,665 views]  View Printable Version
Fully automated, one-step sending of a URL from Safari Web Browsers
I often send a link off to one single person, many times a day. You can use the Mail Link to this Page feature in Safari, but that still means you have to compose the email with the To address, and also tell the email to send. Since I do this several times a day, I decided to AppleScript it. Drop the following script into ~/Library » Scripts » Safari; name it what you like. If that folder structure is not already made, just make new folders with the correct names.

The script will get the current URL of the frontmost document in Safari. It will not copy it to the clipboard, leaving your clipboard in the same state. The script them brings Mail.app forward, addresses an email, sets a subject, some body copy, and drops the URL into the email. Finally, a signature is added to the message, and it is sent out. After that has happened, Mail.app is set to hidden, and Safari is brought back to the foreground where you last left it.

Here's the script:
-- Script made by Scott Haneda
-- http://osxhelp.com
-- 02/13/2008

-- Get the current URL
tell application "Safari"
  set thisPage to do JavaScript "document.URL" in document 1
end tell

-- Create a new email message in mail.app
tell application "Mail"
  activate
  set this_message to make new outgoing message at beginning of every outgoing message
  tell this_message
    make new to recipient at beginning of to recipients ¬
      with properties {address:"firend@example.com", «class rdsn»:"FirstName LastName"}
    set the subject to "The email subject"
    set the content to "Hey, I thought you would be interested in this link: 
" & thisPage & "

--
Signature Name"
  end tell
  send this_message -- Send the email message
end tell

-- Restore Safari to the foreground, hide mail.app
tell application "System Events" to set visible of first process whose name is "Mail" to false
tell application "Safari"
  activate
end tell
In /Applications » AppleScript is a program called AppleScript Utility. This will enable the script menu item in the Finder. Personally, I have attached this script to a keyboard command with Keyboard Maestro. You can also use FastScripts Lite, which is free.
    •  Comments (14)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[10,689 views]  View Printable Version
Save selected browser text via AppleScript Web Browsers
I occasionally find myself wanting to save some text from a browser window. Usually I want to know where the text came from as well, so just dragging out a text clipping to the desktop is not a good solution.

I wrote two AppleScripts (one for Safari and one for Firefox) to make saving a selected text, URL, and page title from browser windows easier. The scripts write the browser's selected text and other info to a text file that it creates on the user's desktop. (I don't like clutter on the desktop, so on my Mac, this file gets created in another folder. However, I wanted to provide example scripts that worked, so I chose the desktop).

Below is an example of the script's output with the date, the URL, the page title and some text from a selection:

Wednesday, February 6, 2008 8:40:11 PM
http://some-url.com
Photo of the Day
-------------------
A deep-blue sky sets off a mass of yellow wildflower blooms along ... [snip] ... magazine
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Further use of the script will append data to the same file, and keep the text neatly formatted and properly separated.
read more (324 words)     •  Comments (5)  
  • Currently 1.78 / 5
  You rated: 3 / 5 (9 votes cast)
 
[29,744 views]  View Printable Version