Συζητήσεις » Αιτήματα Δημιουργίας

Change firefox user agent on whatsapp web

§
Δημοσιεύτηκε: 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??

woxxomΣυντονιστής
§
Δημοσιεύτηκε: 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.

woxxomΣυντονιστής
§
Δημοσιεύτηκε: 25/04/2015
Επεξεργάστηκε: 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'
});
§
Δημοσιεύτηκε: 01/07/2017

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

§
Δημοσιεύτηκε: 02/07/2017
Επεξεργάστηκε: 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.

Δημοσίευση απάντησης

Συνδεθείτε για να δημοσιεύσετε μια απάντηση.