addEntry javascript complete