update js/directives.js