Skip to content

Commit

Permalink
fix toggle no work due an window.opener.document access denied
Browse files Browse the repository at this point in the history
Prevent for continue to interpret javascript if stopping with
Error: Permission denied to access property "document"
Maybe rule browser "Same-origin policy" or unexisting object.

On course sidebar, toggle unwork & print "toggle" in place of +
for simply see this (js) error, go to login.php ;-)

this function is called in jscript/ATutor_js.php on line 381
ATutor.users.preferences.setStyles()
  • Loading branch information
sudwebdesign committed Sep 28, 2016
1 parent ed9e614 commit 3aab782
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jscripts/ATutor.js
Expand Up @@ -579,7 +579,7 @@ ATutor.users.preferences = ATutor.users.preferences || {};

jQuery('#pref_style').replaceWith(pref_style);
if (window.opener) {
jQuery('#pref_style', window.opener.document).replaceWith(pref_style);
try {jQuery('#pref_style', window.opener.document).replaceWith(pref_style);}catch(err){}finally{}
}
};

Expand Down

0 comments on commit 3aab782

Please sign in to comment.