How to test if in dashboard, bypassing Ajax quirk

How to test if in dashboard, bypassing Ajax quirk