Javascript for modular profile