var _favMatchKey = "MyGames_MatchID"; var _favLeagueKey = "MyGames_LeagueID"; var _favTeamKey = "MyGames_TeamID"; var _favCleanKey = "MyGames_NeedClean"; var _maxFavLength = 2600; var Config = {}; Config.getFavMatchIds = function () { let Ids = getCookie(_favMatchKey); return (!Ids ? new Array() : Ids.split(",")); } Config.setFavMatchIds = function (ids) { while (ids.toString().length > _maxFavLength) { ids.splice(0, 1); } let idsStr = ids.join(","); writeShareCookie(_favMatchKey, idsStr, new Date((new Date()).getTime() + 15 * 24 * 3600000)); countFavMatch(); } Config.getFavLeagueIds = function () { let Ids = getCookie(_favLeagueKey); return (!Ids ? new Array() : Ids.split(",")); } Config.setFavLeagueIds = function (ids) { while (ids.toString().length > _maxFavLength) { ids.splice(0, 1); } let idsStr = ids.join(","); writeShareCookie(_favLeagueKey, idsStr, new Date((new Date()).getTime() + 15 * 24 * 3600000)); countFavMatch(); } Config.getFavTeamIds = function () { let Ids = getCookie(_favTeamKey); return (!Ids ? new Array() : Ids.split(",")); } Config.setFavTeamIds = function (ids) { while (ids.toString().length > _maxFavLength) { ids.splice(0, 1); } let idsStr = ids.join(","); writeShareCookie(_favTeamKey, idsStr, new Date((new Date()).getTime() + 15 * 24 * 3600000)); countFavMatch(); } Config.isFavNeedClean = function () { let cl = getCookie(_favCleanKey); if (CheckEmpty(cl) && !CheckEmpty(this.getFavMatchIds())) { return true; } return false; } Config.hasCleanMatchFav = function () { writeShareCookie(_favCleanKey, 1, new Date((new Date()).getTime() + 3 * 24 * 3600000)); } var _soccerInpageVersionCookie = "Soccer_SummaryInpage"; Config.isSummaryInpage = function () { let val = getCookie(_soccerInpageVersionCookie); if (val == 1) { return true; } else { return false; } };