link_with_intent_to_package_in_new_tab.html 495 B

123456789101112131415
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta name="viewport"
  5. content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
  6. </head>
  7. <body>
  8. <a id='link' target='_blank'>
  9. Click to intent to the package specified in the URL hash in a new tab
  10. </a>
  11. <script type="text/javascript">
  12. document.getElementById('link').href = 'intent://example.test#Intent;scheme=https;action=android.intent.action.VIEW;package=' + window.location.href.split('#')[1] + ';end';
  13. </script>
  14. </body>
  15. </html>