Use CrossOrigin.json for Github Gist embedding.
This commit is contained in:
parent
f86d947377
commit
f21e57e67f
@ -277,9 +277,7 @@ Embedding =
|
|||||||
el = $.el 'pre',
|
el = $.el 'pre',
|
||||||
hidden: true
|
hidden: true
|
||||||
id: "gist-embed-#{counter++}"
|
id: "gist-embed-#{counter++}"
|
||||||
$.ajax "https://api.github.com/gists/#{a.dataset.uid}",
|
CrossOrigin.json "https://api.github.com/gists/#{a.dataset.uid}", ->
|
||||||
responseType: 'json'
|
|
||||||
onload: ->
|
|
||||||
el.textContent = Object.values(@response.files)[0].content
|
el.textContent = Object.values(@response.files)[0].content
|
||||||
el.className = 'prettyprint'
|
el.className = 'prettyprint'
|
||||||
$.global ->
|
$.global ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user