Disable WebGL on all pages (modified)

This script will disable WebGL on all sites (but with site exceptions included to make online games work properly)

Pada tanggal 07 Oktober 2025. Lihat %(latest_version_link).

// ==UserScript==
// @name         Disable WebGL on all pages (modified)
// @version      2025.10.07
// @description  This script will disable WebGL on all sites (but with site exceptions included to make online games work properly)
// @author       Joey_JTS
// @license MIT
// @include      http://*
// @include      https://*
// @exclude      *://agar.io
// @exclude      *://classic.minecraft.net
// @exclude      *://crazygames.com
// @exclude      *://diep.io
// @exclude      *://newgrounds.com
// @exclude      *://ruffle.rs
// @exclude      *://scratch.mit.edu
// @exclude      *://slither.io
// @exclude      *://turbowarp.org
// @namespace    https://greasyfork.org/en/users/761382
// @icon         https://www.youtube.com/favicon.ico
// @unwrap
// @run-at       document-idle
// @unwrap
// @grant        none
// ==/UserScript==

(function () {
  "use strict";

  const originalGetContext = HTMLCanvasElement.prototype.getContext;
  HTMLCanvasElement.prototype.getContext = function (contextType) {
    if (contextType === "webgl" || contextType === "webgl2") {
      console.log("WebGL is disabled by Tampermonkey");
      return null;
    }
    return originalGetContext.apply(this, arguments);
  };
})();