Reconstruct the js code