You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.3 KiB

4 months ago
4 months ago
4 months ago
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no" />
  7. <title>廓形仪</title>
  8. </head>
  9. <body>
  10. <noscript>You need to enable JavaScript to run this app.</noscript>
  11. <div id="root"></div>
  12. <script>
  13. function setupWebViewJavascriptBridge(callback) {
  14. if (window.WebViewJavascriptBridge) { return callback(WebViewJavascriptBridge); }
  15. if (/android/i.test(navigator.userAgent)) {
  16. document.addEventListener('WebViewJavascriptBridgeReady',function(){ callback(WebViewJavascriptBridge) },false);
  17. }
  18. else {
  19. if (window.WVJBCallbacks) { return window.WVJBCallbacks.push(callback); }
  20. window.WVJBCallbacks = [callback];
  21. var WVJBIframe = document.createElement('iframe');
  22. WVJBIframe.style.display = 'none';
  23. WVJBIframe.src = 'https://__bridge_loaded__';
  24. document.documentElement.appendChild(WVJBIframe);
  25. setTimeout(function() { document.documentElement.removeChild(WVJBIframe) }, 0)
  26. }
  27. }
  28. setupWebViewJavascriptBridge(function(bridge) {
  29. window.bridge = bridge;
  30. });
  31. </script>
  32. </body>
  33. </html>