Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var imgUri = local("astext")
- var html = `
- <html>
- <head>
- <title>Display Image</title>
- <style>
- body { display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background-color: black; }
- img { max-width: 100%; max-height: 100%; }
- </style>
- </head>
- <body>
- <img src="` + imgUri + `" alt="Loaded Image">
- </body>
- </html>
- `;
- // Use Tasker's HTML Dialog to display the image
- var intent = {
- action: "android.intent.action.VIEW",
- data: "data:text/html," + encodeURIComponent(html),
- type: "text/html"
- };
- // Send intent to Tasker's Open File/URL action
- app.sendIntent(intent);
Advertisement
Add Comment
Please, Sign In to add comment