modify js document