hide viewer if same source tag, refactor