Skip to content

Commit

Permalink
MDL-32388 SCORM: Fix chrome pop-ups
Browse files Browse the repository at this point in the history
  • Loading branch information
danmarsden committed Apr 11, 2012
1 parent 4b3ee4f commit 133e7f3
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions mod/scorm/player.js
@@ -1,4 +1,12 @@
function scorm_openpopup(url,name,options,width,height) {
if (width<=100) {
width = Math.round(screen.availWidth * width / 100);
}
if (height<=100) {
height = Math.round(screen.availHeight * height / 100);
}
options += ",width="+width+",height="+height;

windowobj = window.open(url,name,options);
if (!windowobj) {
return;
Expand All @@ -7,13 +15,6 @@ function scorm_openpopup(url,name,options,width,height) {
// Fullscreen
windowobj.moveTo(0,0);
}
if (width<=100) {
width = Math.round(screen.availWidth * width / 100);
}
if (height<=100) {
height = Math.round(screen.availHeight * height / 100);
}
windowobj.resizeTo(width,height);
windowobj.focus();
return windowobj;
}

0 comments on commit 133e7f3

Please sign in to comment.