updated directives.js