From fe735dea43dff527734be52f8b28aaba33bd407c Mon Sep 17 00:00:00 2001 From: boxgaming <75969133+boxgaming@users.noreply.github.com> Date: Sat, 3 Jun 2023 15:34:10 -0500 Subject: [PATCH 1/5] disable beforeunload event when in iframe --- qbjs-ide.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/qbjs-ide.js b/qbjs-ide.js index 466abca..3f6e00f 100644 --- a/qbjs-ide.js +++ b/qbjs-ide.js @@ -924,7 +924,17 @@ dropArea.addEventListener("dragover", fileDragOver, false); dropArea.addEventListener("dragenter", fileDragEnter, false); dropArea.addEventListener("dragleave", fileDragLeave, false); -addEventListener("beforeunload", function(e) { - e.preventDefault(); - return e.returnValue = "stop"; -}); \ No newline at end of file +if (!inIframe()) { + addEventListener("beforeunload", function(e) { + e.preventDefault(); + return e.returnValue = "stop"; + }); +} + +function inIframe () { + try { + return window.self !== window.top; + } catch (e) { + return true; + } +} \ No newline at end of file From 3bc5502258e1eff26fad054d636846312a0b1ac8 Mon Sep 17 00:00:00 2001 From: boxgaming <75969133+boxgaming@users.noreply.github.com> Date: Wed, 14 Jun 2023 10:17:25 -0500 Subject: [PATCH 2/5] Fixed Locate bug introduced by new custom font functionality --- qb.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/qb.js b/qb.js index 7529ddf..be8722f 100644 --- a/qb.js +++ b/qb.js @@ -169,9 +169,9 @@ var QB = new function() { _nextFontId = 1000; _font = 16; _fonts = {}; - _fonts[8] = { name: "dosvga", size: "16px", style: "", offset: 3 }; - _fonts[14] = { name: "dosvga", size: "16px", style: "", offset: 3 }; - _fonts[16] = { name: "dosvga", size: "16px", style: "", offset: 3 }; + _fonts[8] = { name: "dosvga", size: "16px", style: "", offset: 3, monospace: true }; + _fonts[14] = { name: "dosvga", size: "16px", style: "", offset: 3, monospace: true }; + _fonts[16] = { name: "dosvga", size: "16px", style: "", offset: 3, monospace: true }; GX.vfsCwd(GX.vfs().rootDirectory()); _fileHandles = {}; _initColorTable(); @@ -558,7 +558,7 @@ var QB = new function() { _fonts[id].monospace = false; } else { - _fonts[id].width = tm.width; + _fonts[id].width = tm.width + 1; _fonts[id].monospace = true; } return id; @@ -1903,6 +1903,7 @@ var QB = new function() { } if (col && col > 0 && col <= _textColumns()) { _locX = col-1; + _lastTextX = _locX * QB.func__FontWidth(); } }; From d5e4fd67405508f23e78ac933f1d8ac5d4891651 Mon Sep 17 00:00:00 2001 From: boxgaming <75969133+boxgaming@users.noreply.github.com> Date: Wed, 14 Jun 2023 10:18:02 -0500 Subject: [PATCH 3/5] Versioning updates --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 15adcd2..8118f55 100644 --- a/index.html +++ b/index.html @@ -120,7 +120,7 @@
QBJS - QBasic for the Web!
-Version: 0.7.0
+Version: 0.7.3
QBJS brings the fun and accessibility of QBasic to the browser.
@@ -140,7 +140,7 @@