From 67dd34ce6c0b2e9954ac8277910f35674bcd3497 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 25 Feb 2019 15:24:57 +0000 Subject: [PATCH] JAL-3032 JalviewJS2 converts url query parameters to 'applet' args --- src/jalview/bin/JalviewJS2.java | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/jalview/bin/JalviewJS2.java b/src/jalview/bin/JalviewJS2.java index eff5334..0a02a8d 100644 --- a/src/jalview/bin/JalviewJS2.java +++ b/src/jalview/bin/JalviewJS2.java @@ -25,20 +25,23 @@ public class JalviewJS2 * "examples/exampleFeatures.txt"]; */ - - /** - * @j2sNative - * - * thisApplet.__Info.args = - * ["open","examples/jaxbtest.jvx"]; - */ - + /** + * @j2sNative + * + * hr = decodeURI(document.location.href); + * pos = hr.indexOf("?"); + * // set space-delimited query parameters as arguments to Jalview main + * if (pos > 0) + * { + * thisApplet.__Info.args = hr.substring(pos+1).split(" "); + * } + */ } public static void main(String[] args) throws Exception { Jalview.main(args); - showFocusTimer(); + //showFocusTimer(); } protected static int focusTime = 0; -- 1.7.10.2