We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, Is there a property I can query in p5.js to detect that my server is openprocessing.org, and secondarily what version(s) of itself, p5.js, and any other major stuff it is running? Many thanks, Greg E
Answers
Browsers got a global location variable which stores a Location object: L-)
https://Developer.Mozilla.org/en-US/docs/Web/API/Location
In order to know which is the current domain host, you can print() its hostname property: :-bd
print(location.hostname); // openprocessing.org
About p5.js library's current version, I'm afraid they don't make it available in its API. :-&
But you can ask them for such feature though: https://GitHub.com/processing/p5.js/issues
However, you can always grab latest version using this
<script>
tag below in your ".html" file: *-:)<script defer src=https://CDN.JSDelivr.net/npm/p5></script>
Thanks GoToLoop. That's what I needed. Cheers.