DevTools Anti-Detector

Simple tool to temporarily prevent site from using popular methods of DevTools detection. Do not leave enabled!

Od 27.04.2018.. Pogledajte najnovija verzija.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         DevTools Anti-Detector
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Simple tool to temporarily prevent site from using popular methods of DevTools detection. Do not leave enabled!
// @author       lainverse
// @match        *://*/*
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';
    let tS = Object.getOwnPropertyDescriptor(RegExp.prototype, 'toString');
    let fts = Function.prototype.toString;
    Object.defineProperty(RegExp.prototype, 'toString', {
        enumerable: tS.enumerable,
        configurable: tS.configurable,
        get: () => this ? (this._actual_toString ? this._actual_toString : tS.value) : tS.value,
        set: function(val) {
            if (fts.call(val) === 'function toString() { [native code] }') {
                this._actual_toString = val;
                return true;
            }
            console.log('Attempt to change toString for', this, 'with', fts.call(val));
            return true;
        }
    });
})();