view.Window: add `removeScriptElement()` after script load

fix file loading, clear script tags in head