Disable WebGL

Отключает WebGL на всех сайтах

  1. // ==UserScript==
  2. // @name Disable WebGL
  3. // @description Отключает WebGL на всех сайтах
  4. // @namespace http://tampermonkey.net/
  5. // @version 1.0
  6. // @author M-A-Z-2005
  7. // @include *
  8. // @license MIT
  9. // @grant unsafeWindow
  10. // @run-at document-start
  11. // ==/UserScript==
  12.  
  13. const nativeCtx = HTMLCanvasElement.prototype.getContext;
  14. unsafeWindow.HTMLCanvasElement.prototype.getContext = function getContext(contextId, attributes) {
  15. if (contextId == "2d") return nativeCtx.call(this, contextId, attributes);
  16. else return null;
  17. }