@Scorpion Ghost here is a very verbose solutions for everyone to understand easily
const configuration = {
targetIds: ['text', 'change'], // all ids you wanna watch
closeBrowserAfter: 5, // time in seconds before closing browser
rescanAfter: 2, // time in seconds before scanning again...