[JS] secure code for code toggler