Check if the page is in editor or not
Hello,
I have a page level component that I want to hide on its editor page, and show otherwise (preview, published, etc).
So it would hide in the editor page:
http://localhost:4502/editor.html/content/projectname/page1.wvcresponsive.html
and show in these pages:
http://localhost:4502/content/projectname/page1.wvcresponsive.html?wcmmode=disabled
http://localhost:4502/content/projectname/page1.html
I know that AEM sets a cookie "wcmmode" that can changes value depending on the mode, but for all the pages above, they have the same value of "edit" so it would be useless for the purpose of distinguishing them.

Is there a reliable AEM way to determine whether it is an editor page or not?
Preferably a frontend way (Cookie, browser object, etc) that can be implemented using Javascript.
Thank you,