code: function determineSelectedBranch() {
    var branch = 'stable', path = window.location.pathname;
    // path is like /en/<branch>/<lang>/build/ -> extract 'lang'
    // split[0] is an '' because the path starts with the separator
    branch = path.split('/')[2];
    return branch;
  }
docs: Analyzes the URL of the current page to find out what the selected GitHub branch is. It's usually
  part of the location path. The code needs to distinguish between running MkDocs standalone
  and docs served from RTD. If no valid branch could be determined 'dev' returned.
  
  @returns GitHub branch name