Only load script if we're on a post page

The script wouldn’t let the media gallery page load otherwise. Now the
is script is only loaded when creating or editing a post