Skip to content

Instantly share code, notes, and snippets.

@RangerMauve
Created May 23, 2024 18:01
Show Gist options
  • Save RangerMauve/384c30bd403235a879fbe590935f81d4 to your computer and use it in GitHub Desktop.
Save RangerMauve/384c30bd403235a879fbe590935f81d4 to your computer and use it in GitHub Desktop.
Greasemonkey script to redirect zoom links to the web version automatically.
// ==UserScript==
// @name Zoom Join To Web
// @version 1
// @grant none
// @include https://*.zoom.us/*
// ==/UserScript==
// e.g. source
// https://us06web.zoom.us/j/88395547586?pwd=4KcslVk8qLNSDcTSjalXdrLbGG8xmR.1#success
// e.g. target
// https://app.zoom.us/wc/88395547586/join
const original = new URL(window.location.href)
const {pathname} = original
const group = pathname.split('/').at(-1)
const pwd = original.searchParams.get('pwd')
console.log('Zoom redirector', {group, pwd})
if(pathname.startsWith('/j/')) {
const webLink = `https://app.zoom.us/wc/${group}/join?pwd=${pwd}`
window.location.href = webLink
} else if(pathname.startsWith('/wc/')) {
document.querySelector('[password]').value = pwd
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment