site  contact  subhomenews

User Agent Switcher 0.7.3

January 30, 2011 — BarryK
I have created a PET package of User Agent Switcher, for SeaMonkey 2.0.11+.

User Agent Switcher info page:

I downloaded the .xpi fle from here:

To create the PET, I opened up 'useragentswitcher.jar' (which is a zip file), and replaced content/useragentswitcher/xml/useragents.xml with a bigger list, as the default only had user agents entries for Internet Explorer 6, 7 and 8. Which I got from here:

There was a problem, first time SM is started, it opens with a User Agent Switcher web page. I edited content/useragentswitcher/upgrade.js to suppress that. I don't know any Javascript, but thought a "return 0;" would probably work:

	// Opens the upgrade page

openUpgradePage: function()
return 0; /*BK*/

var windowContent = window.getBrowser();

windowContent.removeEventListener("load", UserAgentSwitcherUpgrade.openUpgradePage, false);

window.setTimeout(function() { windowContent.selectedTab = windowContent.addTab("" + UserAgentSwitcherUpgrade.getVersion().replace(/\./g, "") + "/"); }, 0);

...which seems to have worked... at least, the upgrade/installed web page didn't open.

Download my PET (50KB):

...should work in SM 2.0.11 and later.

Tags: wary