fix: code style

Signed-off-by: Max Wu <jackymaxj@gmail.com>
This commit is contained in:
Max Wu 2021-01-21 14:35:03 +08:00
parent 47bab4266b
commit 2b9affbc08
1 changed files with 4 additions and 4 deletions

View File

@ -260,12 +260,12 @@ if (typeof window.mermaid !== 'undefined' && window.mermaid) {
}
}
function jsonp(url, callback) {
function jsonp (url, callback) {
const callbackName = 'jsonp_callback_' + Math.round(1000000000 * Math.random())
window[callbackName] = function (data) {
delete window[callbackName]
document.body.removeChild(script)
callback(data)
delete window[callbackName]
document.body.removeChild(script)
callback(data)
}
const script = document.createElement('script')