Dashboard + Javascript?

I'm looking to write an app to provide a custom dashboard tile and had seen that Javascript doesn't seem to work. I'm trying to write some dynamic Javascript, so the injection option doesn't really work.

Just curious as to why the limitation exists or if I'm just missing something?

I may be able to work around, but it would simplify the logic for me.

Thanks,
--Chris

Might need a little more info on what you are trying to do, there are certain things like iFrames that can be used. There is also the JS injection from Smartly that I believe still works.

1 Like

I've been tinkering with the tile manager app to see if I can enhance it to add additional functions and be more efficient at some existing functions. I want to use some javascript generated dynamically based on characteristics of the devices, but adding a script block doesn't work. I'm trying to think through if I can use the JS Injection app, but I think the optimal path would involve dynamically generated javascript, rather than fixed that's stored on a server. I'd also like to keep it local, but make it available remotely, which makes the injection more difficult.

Can I put a script block directly in an iframe and reference it by iframe object id? I'm fairly rusty on my advanced javascript. That wouldn't be as efficient, character count-wise, but might work.

I'm curious about the restriction on script blocks. I always love to understand the "how" and "why" for clever technologies.

Yep. That’s what I use, still works fine.

Are talking about Bryan's Tile Master App? I suspect you may struggle to access device details, unless you are going to still make use of the Maker API links, which I can expect would be at least one spot where you would need to be dynamic.

I would expect maybe..... :slight_smile: I've been mainly working inside an iFrame referencing out, for some of the stuff I have been building, not sure about the other way around.

I can't comment with any confidence or knowledge, can only assume security... but not sure. We can certainly embed iFrames, which opens up a lot, but I'm very much a DIY web developer....