Prevent Zoom Pro Ads and Success Hash

Prevents the #success Hash on Zoom join links to allow sharing the link with others and prevents Zoom Pro ads from appearing after the button is clicked.

目前為 2022-07-01 提交的版本,檢視 最新版本

// ==UserScript==
// @name        Prevent Zoom Pro Ads and Success Hash
// @namespace   https://github.com/DenverCoder1
// @version     0.0.3
// @description Prevents the #success Hash on Zoom join links to allow sharing the link with others and prevents Zoom Pro ads from appearing after the button is clicked.
// @match       https://*zoom.us/s/*
// @include     https://*.zoom.us/[js]/*
// @grant       none
// @author      Jonah Lawrence (DenverCoder1)
// @license     MIT
// ==/UserScript==

/* jshint esversion: 8 */

window.addEventListener("hashchange", () => history.replaceState(null, null, window.location.href.replace("/s/", "/j/").replace(/#.*?$/, "")));

/**
 * Whether or not to prompt when a redirect occurs
 * @type {string}
 */
window.blockRedirect = true;

// prompt on redirect if window.blockRedirect is true
window.onbeforeunload = function(e) {
		if (window.blockRedirect) {
			const message = "Are you sure you want to leave?";
			e.preventDefault();
			e.returnValue = message;
			return message
		}
};

// unblock redirects if clicked on a link
document.body.addEventListener("click", function (e) {
	if (e.target.closest("a")) {
		window.blockRedirect = false;
	}
});

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址