Skip to content

Commit

Permalink
uauth fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BinBashBanana committed Jul 7, 2022
1 parent 6dd280b commit 297ec62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion uauth/isolatedpicker.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h2>Make sure you have popups enabled!</h2>
function finish(message, name, data) {
function waitForReceiverLoad() {
if (receiverLoaded) {
receiverFrame.contentWindow.postMessage({fwOrigin: window.location.origin, webretro: {timestamp: parseInt(queries.timestamp), message: message, name: name, data: data}}, "*");
receiverFrame.contentWindow.postMessage({webretro: {timestamp: parseInt(queries.timestamp), message: message, name: name, data: data}}, "*");
} else {
setTimeout(waitForReceiverLoad, 250);
}
Expand Down
3 changes: 2 additions & 1 deletion uauth/receiver.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
<title>Choose a File</title>
</head>
<body>
<h2>Receiver is loaded.</h2>
<h2>I'm supposed to be an invisible iframe... (you shouldn't see this)</h2>
<script>
let uauthBC = new BroadcastChannel("uauth");
window.addEventListener("message", function(e) {
uauthBC.postMessage(e.data);
uauthBC.postMessage({fwOrigin: e.origin, webretro: e.data.webretro});
window.parent.postMessage("acknowledged", "*");
}, false);
</script>
Expand Down

0 comments on commit 297ec62

Please sign in to comment.