From: Jim Procter Date: Fri, 2 Oct 2020 08:21:34 +0000 (+0100) Subject: JAL-3762 check if Info.args already defined before overwriting it with URL args.... X-Git-Tag: Release_2_11_2_0~34^2~31^2^2^2~3 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=c2ab85e25d124ad2dc0a6961cd2c5325c27bfa75;p=jalview.git JAL-3762 check if Info.args already defined before overwriting it with URL args. Also stashes URL args at Info.urlargs --- diff --git a/src/jalview/util/Platform.java b/src/jalview/util/Platform.java index d6627c4..cd487cc 100644 --- a/src/jalview/util/Platform.java +++ b/src/jalview/util/Platform.java @@ -602,17 +602,20 @@ public class Platform public static void getURLCommandArguments() { - /** - * Retrieve the first query field as command arguments to Jalview. Include - * only if prior to "?j2s" or "&j2s" or "#". Assign the applet's __Info.args - * element to this value. - * - * @j2sNative var a = - * decodeURI((document.location.href.replace("&","?").split("?j2s")[0] - * + "?").split("?")[1].split("#")[0]); a && - * (J2S.thisApplet.__Info.args = a.split(" ")); - */ - + /** + * Retrieve the first query field as command arguments to Jalview. Include + * only if prior to "?j2s" or "&j2s" or "#". Assign the applet's + * __Info.args element to this value. + * + * @j2sNative var a = + * decodeURI((document.location.href.replace("&","?").split("?j2s")[0] + * + "?").split("?")[1].split("#")[0]); a && (System.out.println("URL arguments detected were "+a) && + * (J2S.thisApplet.__Info.urlargs = a.split(" ")) + * (!!J2S.thisApplet.__Info.args || J2S.thisApplet.__Info.args == "" || J2S.thisApplet.__Info.args == "??") && (J2S.thisApplet.__Info.args = a) && (System.out.println("URL arguments were passed to J2S main."); + */ + } catch (Throwable t) + { + } } /**