26.x useragent.override

Support and discussions for the x86/x64 Linux version of Pale Moon and specific Linux distribution questions related to the browser.

Moderator: trava90

Forum rules
If your question is about general use of the browser and not specific to Linux, then please use the General Support board.
Locked
ipsirc

26.x useragent.override

Post by ipsirc » 2016-02-26, 09:46

I got an email from google a few days ago:
"New sign-in from Firefox on Windows

You received this message because xyz@yyy.hu is listed as the recovery email for xyz@gmail.com. If xyz@gmail.com is not your Google Account, click here to disconnect from that account and stop receiving emails." :o

Suddenly got a heartbreak, google never used my secondary email before to posts warning about someone else logged into my account. It tooks some minutes to realize this: pref("general.useragent.override.google.com","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.9) Gecko/20100101 Goanna/2.0 Firefox/31.9 PaleMoon/26.0");
Okie, i know it's just a quick workaround, but it's VERY SCARY to anyone when got this kind of emails from google.

Then I found the right way of doing this fake useragent in browser/app/profile/firefox.js:
// ****************** domain-specific UAs ******************

// AMO needs "Firefox", obviously - pass on the OS (determined at build time)
#ifdef XP_UNIX
#ifdef XP_MACOSX
pref("general.useragent.override.addons.mozilla.org","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.9) Gecko/20100101 Firefox/24.9 (Pale Moon)");
#else
pref("general.useragent.override.addons.mozilla.org","Mozilla/5.0 (Linux; X11; rv:24.9) Gecko/20100101 Firefox/24.9 (Pale Moon)");
#endif
#else
pref("general.useragent.override.addons.mozilla.org","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.9) Gecko/20100101 Firefox/24.9 (Pale Moon)");
#endif

Could you make temporary useragent overrides like addons.mozilla.org?

Locked