- 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
/
index.html
62 lines (56 loc) · 2.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HERE Wallet x Mercuryo</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
                'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
                sans-serif;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            background: #fff;
        }
        #mercuryo-widget {
            width: 100%;
            height: calc(var(--vh, 1vh) * 100);
        }
    </style>
</head>
<body>
    <div id="mercuryo-widget"></div>
    <script src="https://widget.mercuryo.io/embed.2.0.js"></script>
    <script>
        let query = Object.fromEntries(new URLSearchParams(window.location.search).entries())
        mercuryoWidget.run({
            widgetId: 'd9e4a6b4-acde-400d-97e9-97d865199d60',
            host: document.getElementById('mercuryo-widget'),
            address: query.address,
            signature: query.signature,
            type: query.type ?? "buy",
            currency: query.currency ?? "NEAR",
        });
        var customViewportCorrectionVariable = "vh";
        function setViewportProperty(doc) {
            var prevClientHeight;
            var customVar = "--" + (customViewportCorrectionVariable || "vh");
            function handleResize() {
                var clientHeight = doc.clientHeight;
                if (clientHeight === prevClientHeight) return;
                requestAnimationFrame(function updateViewportHeight() {
                    doc.style.setProperty(customVar, clientHeight * 0.01 + "px");
                    prevClientHeight = clientHeight;
                });
            }
            handleResize();
            return handleResize;
        }
        window.addEventListener("resize", setViewportProperty(document.documentElement));
    </script>
</body>
</html>