This question is not the duplicate of if window is popup , But a similar one.
I am developing a extension which injects scripts to all web pages. I need to detect w
Why not just check if the opener is NOT undefined? a popup has an opener while a regular page hasn't.
if (window.opener != null)