Modified newedit.js