Script to detect Chrome Devtool while using Chrome Extension

Job ID: 33100785

Budget: $400 – $500 USD

I am creating a Chrome Extension, now I need a script to detect whether is Chrome Devtool is open or not while user using my extension. I searched all way that i found on Google but it's not what i am expecting. This is my old script to detect and it works with Chrome under version 99, but it is not working in Chrome version 99