made active page detection less clever and configurable