Revert "JS code"

This reverts commit 53d268a6b2d41d81fefc6f6f633390910e43da29.
Revert "Revert "JS code""

This reverts commit ec89403e24ca74cbfa69b6fd5e708dc610a6c07a.
Bug

logic mistake
Merge remote-tracking branch 'origin/master'