I would like to import a script from Dropbox using <script src = 'https://www.dropbox.com/s/id/file.js?dl=1' crossorgin></script>
, but it doesn't work. If I then try main();
, nothing happens:
main();
<script src = 'https://www.dropbox.com/s/id/file.js?dl=1' crossorgin></script>
Despite ending with ".js", the Dropbox link doesn't directly go to the JavaScript file, instead, it shows a web page from where you can then proceed to download the file.
Checking the Network tab in the browser console shows that upon clicking download a single-use download link is generated, from which the file is fetched.
Dropbox might not be the right platform for what you are trying to achieve. You could host the file locally or use a platform designed for content delivery instead.