Conceal information about network type (e.g. cellular/broadband), number of CPU cores (or Hyper Threads), and video adapter brand & model.
当前为
// ==UserScript==
// @name Anti Snoop
// @namespace https://greasyfork.org/en/users/85671-jcunews
// @version 1.0.1
// @license AGPLv3
// @author jcunews
// @description Conceal information about network type (e.g. cellular/broadband), number of CPU cores (or Hyper Threads), and video adapter brand & model.
// @match *://*/*
// @grant none
// @run-at document-start
// ==/UserScript==
(() => {
["connection", "mozConnection", "webkitConnection", "hardwareConcurrency"].forEach((k, p) => {
if (navigator[k] && (p = Object.getPrototypeOf(navigator, k))) {
p.get = undefined;
Object.defineProperty(navigator, k, p)
}
});
var cv = document.createElement("canvas");
["webgl2", "webgl", "experimental-webgl2", "experimental-webgl"].forEach((k, wgl, dri) => {
if (
(wgl = cv.getContext(k)) && (dri = wgl.getExtension("webgl_debug_renderer_info")) && (dri = dri.UNMASKED_RENDERER_WEBGL) &&
(wgl = Object.getPrototypeOf(wgl)) && !wgl.getExtension.as_ujs
) {
var fn = wgl.getExtension;
wgl.getExtension = function(s) {
if (s && s.toLowerCase && (s.toLowerCase() === "webgl_debug_renderer_info")) return null;
return fn.apply(this, arguments)
};
wgl.getExtension.as_ujs = true
}
})
})();