Remove jQuery from IPython notebook viewer
This commit is contained in:
parent
76a15db45f
commit
bcebae31e2
|
|
@ -63,16 +63,20 @@ export default () => {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
$('<link>', {
|
if (gon.katex_css_url) {
|
||||||
rel: 'stylesheet',
|
const katexStyles = document.createElement('link');
|
||||||
type: 'text/css',
|
katexStyles.setAttribute('rel', 'stylesheet');
|
||||||
href: gon.katex_css_url,
|
katexStyles.setAttribute('href', gon.katex_css_url);
|
||||||
}).appendTo('head');
|
document.head.appendChild(katexStyles);
|
||||||
|
}
|
||||||
|
|
||||||
if (gon.katex_js_url) {
|
if (gon.katex_js_url) {
|
||||||
$.getScript(gon.katex_js_url, () => {
|
const katexScript = document.createElement('script');
|
||||||
|
katexScript.addEventListener('load', () => {
|
||||||
this.loadFile();
|
this.loadFile();
|
||||||
});
|
});
|
||||||
|
katexScript.setAttribute('src', gon.katex_js_url);
|
||||||
|
document.head.appendChild(katexScript);
|
||||||
} else {
|
} else {
|
||||||
this.loadFile();
|
this.loadFile();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue