move window message listener to index.html
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 39s
Details
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 39s
Details
This commit is contained in:
parent
48d6d4a767
commit
c6d8af4f4c
|
@ -8,6 +8,16 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script>
|
||||
console.log('adding window message event listener');
|
||||
window.addEventListener(
|
||||
'message',
|
||||
(event) => {
|
||||
if (event.data?.target?.startsWith('metamask')) return;
|
||||
console.log('window message', event);
|
||||
},
|
||||
);
|
||||
</script>
|
||||
<script type="module" src="/src/main.jsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -14,16 +14,6 @@ import Widget from './Widget';
|
|||
|
||||
window.widgetApiPromise = WidgetApiImpl.create({});
|
||||
|
||||
console.log('adding window message event listener');
|
||||
|
||||
window.addEventListener(
|
||||
'message',
|
||||
(event) => {
|
||||
if (event.data?.target?.startsWith('metamask')) return;
|
||||
console.log('window message', event);
|
||||
},
|
||||
);
|
||||
|
||||
const router = createBrowserRouter([
|
||||
{
|
||||
path: '/',
|
||||
|
|
Loading…
Reference in New Issue