#Feature Request 1522, final js code added

Signed-off-by: A V Minhaz <minhazav@gmail.com>