charge js code