You can add a piece of code just after the var nsOptions = {...} block to handle the different domains.
Suppose you have three domains pointing to the same website: license1 for domain1.com, license2 for domain2.com, and license3 for domain3.com. Below is the sample code how to apply the three licenses:
Notice the domain names should not include any http:// or www. as the license won't check them. Also, all domain names MUST be in lower case.