Webpage custom scripting does not work when using refresh option

Webpage custom scripting does not work when using refresh option

I have a custom web script that excludes all other selectors and successfully only shows the selector/content I want.  However, if I turn on refresh, once the refresh option takes place all webpage content returns to the screen and the custom script does not rerun.  

Has anyone else seen this and figured out a workaround?