1

This piece of code worked for me for two years to detect users who try to open devtools:

var image = new Image();
Object.defineProperty(image, 'id', {
    get: function() {
        $('#<element_to_remove_on_detection>').remove();
        console.clear();
    }
});
console.log('%c', image);

But it's not working anymore, and I don't know why. Do you know if any updates on Chrome/Opera impacted this code? There are no errors in the console. What should I do to make it work again?

Ollie
  • 428
  • 2
  • 9
  • 26
  • 1
    I don’t see why that should be anyone’s business, to know whether or not I have my dev tools open. – CBroe Apr 30 '21 at 11:41

0 Answers0