Revert "Fix the flash on doc page route changes"

This reverts commit 84e6d87b2de671fff1ddeaffb02003ef2ffd0b09.
Anon functions removed