move window message listener to index.html
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 39s Details

This commit is contained in:
Ladd Hoffman 2024-04-25 14:41:40 -05:00
parent 48d6d4a767
commit c6d8af4f4c
2 changed files with 10 additions and 10 deletions

View File

@ -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>

View File

@ -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: '/',