Skip to content

Commit

Permalink
feat: remove checkApp origin requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharis278 committed Dec 12, 2023
1 parent 3a04fbf commit 42e420f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/data/messages/proctorio.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
export async function checkAppStatus() {
return new Promise((resolve, reject) => {
const handleResponse = event => {
if (event.origin === window.location.origin) {
window.removeEventListener('message', handleResponse);
if (event?.data?.active) {
resolve();
}
reject();
window.removeEventListener('message', handleResponse);
if (event?.data?.active) {
resolve();
}
reject();
};
window.addEventListener('message', handleResponse);
window.top.postMessage(['proctorio_status'], '*');
Expand Down

0 comments on commit 42e420f

Please sign in to comment.