Removing code duplication from dnd.js

title says it all