Last active
February 16, 2023 05:26
-
-
Save wilbeibi/630fb722a7234a697e1c754445ac8bb9 to your computer and use it in GitHub Desktop.
Use new Bing in any browsers, written by chatGPT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Change User Agent to Edge for Microsoft websites | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0 | |
// @description Changes the user agent to Edge when visiting Microsoft websites | |
// @match https://*.bing.com/* | |
// @match https://*.microsoft.com/* | |
// @match https://*.outlook.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const uaString = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36 Edg/93.0.961.38'; | |
const userAgent = navigator.userAgent; | |
const appVersion = navigator.appVersion; | |
Object.defineProperty(navigator, 'userAgent', { value: uaString, writable: false, configurable: false, enumerable: true }); | |
Object.defineProperty(navigator, 'appVersion', { value: uaString, writable: false, configurable: false, enumerable: true }); | |
Object.defineProperty(navigator, 'vendor', { value: 'Google Inc.', writable: false, configurable: false, enumerable: true }); | |
Object.defineProperty(navigator, 'vendorSub', { value: '', writable: false, configurable: false, enumerable: true }); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment