Waboodoo / HTTP-Shortcuts

Android app to create home screen shortcuts that trigger arbitrary HTTP requests
https://http-shortcuts.rmy.ch
MIT License
1.17k stars 113 forks source link

showWindow(fullscreen) in JavaScript #384

Open edyso opened 1 year ago

edyso commented 1 year ago

I'm missing the option to display a fullscreen window in javascript. The calling-api responses with a JSON-Object, so I use javascript to get a value and to display it. The value contains html-code including styles and showDialog display it incorrect. I think showDialog has less html-support as fullscreen-Window(display type from response handling). I tried to set/override response.body from javascript but it's not working.

Thank you.

Waboodoo commented 1 year ago

Thanks for your input. Yes, the fullscreen window has more support for HTML than the dialog window.

I'll see that I can improve the possibilities to display custom content.

Side-note: There is currently only one way to display custom content in the fullscreen window: setting the "Response Handling" settings to show a message instead of the raw response, and setting that message to use a static variable which can be set via Scripting. The problem with this is that it's currently not possible to change the content-type, meaning that if your original response was JSON, the app will also try to display this custom message as JSON even when it's not.