User Agent Switcher 0.7.3

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.

I will put this in the next Wary.

Posted on 30 Jan 2011, 24:34

No comments posted yet.