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


Click here to return to the 'Change Safari's User Agent to Google Chrome' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Change Safari's User Agent to Google Chrome
Authored by: Frozited on Mar 23, '11 08:22:07AM

Is there a way to change the user agent only for specific websites ?



[ Reply to This | # ]
Change Safari's User Agent to Google Chrome
Authored by: schuyler on Mar 25, '11 03:58:58PM

I am not aware of any Safari feature that permits site-specific assignment of a User Agent.

The following Applescript is a poor man's attempt to approximate such a feature. It prompts the user for an address (eg, 1 Infinite Loop, Cupertino, CA), then opens the address in a new Google Map window, and changes the User Agent to Google Chrome using the original script. Like the original script, it can be run either as a standalone application or from Safari's script menu. Incidentally, it would appear that any change to the User Agent remains in effect <u>only</u> for the current tab or window and is lost when that tab or window is closed.

-- Replace xxx in the following statement with the full HFS path to the User Agent-changing script, eg: "Macintosh HD:Users:username:Desktop:UserAgentChangeScript.app"
set pathToUserAgentScript to "xxx"
activate
set newURL to (display dialog "Enter a map address:" default answer "")'s text returned
tell application "Safari"
activate
make new document with properties {URL:"http://maps.google.com/maps?q=" & newURL}
end tell
run script file pathToUserAgentScript

Edited on Mar 29, '11 05:11:14AM by crarko



[ Reply to This | # ]