Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-32388 SCORM: Fix chrome pop-ups

  • Loading branch information...
commit 133e7f3dd8f70480d5b1a76ad74606c6d00a9c1f 1 parent 4b3ee4f
@danmarsden danmarsden authored
Showing with 8 additions and 7 deletions.
  1. +8 −7 mod/scorm/player.js
View
15 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;
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.