/**
* @j2sNative
*
- * // set space-delimited query parameters as arguments to Jalview main
+ * // find first query parameter (if any) that doesn't start with j2s
+ * // and set as space-delimited arguments to Jalview main
* hr = decodeURI(document.location.href);
* pos = hr.indexOf("?");
* if (pos > 0)
* {
- * thisApplet.__Info.args = hr.substring(pos+1).split(" ");
+ * q = hr.substring(pos+1);
+ * args = q.split("&");
+ * for (i = 0 ; i < args.length; i++)
+ * {
+ * arg1 = args[i];
+ * if (!arg1.startsWith("j2s"))
+ * {
+ * thisApplet.__Info.args = arg1.split(" ");
+ * break;
+ * }
+ * }
* }
*/
public static AlignFrame currentAlignFrame;
-//BH 2019.01.25 moved to Platform
-///**
-// * Answers true if Jalview is running as Javascript, else false. The value is
-// * set at compile time.
-// *
-// * @return
-// */
-//public static boolean isJS()
-//{
-// return /** @j2sNative true || */
-// false;
-//}
-
static
{
if (!Platform.isJS())
{ // BH 2018
- // grab all the rights we can the JVM
- Policy.setPolicy(new Policy()
- {
- @Override
- public PermissionCollection getPermissions(CodeSource codesource)
- {
- Permissions perms = new Permissions();
- perms.add(new AllPermission());
- return (perms);
- }
-
- @Override
- public void refresh()
- {
- }
- });
-
+ // grab all the rights we can for the JVM
+ Policy.setPolicy(new Policy()
+ {
+ @Override
+ public PermissionCollection getPermissions(CodeSource codesource)
+ {
+ Permissions perms = new Permissions();
+ perms.add(new AllPermission());
+ return (perms);
+ }
+
+ @Override
+ public void refresh()
+ {
+ }
+ });
}
}