ui/viewer_perspective/user_location.js
function chessAppIsVisible() {
    const topLevelElementArr = document.getElementsByClassName('ssb-chess-container');

    if (!topLevelElementArr || topLevelElementArr.length <= 0) {
      return false;
    }
    const element = topLevelElementArr[0];

    return document.hasFocus() && isVisible(element);
  }
function chessAppIsVisible() {
    const topLevelElementArr = document.getElementsByClassName('ssb-chess-container');

    if (!topLevelElementArr || topLevelElementArr.length <= 0) {
      return false;
    }
    const element = topLevelElementArr[0];

    return document.hasFocus() && isVisible(element);
  }
function chessAppIsVisible ( ) { const topLevelElementArr = document . getElementsByClassName ( 'ssb-chess-container' ) ; if ( ! topLevelElementArr || topLevelElementArr . length <= 0 ) { return false ; } const element = topLevelElementArr [ 0 ] ; return document . hasFocus ( ) && isVisible ( element ) ; }
Returns true if the user can currently see the chess app, and false otherwise.
The user might be in a different tab in the containing application, for example.
Returns true if the user can currently see the chess app and false otherwise . The user might be in a different tab in the containing application for example .