-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link to external js file #220
Comments
It's definitely possible, but it also presents a security issue because the js files would execute. If someone created a link to a malicious script, it could eventually blacklist the Maker.js site. Generally my solution to this was to accept PRs and host the js here on the site. This would mean you would be sharing your code publicly. If folks don't want their code to be public, we could have something like: Don't immediately execute external scripts, and show an "I agree" button that the user accepts the risk. |
Thank you for your reply. :) Sharing it on your site is a good solution. But I assume this would be a solution that depends on your spare time, so perhaps not an instant one. ;-) So having the opportunity to add the js file directly would be awesome and having an [I agree] button sounds reasonable. |
Another option to be aware of, is that it is pretty easy to host your own copy of the site, here on GitHub:
|
Ok, you can now specify an external script. You will see a warning screen, and the code will not auto-execute, you must click the Run button. |
Cool, that was quick. :) I tried to refer to
Message in console:
Do you just allow files from github? |
Actually it's the 3km.ch server which is not allowing the resource. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS In my example I used a GitHub Gist which was convenient, you may want to try it: https://gist.github.com/ |
OK, I git it; did it the GitHub way: It just works. Thank you very much. :) |
Sure :) |
No, not yet. |
Is it already possible to add an external file to the playground? This way I don't have to set up my own Maker.js platform. See also at OpenJSCAD:
http://openjscad.org/#http://www.thingiverse.com/download:164128 (STL) or
http://openjscad.org/#http://openjscad.org/examples/slices/tor.jscad
The text was updated successfully, but these errors were encountered: