Update index.html
Browse files- index.html +15 -16
index.html
CHANGED
|
@@ -90,23 +90,22 @@
|
|
| 90 |
<!-- Widget 3: News (Darqube) -->
|
| 91 |
<div class="section">
|
| 92 |
<h2>Market News</h2>
|
| 93 |
-
|
| 94 |
-
<
|
| 95 |
-
<script
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
</script>
|
| 109 |
-
<!-- Finlogix Widget END-->
|
| 110 |
|
| 111 |
</body>
|
| 112 |
</html>
|
|
|
|
| 90 |
<!-- Widget 3: News (Darqube) -->
|
| 91 |
<div class="section">
|
| 92 |
<h2>Market News</h2>
|
| 93 |
+
|
| 94 |
+
<iframe style="border: none; width:100%; height: 100%;" data-widget-name="NewsWidget" src="https://widget.darqube.com/news-widget?token=67f9155f6d8e66cee1884145" id="NewsWidget-zdbxfp1"></iframe>
|
| 95 |
+
<script>
|
| 96 |
+
window.top.addEventListener("message", function(msg) {
|
| 97 |
+
const widget = document.getElementById('NewsWidget-zdbxfp1');
|
| 98 |
+
|
| 99 |
+
if (!widget) return;
|
| 100 |
+
|
| 101 |
+
const styles = msg.data?.styles;
|
| 102 |
+
const token = msg.data?.token;
|
| 103 |
+
const urlToken = new URL(widget.src)?.searchParams?.get?.('token');
|
| 104 |
+
if (styles && token === urlToken) {
|
| 105 |
+
Object.keys(styles).forEach(key => widget.style.setProperty(key, styles[key]))
|
| 106 |
+
}
|
| 107 |
+
});
|
| 108 |
</script>
|
|
|
|
| 109 |
|
| 110 |
</body>
|
| 111 |
</html>
|