Fixes #3162 : improve javascript for directive modified diff

http://www.rudder-project.org/redmine/issues/3162