Skip to content

Commit

Permalink
Release temp version
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerlong committed Oct 16, 2024
1 parent 64f9bda commit 2b37306
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 2 additions & 0 deletions content.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ const f = () => {

intervalHandle = setInterval(() => f(), 1000);

console.log('Content script loaded!');
window.addEventListener('message', event => {
console.log('message received', JSON.stringify(event.data));
if (event.data.type === 'resize') {
document.getElementById('glip-iframe').style.height =
event.data.height + 'px';
Expand Down
2 changes: 1 addition & 1 deletion docs/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/main.js.map

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ ReactDOM.render(<App store={store} />, container);

let count = 0;
setInterval(() => {
window.parent.postMessage(
{type: 'resize', height: count % 2 === 0 ? 300 : 24},
'*'
);
const message = {type: 'resize', height: count % 2 === 0 ? 300 : 24};
window.parent.postMessage(message, '*');
console.log('postMessage', JSON.stringify(message));
count += 1;
}, 10000);
}, 3000);

0 comments on commit 2b37306

Please sign in to comment.