Skip to content

Instantly share code, notes, and snippets.

@ghostzero
Created May 3, 2022 07:29
Show Gist options
  • Select an option

  • Save ghostzero/8cfa84fa78708ee423ddc56297ba725e to your computer and use it in GitHub Desktop.

Select an option

Save ghostzero/8cfa84fa78708ee423ddc56297ba725e to your computer and use it in GitHub Desktop.
This makes sure that the gmail meet is always with a specific user.
// ==UserScript==
// @name Google Meet User Switch
// @namespace https://ghostzero.dev
// @version 0.1
// @description This makes sure that the gmail meet is always with a specific user.
// @match https://meet.google.com/*
// @match https://meet.google.com/*
// @copyright René Preuß <[email protected]>
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// ==/UserScript==
$(() => {
let requiredAuthUser = "1";
let authUser = new URLSearchParams(window.location.search).get('authuser') || null;
if (authUser === requiredAuthUser) {
return;
}
var url = new URL(location.href);
url.searchParams.set("authuser", requiredAuthUser);
window.location = url.href;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment