I got a number of Google Apps Script Web Apps. They all use image files, Materialize.min.css, and materilize.min.js sitting on other servers. I wanted to move all those files under my control onto my google drive. I've been successful with the image files and the materialize.min.css, but for some reason the maerialize.min.js
is causing problems.
For the CSS files I used to use
link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css" /
I now use
link rel="stylesheet"
href="https://drive.google.com/uc?export=view&id=1UQ_tm8_bUOXWj1GdzS8JmkehwVf5sW3A" />
And it all works well.
For the JS files: I used to use
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script> <?!= include("page-js");?>"
I've tried
<script src="https://drive.google.com/uc?export=download&id=1SkfRcC1jQwNLRVEUPgjQHSUkEFdg1BND"></script> <?!= include("page-js");?>"
Also tried export=view
I get the runtime error
userCodeAppPanel:47 Uncaught ReferenceError: M is not defined at HTMLDocument.
So it seems to read the file, but doesn't seem to load the js????
I'm not sure how to fix it. Any suggestions would be appreciated.