tweaks to JavaScript with updateDomElementsByCSSSelector