Created
March 29, 2019 19:12
-
-
Save yearofthewhopper/db06c8dc3fa57c122919e4baa7ffaa24 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/local/share/jupyter/nbextensions/google.colab/ | |
#make your path = | |
/nbextensions/google.colab/ | |
!cp /content/drive/My\ Drive/Colab\ Notebooks/yourfiles/yourJavaScript.js \ | |
/usr/local/share/jupyter/nbextensions/google.colab/ | |
@register_cell_magic | |
def dojs(line, src): | |
return HTML(f""" | |
<canvas id="renderCanvas" touch-action="none" width="1280px" height="720px"></canvas> | |
<script src="/nbextensions/google.colab/testJavascript.js"></script> | |
<script> | |
{src} | |
</script> | |
""") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://stackoverflow.com/questions/54236698/import-external-js-scripts-in-google-colab-html