change ref on javascripts