Add"and window.location.protocol isnt 'ms-appx:'" in constructor