Skip to content

Commit

Permalink
add error display 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
madneal committed Feb 12, 2018
1 parent 4cae8cd commit 14a617f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ function exportMedium() {
})
.catch(function (err) {
console.error(err)
document.querySelector('.left-area').display = 'none'
markdownText = 'The website site ' + activeTab.url + ' may is not supported now.\nThe error infomation is:' + err +
'.\nIt is appreciated that you can attach the error information at [issue](https://github.com/neal1991/export-medium/issues). '
+ 'You can click the "copy to clipboard" button to copy the information to the clipboard. Thanks.'
document.querySelector('#source').value = markdownText
document.querySelector('.right-area').innerHTML = snarkdown(markdownText)
cancelLoad()
})
})
Expand Down

0 comments on commit 14a617f

Please sign in to comment.