I made a new extension for a real time clock thanks richard for squeezing in the feature to get a unix with that I could create this cool extension I will make a github extension out of this soon
Can you post an example of it working! I would love to add this to the Awesome Arcade website but I can’t get it to work myself, maybe I’m missing something really obvious lol
glancing at the code for this project, your approach isn’t going to work in makecode. there’s no way to run browser javascript from an extension like you’re trying to do in the runBrowserJS function (that would be a pretty huge security risk!)
that being said, i did indeed sneak this functionality into the browser events extension; i just never added blocks for it. here’s an example of how to use the javascript apis:
yeah I saw that one post with that I forgot where tho I found those apis and turned them into an extension I asked ai what a unix was since I got a crazy long number
@TheEarth yeah, times returned by those APIs are in milliseconds since the start of the current epoch (January 1st, 1970), aka unix time, which is the traditional way that times are represented on computers. that’s why the current time function returns such a crazy high number.
fun fact: since that number is so high, it’s actually going to be a problem in 2038 for some computers