[JS] Checks if tab is in view