adjusted the script for attribute changes of page elements