Edit HTML rules and Add Detect Class