X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2FPlatform.java;h=bb0c1b66784c3fb0f6221557e84496f8ebe88da8;hb=refs%2Fheads%2FJalview-JS%2Fbug%2FJAL-3762_URLparamsOverrideInfoArg;hp=d6627c46e6df84486e0f80a7581664bb37a44714;hpb=dd3701bd1390e976e2564f2def6c77ba8a2f84a8;p=jalview.git diff --git a/src/jalview/util/Platform.java b/src/jalview/util/Platform.java index d6627c4..bb0c1b6 100644 --- a/src/jalview/util/Platform.java +++ b/src/jalview/util/Platform.java @@ -601,18 +601,21 @@ 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(" ")); - */ - + try { + /** + * 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) + { + } } /**