User-Agent Switcher for Chrome

Switch user-agent to Google Chrome

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         User-Agent Switcher for Chrome
// @license MIT
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Switch user-agent to Google Chrome
// @author       You
// @match        *://*/*  // Change this to the website URL where you want to apply the switch
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    
    // Define the Google Chrome user-agent string (Windows version)
    const chromeUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36";
    
    // Change the user-agent for the current page
    Object.defineProperty(navigator, 'userAgent', {
        get: function() { return chromeUserAgent; }
    });
    
    console.log("User-Agent has been switched to Google Chrome!");
})();