Tip: Including JavaScript Libraries

Here’s a tip that came up in an email conversation with a beta tester:

>>>Wishes of New Functions:
>>>- Factorial, Combinations and Permutations
>>
>>Here’s a really nice part about NS Basic/App Studio: it is easily
>>extensible. If you find a JavaScript library with these functions, it
>>can be used in your program.
>
>Is there possibility to have universal library with Factorial etc. and
>add this library to code (LoadLibrary, uses, include etc)?

Yes. Here’s how to do it:

HTML
  <script src="somelibrary.js" type="text/javascript"></script>
End HTML

The code in someLibrary.js will become part of your program, and you will be able to call the functions in someLibrary just like you would function in your own program.

Tip: Accelerator Keys

If your system is not showing Accelerator keys on the menus, press the Alt key – they will show up. You can then press your selection, such as F to see the File menu.

Tip: Getting rid of URL bar on Android

1. Add this line of code to Main(). It forces the screen to
reposition, moving the URL bar off the top.

Sub Main()
  setTimeout(window.scrollTo(0,window.innerHeight),100)
End Sub

2. Put this code in your program. It makes the contents of the screen full size.

HTML
  <p><br>
  <p><br>
  <p><br>
  <p><br>
  <p><br>
  <p><br>
  <p><br>
  <p><br>
  <p><br>
  <p><br>
  <p><br>
End HTML

We will be developing a more elegant solution, but this should work for now.