Skip to content

Commit

Permalink
Attach Listner
Browse files Browse the repository at this point in the history
  • Loading branch information
manquer committed Jun 6, 2020
1 parent d10e767 commit 3f5f56b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion frame.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ function receiveMessage(event) {
if(event.data.type == 'startProview') {
startProview(...event.data.args);
}

if(event.data.type == 'stopProview') {
stopProview(event.data.url);
}
Expand Down
5 changes: 1 addition & 4 deletions templates/tracker.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@
onProviewStop(event.data.url);
}
}


window.addEventListener("message", receiveMessage, false);
function startProviewOnParent() {
//postMessage to parent window to start proview
parent.postMessage({type: 'startProview'},childOrigin);
Expand Down Expand Up @@ -74,8 +73,6 @@
profile: {{profile_id}}
});
window.location.href = '{{root_dir}}local/proview/frame.php?'+params.toString();
} else {
window.addEventListener("message", receiveMessage, false);
}
}
if(!current.match('mod/quiz/(attempt|summary)') && window.self != window.top ) {
Expand Down

0 comments on commit 3f5f56b

Please sign in to comment.