Skip to content

Instantly share code, notes, and snippets.

View zekageri's full-sized avatar

DrRandom zekageri

  • Hitec
  • Hungary
View GitHub Profile
@oussamahamdaoui
oussamahamdaoui / devtools-detect.js
Last active January 29, 2024 10:04
Detect devtools open and close events tested on Chrome and Safari
(function() {
'use strict';
const el = new Image();
let consoleIsOpen = false;
let consoleOpened = false;
Object.defineProperty(el, 'id', {
get: () => {
consoleIsOpen = true;
}