Simple observer for dom visibility changes