Is it possible to launch Javascript code (onclick) with simple buttons (Buttonsdevice)?
-
Launch Javascript code with Button
-
I don’t think thats possible right now. Why would you want this? Maybe there is another solution.
If you really really need javascript, there are some chrome plugins which can do this: https://chrome.google.com/webstore/detail/custom-javascript-for-web/poakhlngfciodnhlhhgnaaelnpjljija?hl=en.
-
I am using this app for my tablet and want to call this javascript functions to do some things e.g. open youtube app and so on.
-
Mhm interesting, maybe you could try creating your own website with buttons which have these actions and load it with the iframe plugin? Not 100% if this will work but it’s worth a shot.
-
Indeed, that would be possible. But my intention was to integrate it directly(natively) into pimatic and not through an external website.
-
@kenci said in Launch Javascript code with Button:
Is it possible to launch Javascript code (onclick) with simple buttons (Buttonsdevice)?
There is a pending PR for a xButton device extension which would allow for adding JS code to be executed using the eval method. It has not been accepted yet as using eval is a major security risk. So the whole concept needs further thought.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law