add two resources to JavaScript