+ mounted: function() {
+ if (assessment.mode != "secure")
+ return;
+ window.addEventListener("keydown", e => {
+ // Ignore F12 (avoid accidental window resize due to devtools)
+ // NOTE: in Chromium at least, fullscreen mode exit with F11 cannot be prevented.
+ // Workaround: disable key at higher level. Possible xbindkey config:
+ // "false"
+ // m:0x10 + c:95
+ // Mod2 + F11
+ if (e.keyCode == 123)
+ e.preventDefault();
+ }, false);
+ window.addEventListener("blur", () => {
+ this.trySendCurrentAnswer();
+ document.location.href= "/noblur";
+ }, false);
+ window.addEventListener("resize", e => {
+ this.trySendCurrentAnswer();
+ document.location.href= "/fullscreen";
+ }, false);
+ },
+ updated: function() {
+ libsRefresh(); //TODO: shouldn't be required: "MathJax" strings on start and assign them to assessment.questions. ...
+ },