Jump to content

Simple way to change Firefox Useragent

Recommended Posts


Simple changing Firefox User-Agent using "FF.au3" without manual edit "prefs.js"

#Include <FF.au3>

If _FFConnect() Then
   ;Default User-Agent
   ;Set new User-Agent
   FFSetUserAgent("Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36")
   ;Reset to default User-Agent
   MsgBox(0, "", "Can't connect to FireFox!")

Func FFResetUserAgent()

Func FFSetUserAgent($useragent)
   _FFCmd("Ci=Components.interfaces;Cc=Components.classes;string=Cc['@mozilla.org/supports-string;1'].createInstance(Ci.nsISupportsString);string.data='" & $useragent & "';Cc['@mozilla.org/preferences-service;1'].getService(Ci.nsIPrefService).getBranch('general.useragent.').setComplexValue('override',Ci.nsISupportsString,string);")


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.