@@ -10686,6 +10686,7 @@ return jQuery;
1068610686})(jQuery,document,"click mousemove mouseup touchmove touchend", "outjsmol");
1068710687// j2sApplet.js BH = Bob Hanson hansonr@stolaf.edu
1068810688
10689+ // BH 2025.10.15 allowing ../../.... at the start of Info.j2sPath
1068910690// BH 2025.08.16 allow loading file:/// from current directory
1069010691// BH 2025.04.20 adds Info.coreAssets:"coreAssets.zip"
1069110692// BH 2025.04.18 enables Info.readyFunction for headless apps
@@ -10876,6 +10877,7 @@ window.J2S = J2S = (function() {
1087610877 // null here means no conversion necessary
1087710878 "INTERNET.TEST" : "https://pubchem.ncbi.nlm.nih.gov",
1087810879 "chemapps.stolaf.edu" : null,
10880+ "zakodium.com":null,
1087910881 "cactus.nci.nih.gov" : null,
1088010882 ".x3dna.org" : null,
1088110883 "rruff.geo.arizona.edu" : null,
@@ -11672,6 +11674,10 @@ if (database == "_" && J2S._serverUrl.indexOf("//your.server.here/") >= 0) {
1167211674 info.type = "POST";
1167311675 info.url = fileName.split("?POST?")[0]
1167411676 info.data = fileName.split("?POST?")[1]
11677+ if (info.data.startsWith('{"')) {
11678+ info.contentType = "application/json";
11679+ info.data = info.data.replaceAll("\n", "\\\\n");
11680+ }
1167511681 } else {
1167611682 !info.type && (info.type = "GET");
1167711683 info.url = fileName;
@@ -13561,10 +13567,15 @@ if (ev.keyCode == 9 && ev.target["data-focuscomponent"]) {
1356113567 if (codePath.indexOf("://") < 0) {
1356213568 var base = document.location.href.split("#")[0]
1356313569 .split("?")[0].split("/");
13564- if (codePath.indexOf("/") == 0)
13570+ if (codePath.indexOf("/") == 0) {
1356513571 base = [ base[0], codePath.substring(1) ];
13566- else
13572+ } else {
13573+ while (codePath.indexOf("../") == 0) {
13574+ base = base.slice(0, base.length - 1);
13575+ codePath = codePath.substring(3);
13576+ }
1356713577 base[base.length - 1] = codePath;
13578+ }
1356813579 codePath = base.join("/");
1356913580 }
1357013581 applet._j2sFullPath = codePath.substring(0, codePath.length - 1);
0 commit comments