Init javascript to external file