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

Modify the look of the Safari 5 Reader function Web Browsers
Safari 5 introduces the Safari Reader feature, for selecting article bodies to make reading and printing easier. I started looking around for where this new Reader functionality lives to see if it was customizable and I found that it is.
read more (176 words)   Post a comment  •  Comments (14)  
  • Currently 3.43 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (14 votes cast)
 
[30,144 views] Email Article To a Friend View Printable Version
Re-enable the Refresh button in Safari 5 Web Browsers
Since the introduction of Safari 4, I've been missing the dedicated Refresh button in the Toolbar. While there is one available at the end of the location bar, it's much smaller than it used to be and is too close to other easier-to-hit targets.

Yesterday's release of Safari 5 brought a new Extensions feature and someone has already taken advantage of it to bring back the Refresh button.

To use it, you need to enable developer mode in Safari. Go to the Safari menu » Preferences » Advanced. Turn on 'Show Develop menu in menu bar.' Safari may need to be quit and relaunched at this stage.

From the new 'Develop' menu, select 'Enable Extensions.' Now go to here and download the Safari Reload Button extension. Double click it to install.

Right click on Safari's Toolbar (or go to the View menu) and choose 'Customize Toolbar.' Add the new Refresh button wherever you want to put it.

[crarko adds: I tested this, and it works as described. I didn't need to restart Safari. New Safari 5 extensions are being produced rapidly, and the general procedure for installing them is similar to this one. There is a 3rd-party catalog of extensions here, and Apple should eventually have a list up as well.]
  Post a comment  •  Comments (16)  
  • Currently 3.15 / 5
  You rated: 1 / 5 (13 votes cast)
 
[22,721 views] Email Article To a Friend View Printable Version
10.5: Use 1Password 2.x in Safari 5 for Leopard Web Browsers
Leopard only hintTo anybody that's running Safari 5 on Leopard or earlier and still wants to use 1Password 2.x, you should be aware that recently upgraded browsers are no longer being supported in version 2 of 1Password. For those of you who can't or won't update to Snow Leopard or 1Password 3 or both, here's how to enable 1Password 2.x support in Safari 5 (Thanks to Greg Kumparakat at CrunchGear for the original inspirational hint about using 1Password with Safari 4 beta).

How to enable 1Password 2.x in Safari 5 for Leopard:
  • Close Safari
  • Go to the /Applications/ folder
  • Right click on 1Password.app and select 'Show Package Contents'
  • Navigate to /Contents/Resources/
  • Double click on SupportedBrowsers.plist. If you have Apple's development tools installed, it'll open in the Plist editor. If not, it'll open in TextEdit.
  • If you're using the Plist editor, expand the 'Safari' drop-down (Just click the little arrow beside Safari).
  • Look for the MaxBundleVersion key Ė change it to 6534.0. Save the change.
  • Launch Safari 5.
The 1Password contextual menu will now be usable in Safari 5. You will need to add the 1Password button to your toolbar again using View > Customize Toolbar.

As always, it is a good idea to make a backup of SupportedBrowsers.plist before messing with it.

[crarko adds: I haven't tested this one. If you run Snow Leopard you should upgrade to 1Password 3.2.1, which works with Safari 5.]
  Post a comment  •  Comments (11)  
  • Currently 3.63 / 5
  You rated: 3 / 5 (16 votes cast)
 
[14,253 views] Email Article To a Friend View Printable Version
Block an annoying Javascript that affects Copy/Paste Web Browsers
Rob Griffiths points out this article: Tynt, the Copy/Paste Jerks by John Gruber, as a solution to an annoying web site 'feature.'

Here's a brief description:

'Over the last few months Iíve noticed an annoying trend on various web sites, generally major newspaper and magazine sites, but also certain weblogs. What happens is that when you select text from these web pages, the site uses JavaScript to report what youíve copied to an analytics server and append an attribution URL to the text.'

Please refer to the linked article for more background. The following is derived from that article.
read more (280 words)   Post a comment  •  Comments (22)  
  • Currently 2.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (16 votes cast)
 
[9,326 views] Email Article To a Friend View Printable Version
Selecting just the text if the entire text block is also a link Web Browsers
Sometimes but increasingly often, a text link isn't just one simple clickable word within a larger text passage but instead an entire block of text inside a table or frame. Although it is convenient that you can click just anywhere in a text area to open the associated link, it is very frustrating that selecting the text to copy it may be very difficult.

To be able to copy the text of a linked text, just hold the option key before dragging the mouse cursor. Clicking with the option key down will immediately download the link to your disk, but dragging will let you select the text of the link without actually opening that link.

I couldn't find any similar hints. This works with Firefox 3.5.5 and possibly other versions.

[crarko adds: I tested this, and it works as described. I used Firefox 3.6.3. It also seemed to work in Chrome (5.0.x) but not in Safari (4.0.5) for me.]
  Post a comment  •  Comments (17)  
  • Currently 2.56 / 5
  You rated: 2 / 5 (27 votes cast)
 
[6,564 views] Email Article To a Friend View Printable Version
10.6: Fix creation of widgets due to custom style sheets Web Browsers
Snow Leopard only hintIf you find you cannot create web clip widgets (File » Open in Dashboard) from Safari, try looking into Preferences » Advanced tab. If there is a custom style sheet under 'Style sheet' option, set it to None selected, create the web clip and it should work. Then it's OK to re-enable the custom style sheet.

I thought it might be worthwhile to summarize this possibility in a hint because I spent an hour wondering what was wrong with an almost-freshly-installed Snow Leopard on a Mac Book Pro -- all I could get was a white rectangle and a com.apple.widget.web-clip: illegal type passed to setPreferenceForKey: undefined error message in the Console.

While you'd definitely remember setting your own CSS, some third party plug-ins (notably, ad/scam blockers and content filters) may set a custom CSS for their own needs without your knowledge.

[crarko adds: I tried this with a custom style sheet I had and had no problem saving clippings to the Dashboard. There must be some specific setting in some style sheets which can cause the issue, but I don't know what that setting is. This may be specific to 10.6, so I've left it marked as the author submitted it -- but if you're having the same issue in 10.5, please let me know.]
  Post a comment  •  Comments (3)  
  • Currently 2.67 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (9 votes cast)
 
[4,575 views] Email Article To a Friend View Printable Version
Use a Chromium build with left-positioned tab close buttons Web Browsers
If you're really annoyed by Chromium's placement of the tab close widget on the right side of the tab (as opposed to the left, as in Safari), here's a workaround, gleaned from the linked discussion...

In that discussion, user thakis posted a number of alternative placement thoughts, along with a patch that puts both the close icon and fav icon to the left of the tab name. User drew.ramos then applied that patch to a couple of Chromium builds:
  • Build 43024, which looks like the current Chrome for Mac beta, omnibox-wise.
  • Build 46672, which is fairly close to the latest development build.
[crarko adds: As Chrome/Chromium progresses, these builds (obviously) will become less current. You could follow the linked conversation, though, to spot newer builds with the close tab button on the left of the tab.]
  Post a comment  •  Comments (4)  
  • Currently 2.81 / 5
  You rated: 1 / 5 (16 votes cast)
 
[6,408 views] Email Article To a Friend View Printable Version
Open external links in currently running browser Web Browsers
If you are using multiple browsers, and are annoyed by Safari (or your designated preferred browser) popping up while using a different browser, this hint can remove that annoyance.

I'm a web developer, and while my main browser is WebKit, I also have Opera, Chrome and Firefox installed. If I'm using Opera and click a link in Mail, that link will open in Safari. So I wind up with two running browsers, or having to copy the URL over to Firefox manually. Not cool.

I have figured out a way to make an AppleScript 'proxy' app that delegates URLs to the browser that is currently running, no matter which is set as the default. Paste the following code into AppleScript Editor:
on open location the_url
  tell application "System Events"
    set browser_apps to the name of every process whose visible is true
    if "Opera" is in browser_apps then
      tell application "Opera"
        open location the_url
        activate
      end tell
    else if "firefox-bin" is in browser_apps then
      tell application "Firefox"
        open location the_url
        activate
      end tell
    else if "Google Chrome" is in browser_apps then
      tell application "Google Chrome"
        open location the_url
        activate
      end tell
    else
      tell application "WebKit"
        open location the_url
        activate
      end tell
    end if
  end tell
end open location
Modify the above as needed to reflect your own suite of browsers, then save this script as an application bundle somewhere. Next, you need modify a bit of the application bundle you just created.
read more (169 words)   Post a comment  •  Comments (15)  
  • Currently 3.79 / 5
  You rated: 4 / 5 (24 votes cast)
 
[10,085 views] Email Article To a Friend View Printable Version
Arrange Safari and Opera windows via AppleScript Web Browsers
I wrote two AppleScripts that arrange windows in Safari and Opera. The scripts don't just tile horizontally or vertically, but order browser windows in the most optimal way. The scripts automatically detect the screen resolution, and the number of open browser windows; they can arrange up to 12 separate windows. The Opera script, due to an Opera bug (perhaps?) has to be run twice.

Here's the Safari AppleScript:
################# Arrange_logically_Safari_windows:

-- Script by Julian (looiopnr/zec0ect/ristQws/pasurimi) 22.04.10
-- Purpose: Arrange logically Safari windows
-- Will detect automatically the screen resolution and the number of open Safari windows
-- Will arrange up to 12 windows.


tell application "Safari"
  set open_windows to (every window where visible is true)
  set n to count of open_windows
  
  tell application "Finder"
    set scr_size to bounds of window of desktop
    set scr_width to item 3 of scr_size
    set scr_height to item 4 of scr_size
  end tell
  
  set Compensation_A to 11
  set Compensation_B to 14
  set Compensation_C to 7
  
  if n = 1 then
    tell application "Safari"
      activate
      tell window 1
        set bounds to {0, 0, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 2 then
    tell application "Safari"
      activate
      tell window 1
        set bounds to {0, 0, scr_width / 2, scr_height}
      end tell
      activate
      tell window 2
        set bounds to {scr_width / 2, 0, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 3 then
    tell application "Safari"
      activate
      tell window 1
        set bounds to {0, 0, scr_width / 2, scr_height}
      end tell
      activate
      tell window 2
        set bounds to {((scr_width / 4) * 2), 0, scr_width, (scr_height / 2) - Compensation_A}
      end tell
      activate
      tell window 3
        set bounds to {((scr_width / 4) * 2), (scr_height / 2) + Compensation_A, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 4 then
    tell application "Safari"
      activate
      tell window 1
        set bounds to {0, 0, ((scr_width / 4) * 2), (scr_height / 2) - Compensation_A}
      end tell
      activate
      tell window 2
        set bounds to {((scr_width / 4) * 2), 0, scr_width, (scr_height / 2) - Compensation_A}
      end tell
      activate
      tell window 3
        set bounds to {0, (scr_height / 2) + Compensation_A, ((scr_width / 4) * 2), scr_height}
      end tell
      activate
      tell window 4
        set bounds to {((scr_width / 4) * 2), (scr_height / 2) + Compensation_A, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 5 then
    tell application "Safari"
      activate
      tell window 1
        set bounds to {0, 0, ((scr_width / 4) * 2), (scr_height / 2) - Compensation_A}
      end tell
      activate
      tell window 2
        set bounds to {0, (scr_height / 2) + Compensation_A, ((scr_width / 4) * 2), scr_height}
      end tell
      activate
      tell window 3
        set bounds to {((scr_width / 4) * 2), 0, scr_width, (scr_height / 3) - Compensation_C}
      end tell
      activate
      tell window 4
        set bounds to {((scr_width / 4) * 2), (scr_height / 3) + Compensation_B, scr_width, ((scr_height / 3) * 2) + Compensation_C}
      end tell
      activate
      tell window 5
        set bounds to {((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_C, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 6 then
    tell application "Safari"
      activate
      tell window 1
        set bounds to {0, 0, ((scr_width / 4) * 2), (scr_height / 3) - Compensation_C}
      end tell
      activate
      tell window 3
        set bounds to {0, (scr_height / 3) + Compensation_B, ((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_C}
      end tell
      activate
      tell window 5
        set bounds to {0, ((scr_height / 3) * 2) + Compensation_C, ((scr_width / 4) * 2), scr_height}
      end tell
      activate
      tell window 2
        set bounds to {((scr_width / 4) * 2), 0, scr_width, (scr_height / 3) - Compensation_C}
      end tell
      activate
      tell window 4
        set bounds to {((scr_width / 4) * 2), (scr_height / 3) + Compensation_B, scr_width, ((scr_height / 3) * 2) + Compensation_C}
      end tell
      activate
      tell window 6
        set bounds to {((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_C, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 7 then
    tell application "Safari"
      activate
      activate
      tell window 1
        set bounds to {0, 0, (scr_width / 3), (scr_height / 2) - Compensation_A}
      end tell
      activate
      tell window 2
        set bounds to {(scr_width / 3), 0, ((scr_width / 3) * 2), (scr_height / 2) - Compensation_A}
      end tell
      activate
      tell window 3
        set bounds to {0, (scr_height / 2) + Compensation_A, (scr_width / 3), scr_height}
      end tell
      activate
      tell window 4
        set bounds to {(scr_width / 3), (scr_height / 2) + Compensation_A, ((scr_width / 3) * 2), scr_height}
      end tell
      activate
      tell window 5
        set bounds to {((scr_width / 3) * 2), 0, scr_width, (scr_height / 3) - Compensation_C}
      end tell
      activate
      tell window 6
        set bounds to {((scr_width / 3) * 2), (scr_height / 3) + Compensation_B, scr_width, ((scr_height / 3) * 2) + Compensation_C}
      end tell
      activate
      tell window 7
        set bounds to {((scr_width / 3) * 2), ((scr_height / 3) * 2) + Compensation_C, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 8 then
    tell application "Safari"
      activate
      activate
      tell window 1
        set bounds to {0, 0, (scr_width / 3), (scr_height / 2) - Compensation_A}
      end tell
      activate
      tell window 2
        set bounds to {0, (scr_height / 2) + Compensation_A, (scr_width / 3), scr_height}
      end tell
      activate
      tell window 3
        set bounds to {(scr_width / 3), 0, ((scr_width / 3) * 2), (scr_height / 3) - Compensation_C}
      end tell
      activate
      tell window 4
        set bounds to {(scr_width / 3), (scr_height / 3) + Compensation_B, ((scr_width / 3) * 2), ((scr_height / 3) * 2) + Compensation_C}
      end tell
      activate
      tell window 5
        set bounds to {(scr_width / 3), ((scr_height / 3) * 2) + Compensation_C, ((scr_width / 3) * 2), scr_height}
      end tell
      activate
      tell window 6
        set bounds to {((scr_width / 3) * 2), 0, scr_width, (scr_height / 3) - Compensation_C}
      end tell
      activate
      tell window 7
        set bounds to {((scr_width / 3) * 2), (scr_height / 3) + Compensation_B, scr_width, ((scr_height / 3) * 2) + Compensation_C}
      end tell
      activate
      tell window 8
        set bounds to {((scr_width / 3) * 2), ((scr_height / 3) * 2) + Compensation_C, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 9 then
    tell application "Safari"
      activate
      activate
      tell window 1
        set bounds to {0, 0, (scr_width / 3), (scr_height / 3) - Compensation_C}
      end tell
      activate
      tell window 2
        set bounds to {0, (scr_height / 3) + Compensation_B, (scr_width / 3), ((scr_height / 3) * 2) + Compensation_C}
      end tell
      activate
      tell window 3
        set bounds to {0, ((scr_height / 3) * 2) + Compensation_C, (scr_width / 3), scr_height}
      end tell
      activate
      tell window 4
        set bounds to {(scr_width / 3), 0, ((scr_width / 3) * 2), (scr_height / 3) - Compensation_C}
      end tell
      activate
      tell window 5
        set bounds to {(scr_width / 3), (scr_height / 3) + Compensation_B, ((scr_width / 3) * 2), ((scr_height / 3) * 2) + Compensation_C}
      end tell
      activate
      tell window 6
        set bounds to {(scr_width / 3), ((scr_height / 3) * 2) + Compensation_C, ((scr_width / 3) * 2), scr_height}
      end tell
      activate
      tell window 7
        set bounds to {((scr_width / 3) * 2), 0, scr_width, (scr_height / 3) - Compensation_C}
      end tell
      activate
      tell window 8
        set bounds to {((scr_width / 3) * 2), (scr_height / 3) + Compensation_B, scr_width, ((scr_height / 3) * 2) + Compensation_C}
      end tell
      activate
      tell window 9
        set bounds to {((scr_width / 3) * 2), ((scr_height / 3) * 2) + Compensation_C, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 10 then
    tell application "Safari"
      activate
      activate
      tell window 1
        set bounds to {0, 0, (scr_width / 4), (scr_height / 2) - Compensation_A}
      end tell
      activate
      tell window 2
        set bounds to {(scr_width / 4), 0, ((scr_width / 4) * 2), (scr_height / 2) - Compensation_A}
      end tell
      activate
      tell window 3
        set bounds to {0, (scr_height / 2) + Compensation_A, (scr_width / 4), scr_height}
      end tell
      activate
      tell window 4
        set bounds to {(scr_width / 4), (scr_height / 2) + Compensation_A, ((scr_width / 4) * 2), scr_height}
      end tell
      activate
      tell window 5
        set bounds to {((scr_width / 4) * 2), 0, ((scr_width / 4) * 3), (scr_height / 3) - Compensation_C}
      end tell
      activate
      tell window 6
        set bounds to {((scr_width / 4) * 2), (scr_height / 3) + Compensation_B, ((scr_width / 4) * 3), ((scr_height / 3) * 2) + Compensation_C}
      end tell
      activate
      tell window 7
        set bounds to {((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_C, ((scr_width / 4) * 3), scr_height}
      end tell
      activate
      tell window 8
        set bounds to {((scr_width / 4) * 3), 0, scr_width, (scr_height / 3) - Compensation_C}
      end tell
      activate
      tell window 9
        set bounds to {((scr_width / 4) * 3), (scr_height / 3) + Compensation_B, scr_width, ((scr_height / 3) * 2) + Compensation_C}
      end tell
      activate
      tell window 10
        set bounds to {((scr_width / 4) * 3), ((scr_height / 3) * 2) + Compensation_C, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 11 then
    tell application "Safari"
      activate
      activate
      tell window 1
        set bounds to {0, 0, ((scr_width / 4) * 2), (scr_height / 3) - Compensation_C}
      end tell
      activate
      tell window 2
        set bounds to {0, (scr_height / 3) + Compensation_B, (scr_width / 4), ((scr_height / 3) * 2) + Compensation_C}
      end tell
      activate
      tell window 3
        set bounds to {0, ((scr_height / 3) * 2) + Compensation_C, (scr_width / 4), scr_height}
      end tell
      activate
      tell window 4
        set bounds to {(scr_width / 4), (scr_height / 3) + Compensation_B, ((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_C}
      end tell
      activate
      tell window 5
        set bounds to {(scr_width / 4), ((scr_height / 3) * 2) + Compensation_C, ((scr_width / 4) * 2), scr_height}
      end tell
      activate
      tell window 6
        set bounds to {((scr_width / 4) * 2), 0, ((scr_width / 4) * 3), (scr_height / 3) - Compensation_C}
      end tell
      activate
      tell window 7
        set bounds to {((scr_width / 4) * 2), (scr_height / 3) + Compensation_B, ((scr_width / 4) * 3), ((scr_height / 3) * 2) + Compensation_C}
      end tell
      activate
      tell window 8
        set bounds to {((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_C, ((scr_width / 4) * 3), scr_height}
      end tell
      activate
      tell window 9
        set bounds to {((scr_width / 4) * 3), 0, scr_width, (scr_height / 3) - Compensation_C}
      end tell
      activate
      tell window 10
        set bounds to {((scr_width / 4) * 3), (scr_height / 3) + Compensation_B, scr_width, ((scr_height / 3) * 2) + Compensation_C}
      end tell
      activate
      tell window 11
        set bounds to {((scr_width / 4) * 3), ((scr_height / 3) * 2) + Compensation_C, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 12 then
    tell application "Safari"
      activate
      activate
      tell window 1
        set bounds to {0, 0, (scr_width / 4), (scr_height / 3) - Compensation_C}
      end tell
      activate
      tell window 2
        set bounds to {0, (scr_height / 3) + Compensation_B, (scr_width / 4), ((scr_height / 3) * 2) + Compensation_C}
      end tell
      activate
      tell window 3
        set bounds to {0, ((scr_height / 3) * 2) + Compensation_C, (scr_width / 4), scr_height}
      end tell
      activate
      tell window 4
        set bounds to {(scr_width / 4), 0, ((scr_width / 4) * 2), (scr_height / 3) - Compensation_C}
      end tell
      activate
      tell window 5
        set bounds to {(scr_width / 4), (scr_height / 3) + Compensation_B, ((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_C}
      end tell
      activate
      tell window 6
        set bounds to {(scr_width / 4), ((scr_height / 3) * 2) + Compensation_C, ((scr_width / 4) * 2), scr_height}
      end tell
      activate
      tell window 7
        set bounds to {((scr_width / 4) * 2), 0, ((scr_width / 4) * 3), (scr_height / 3) - Compensation_C}
      end tell
      activate
      tell window 8
        set bounds to {((scr_width / 4) * 2), (scr_height / 3) + Compensation_B, ((scr_width / 4) * 3), ((scr_height / 3) * 2) + Compensation_C}
      end tell
      activate
      tell window 9
        set bounds to {((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_C, ((scr_width / 4) * 3), scr_height}
      end tell
      activate
      tell window 10
        set bounds to {((scr_width / 4) * 3), 0, scr_width, (scr_height / 3) - Compensation_C}
      end tell
      activate
      tell window 11
        set bounds to {((scr_width / 4) * 3), (scr_height / 3) + Compensation_B, scr_width, ((scr_height / 3) * 2) + Compensation_C}
      end tell
      activate
      tell window 12
        set bounds to {((scr_width / 4) * 3), ((scr_height / 3) * 2) + Compensation_C, scr_width, scr_height}
      end tell
    end tell
  end if
  
end tell
And for Opera:
### Arrange_logically_Opera_windows:

-- Script by Julian (looiopnr/zec0ect/ristQws/pasurimi) 22.04.10
-- Purpose: Arrange logically Opera windows
-- Will detect automatically the screen resolution and the number of open Opera windows
-- Will arrange logically up to 12 windows.
-- Due to a Opera bug(?) you have to run it twice.

tell application "Opera"
  set open_windows to (every window)
  set n to count of open_windows
  
  tell application "Finder"
    set scr_size to bounds of window of desktop
    set scr_width to item 3 of scr_size
    set scr_height to item 4 of scr_size
  end tell
  
  set Compensation_A to 33
  set Compensation_B to 32
  set Compensation_C to 34
  set Compensation_D to 5
  set Compensation_E to 27
  
  if n = 1 then
    tell application "Opera"
      activate
      tell window 1
        set bounds to {0, 0, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 2 then
    tell application "Opera"
      activate
      tell window 1
        set bounds to {0, 0, scr_width / 2, scr_height}
      end tell
      activate
      tell window 2
        set bounds to {scr_width / 2, 0, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 3 then
    tell application "Opera"
      activate
      tell window 1
        set bounds to {0, 0, scr_width / 2, scr_height}
      end tell
      activate
      tell window 2
        set bounds to {((scr_width / 4) * 2), 0, scr_width, (scr_height / 2) - Compensation_A}
      end tell
      activate
      tell window 3
        set bounds to {((scr_width / 4) * 2), (scr_height / 2) + Compensation_A, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 4 then
    tell application "Opera"
      activate
      tell window 1
        set bounds to {0, 0, ((scr_width / 4) * 2), (scr_height / 2) - Compensation_A}
      end tell
      activate
      tell window 2
        set bounds to {((scr_width / 4) * 2), 0, scr_width, (scr_height / 2) - Compensation_A}
      end tell
      activate
      tell window 3
        set bounds to {0, (scr_height / 2) + Compensation_A, ((scr_width / 4) * 2), scr_height}
      end tell
      activate
      tell window 4
        set bounds to {((scr_width / 4) * 2), (scr_height / 2) + Compensation_A, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 5 then
    tell application "Opera"
      activate
      tell window 1
        set bounds to {0, 0, ((scr_width / 4) * 2), (scr_height / 2) - Compensation_A}
      end tell
      activate
      tell window 2
        set bounds to {0, (scr_height / 2) + Compensation_A, ((scr_width / 4) * 2), scr_height}
      end tell
      activate
      tell window 3
        set bounds to {((scr_width / 4) * 2), 0, scr_width, (scr_height / 3) - Compensation_B}
      end tell
      activate
      tell window 4
        set bounds to {((scr_width / 4) * 2), (scr_height / 3) + Compensation_C, scr_width, ((scr_height / 3) * 2) + Compensation_D}
      end tell
      activate
      tell window 5
        set bounds to {((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_E, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 6 then
    tell application "Opera"
      activate
      tell window 1
        set bounds to {0, 0, ((scr_width / 4) * 2), (scr_height / 3) - Compensation_B}
      end tell
      activate
      tell window 3
        set bounds to {0, (scr_height / 3) + Compensation_C, ((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_D}
      end tell
      activate
      tell window 5
        set bounds to {0, ((scr_height / 3) * 2) + Compensation_E, ((scr_width / 4) * 2), scr_height}
      end tell
      activate
      tell window 2
        set bounds to {((scr_width / 4) * 2), 0, scr_width, (scr_height / 3) - Compensation_B}
      end tell
      activate
      tell window 4
        set bounds to {((scr_width / 4) * 2), (scr_height / 3) + Compensation_C, scr_width, ((scr_height / 3) * 2) + Compensation_D}
      end tell
      activate
      tell window 6
        set bounds to {((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_E, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 7 then
    tell application "Opera"
      activate
      activate
      tell window 1
        set bounds to {0, 0, (scr_width / 3), (scr_height / 2) - Compensation_A}
      end tell
      activate
      tell window 2
        set bounds to {(scr_width / 3), 0, ((scr_width / 3) * 2), (scr_height / 2) - Compensation_A}
      end tell
      activate
      tell window 3
        set bounds to {0, (scr_height / 2) + Compensation_A, (scr_width / 3), scr_height}
      end tell
      activate
      tell window 4
        set bounds to {(scr_width / 3), (scr_height / 2) + Compensation_A, ((scr_width / 3) * 2), scr_height}
      end tell
      activate
      tell window 5
        set bounds to {((scr_width / 3) * 2), 0, scr_width, (scr_height / 3) - Compensation_B}
      end tell
      activate
      tell window 6
        set bounds to {((scr_width / 3) * 2), (scr_height / 3) + Compensation_C, scr_width, ((scr_height / 3) * 2) + Compensation_D}
      end tell
      activate
      tell window 7
        set bounds to {((scr_width / 3) * 2), ((scr_height / 3) * 2) + Compensation_E, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 8 then
    tell application "Opera"
      activate
      activate
      tell window 1
        set bounds to {0, 0, (scr_width / 3), (scr_height / 2) - Compensation_A}
      end tell
      activate
      tell window 2
        set bounds to {0, (scr_height / 2) + Compensation_A, (scr_width / 3), scr_height}
      end tell
      activate
      tell window 3
        set bounds to {(scr_width / 3), 0, ((scr_width / 3) * 2), (scr_height / 3) - Compensation_B}
      end tell
      activate
      tell window 4
        set bounds to {(scr_width / 3), (scr_height / 3) + Compensation_C, ((scr_width / 3) * 2), ((scr_height / 3) * 2) + Compensation_D}
      end tell
      activate
      tell window 5
        set bounds to {(scr_width / 3), ((scr_height / 3) * 2) + Compensation_E, ((scr_width / 3) * 2), scr_height}
      end tell
      activate
      tell window 6
        set bounds to {((scr_width / 3) * 2), 0, scr_width, (scr_height / 3) - Compensation_B}
      end tell
      activate
      tell window 7
        set bounds to {((scr_width / 3) * 2), (scr_height / 3) + Compensation_C, scr_width, ((scr_height / 3) * 2) + Compensation_D}
      end tell
      activate
      tell window 8
        set bounds to {((scr_width / 3) * 2), ((scr_height / 3) * 2) + Compensation_E, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 9 then
    tell application "Opera"
      activate
      activate
      tell window 1
        set bounds to {0, 0, (scr_width / 3), (scr_height / 3) - Compensation_B}
      end tell
      activate
      tell window 2
        set bounds to {0, (scr_height / 3) + Compensation_C, (scr_width / 3), ((scr_height / 3) * 2) + Compensation_D}
      end tell
      activate
      tell window 3
        set bounds to {0, ((scr_height / 3) * 2) + Compensation_E, (scr_width / 3), scr_height}
      end tell
      activate
      tell window 4
        set bounds to {(scr_width / 3), 0, ((scr_width / 3) * 2), (scr_height / 3) - Compensation_B}
      end tell
      activate
      tell window 5
        set bounds to {(scr_width / 3), (scr_height / 3) + Compensation_C, ((scr_width / 3) * 2), ((scr_height / 3) * 2) + Compensation_D}
      end tell
      activate
      tell window 6
        set bounds to {(scr_width / 3), ((scr_height / 3) * 2) + Compensation_E, ((scr_width / 3) * 2), scr_height}
      end tell
      activate
      tell window 7
        set bounds to {((scr_width / 3) * 2), 0, scr_width, (scr_height / 3) - Compensation_B}
      end tell
      activate
      tell window 8
        set bounds to {((scr_width / 3) * 2), (scr_height / 3) + Compensation_C, scr_width, ((scr_height / 3) * 2) + Compensation_D}
      end tell
      activate
      tell window 9
        set bounds to {((scr_width / 3) * 2), ((scr_height / 3) * 2) + Compensation_E, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 10 then
    tell application "Opera"
      activate
      activate
      tell window 1
        set bounds to {0, 0, (scr_width / 4), (scr_height / 2) - Compensation_A}
      end tell
      activate
      tell window 2
        set bounds to {(scr_width / 4), 0, ((scr_width / 4) * 2), (scr_height / 2) - Compensation_A}
      end tell
      activate
      tell window 3
        set bounds to {0, (scr_height / 2) + Compensation_A, (scr_width / 4), scr_height}
      end tell
      activate
      tell window 4
        set bounds to {(scr_width / 4), (scr_height / 2) + Compensation_A, ((scr_width / 4) * 2), scr_height}
      end tell
      activate
      tell window 5
        set bounds to {((scr_width / 4) * 2), 0, ((scr_width / 4) * 3), (scr_height / 3) - Compensation_B}
      end tell
      activate
      tell window 6
        set bounds to {((scr_width / 4) * 2), (scr_height / 3) + Compensation_C, ((scr_width / 4) * 3), ((scr_height / 3) * 2) + Compensation_D}
      end tell
      activate
      tell window 7
        set bounds to {((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_E, ((scr_width / 4) * 3), scr_height}
      end tell
      activate
      tell window 8
        set bounds to {((scr_width / 4) * 3), 0, scr_width, (scr_height / 3) - Compensation_B}
      end tell
      activate
      tell window 9
        set bounds to {((scr_width / 4) * 3), (scr_height / 3) + Compensation_C, scr_width, ((scr_height / 3) * 2) + Compensation_D}
      end tell
      activate
      tell window 10
        set bounds to {((scr_width / 4) * 3), ((scr_height / 3) * 2) + Compensation_E, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 11 then
    tell application "Opera"
      activate
      activate
      tell window 1
        set bounds to {0, 0, ((scr_width / 4) * 2), (scr_height / 3) - Compensation_B}
      end tell
      activate
      tell window 2
        set bounds to {0, (scr_height / 3) + Compensation_C, (scr_width / 4), ((scr_height / 3) * 2) + Compensation_D}
      end tell
      activate
      tell window 3
        set bounds to {0, ((scr_height / 3) * 2) + Compensation_E, (scr_width / 4), scr_height}
      end tell
      activate
      tell window 4
        set bounds to {(scr_width / 4), (scr_height / 3) + Compensation_C, ((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_D}
      end tell
      activate
      tell window 5
        set bounds to {(scr_width / 4), ((scr_height / 3) * 2) + Compensation_C, ((scr_width / 4) * 2), scr_height + Compensation_D}
      end tell
      activate
      tell window 6
        set bounds to {((scr_width / 4) * 2), 0, ((scr_width / 4) * 3), (scr_height / 3) - Compensation_E}
      end tell
      activate
      tell window 7
        set bounds to {((scr_width / 4) * 2), (scr_height / 3) + Compensation_C, ((scr_width / 4) * 3), ((scr_height / 3) * 2) + Compensation_D}
      end tell
      activate
      tell window 8
        set bounds to {((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_E, ((scr_width / 4) * 3), scr_height}
      end tell
      activate
      tell window 9
        set bounds to {((scr_width / 4) * 3), 0, scr_width, (scr_height / 3) - Compensation_B}
      end tell
      activate
      tell window 10
        set bounds to {((scr_width / 4) * 3), (scr_height / 3) + Compensation_C, scr_width, ((scr_height / 3) * 2) + Compensation_D}
      end tell
      activate
      tell window 11
        set bounds to {((scr_width / 4) * 3), ((scr_height / 3) * 2) + Compensation_E, scr_width, scr_height}
      end tell
    end tell
  end if
  
  if n = 12 then
    tell application "Opera"
      activate
      activate
      tell window 1
        set bounds to {0, 0, (scr_width / 4), (scr_height / 3) - Compensation_B}
      end tell
      activate
      tell window 2
        set bounds to {0, (scr_height / 3) + Compensation_C, (scr_width / 4), ((scr_height / 3) * 2) + Compensation_D}
      end tell
      activate
      tell window 3
        set bounds to {0, ((scr_height / 3) * 2) + Compensation_E, (scr_width / 4), scr_height}
      end tell
      activate
      tell window 4
        set bounds to {(scr_width / 4), 0, ((scr_width / 4) * 2), (scr_height / 3) - Compensation_B}
      end tell
      activate
      tell window 5
        set bounds to {(scr_width / 4), (scr_height / 3) + Compensation_C, ((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_D}
      end tell
      activate
      tell window 6
        set bounds to {(scr_width / 4), ((scr_height / 3) * 2) + Compensation_E, ((scr_width / 4) * 2), scr_height}
      end tell
      activate
      tell window 7
        set bounds to {((scr_width / 4) * 2), 0, ((scr_width / 4) * 3), (scr_height / 3) - Compensation_B}
      end tell
      activate
      tell window 8
        set bounds to {((scr_width / 4) * 2), (scr_height / 3) + Compensation_C, ((scr_width / 4) * 3), ((scr_height / 3) * 2) + Compensation_D}
      end tell
      activate
      tell window 9
        set bounds to {((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_E, ((scr_width / 4) * 3), scr_height}
      end tell
      activate
      tell window 10
        set bounds to {((scr_width / 4) * 3), 0, scr_width, (scr_height / 3) - Compensation_B}
      end tell
      activate
      tell window 11
        set bounds to {((scr_width / 4) * 3), (scr_height / 3) + Compensation_C, scr_width, ((scr_height / 3) * 2) + Compensation_D}
      end tell
      activate
      tell window 12
        set bounds to {((scr_width / 4) * 3), ((scr_height / 3) * 2) + Compensation_E, scr_width, scr_height}
      end tell
    end tell
  end if
  
end tell
Perhaps useful for someone...

[robg adds: On my multi-monitor Mac, these scripts didn't work exactly as I expected -- they arranged the open windows across two of my three displays.]
  Post a comment  •  Comments (8)  
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[7,281 views] Email Article To a Friend View Printable Version
Prevent Google Chrome's updater from running Web Browsers
An earlier hint I found said to use Lingon to edit the launchd file and remove Google's updater task from the Chrome browser. It works great until the next time you run Chrome.

To foil Google/Chrome once and for all, use Lingon to disable the launchd task, and then go to your user's Library/Google folder and delete the contents of GoogleSoftwareUpdate. Not done yet -- now you must use Terminal to prevent the next launch of Chrome from re-establishing the task.

In a Terminal window, cd ~/Library/Google and type chmod 111 GoogleSoftwareUpdate. (I couldn't figure out how to use Finder to remove read/write privilege for myself on my own folder). Now the whole folder is write locked, and Chrome can't reload the software update contents, and it won't recreate the launchd task either.

Please note you now have to update Chrome yourself.

[robg adds: I'm not sure which hint the author is referring to; there aren't any here that mention Chrome and Lingon. The closest I could find was this one, which was about the updater relative to Google Earth. The section in that hint about removing the launchd files would be applicable to this hint as well.]
  Post a comment  •  Comments (10)  
  • Currently 2.48 / 5
  You rated: 4 / 5 (21 votes cast)
 
[20,566 views] Email Article To a Friend View Printable Version