class.com user agent switcher

changes user agent for class.com and its meetings

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 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         class.com user agent switcher
// @namespace    https://greasyfork.org/en/users/1375019-elisoreal
// @version      1.0
// @description  changes user agent for class.com and its meetings
// @author       elisoreal
// @match        *://*.class.com/*
// @run-at       document-start
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // overwrite the default user agent
    var newUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36";

    // redefine navigator.userAgent to return the custom user agent
    Object.defineProperty(navigator, 'userAgent', {
        get: function() { return newUserAgent; }
    });
})();