modify mod_materials.js