Dyskusje » Propozycje stworzenia skryptu/stylu

Change firefox user agent on whatsapp web

§
Napisano: 03-02-2015

Change firefox user agent on whatsapp web

i tried to change firefox user agent on whatsapp web:
// ==UserScript==
// @name Change User-Agent for WhatsappWeb
// @version 1
// @match https://web.whatsapp.com/
// @user-agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.35 Safari/537.36
// ==/UserScript==

but it didnt work any ideas??

woxxomMod
§
Napisano: 03-02-2015

Greasemonkey API documentation doesn't mention @user-agent tag. As far as I know, the only solution is to use an addon, for example, UAControl.

woxxomMod
§
Napisano: 25-04-2015
Edytowano: 25-04-2015

The code you found should work on Chrome with Tampermonkey.

For Firefox try using this:

// ==UserScript==
// @name Change User-Agent for WhatsappWeb
// @version 1
// @match https://web.whatsapp.com/*
// ==/UserScript==

Object.defineProperty(navigator, 'userAgent', {
    value: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.35 Safari/537.36'
});
§
Napisano: 01-07-2017

It doesn't work for me. Matching this with http://whatsmyuseragent.org/ doesn't change the result on that site.

§
Napisano: 02-07-2017
Edytowano: 02-07-2017

I don't think you need a user-script for this. You should be able to change your user agent on websites by going to about:config and making an entry like "general.useragent.override.google.com" to use google as an example, with a string value of the user agent you want. Or just "general.useragent.override" if you want to change it universally.

Odpowiedz

Zaloguj się, by odpowiedzieć.