Remove the e here, and just keep the url. Don't apply _urlInput.value here either.

From here, change the click event to fire an onClick or something, that calls addMediaToGallery( _urlInput.value )