var _rollbarConfig = { accessToken: "3458b9783c014b97b33a80af9523d38a", captureUncaught: true, captureUnhandledRejections: true, ignoredMessages: ["ResizeObserver loop limit exceeded"], payload: { environment: "production", person: { id: getCurrentUserID(), username: getCookie("fw_user_slug") } } }; // Rollbar Snippet !function(r){function e(n){if(o[n])return o[n].exports;var t=o[n]={exports:{},id:n,loaded:!1};return r[n].call(t.exports,t,t.exports,e),t.loaded=!0,t.exports}var o={};return e.m=r,e.c=o,e.p="",e(0)}([function(r,e,o){"use strict";var n=o(1),t=o(4);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdnjs.cloudflare.com/ajax/libs/rollbar.js/2.4.2/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,e,o){"use strict";function n(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}function t(r,e){this.options=r,this._rollbarOldOnError=null;var o=s++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}function a(r,e){if(r){var o=e.globalAlias||"Rollbar";if("object"==typeof r[o])return r[o];r._rollbarShims={},r._rollbarWrappedError=null;var t=new p(e);return n(function(){e.captureUncaught&&(t._rollbarOldOnError=r.onerror,i.captureUncaughtExceptions(r,t,!0),i.wrapGlobals(r,t,!0)),e.captureUnhandledRejections&&i.captureUnhandledRejections(r,t,!0);var n=e.autoInstrument;return e.enabled!==!1&&(void 0===n||n===!0||"object"==typeof n&&n.network)&&r.addEventListener&&(r.addEventListener("load",t.captureLoad.bind(t)),r.addEventListener("DOMContentLoaded",t.captureDomContentLoaded.bind(t))),r[o]=t,t})()}}function l(r){return n(function(){var e=this,o=Array.prototype.slice.call(arguments,0),n={shim:e,method:r,args:o,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)})}var i=o(2),s=0,d=o(3),c=function(r,e){return new t(r,e)},p=d.bind(null,c);t.prototype.loadFull=function(r,e,o,t,a){var l=function(){var e;if(void 0===r._rollbarDidLoad){e=new Error("rollbar.js did not load");for(var o,n,t,l,i=0;o=r._rollbarShims[i++];)for(o=o.messages||[];n=o.shift();)for(t=n.args||[],i=0;i function userLoginEvents() { var newUser = getCookie("fw_new_user"); var loginOrigin = getCookie("fw_login_origin"); var userCountry = getCookie("country_code"); var userID = getCookie("fw_ID"); var loginPage = window.location.href; var userLoginProvider = getCookie("fw_user_login_source"); var isDesktop = "1"; var sportName = "Cricket" var payload = { "login_origin": loginOrigin, "user_country": userCountry, "login_page": loginPage, "login_provider": userLoginProvider } if (isDesktop) { payload["Device"] = "Desktop"; } else { payload["Device"] = "Mobile"; } if (sportName) { payload["user_sport"] = sportName; } else { payload["user_sport"] = "N/A" } if (newUser && loginOrigin) { if (!userLoginProvider) { Rollbar.error("Misssing User_Login_provider Value"); } gtag("event", "New_sign_up", payload); unsetCookie("fw_new_user"); unsetCookie("fw_login_origin"); unsetCookie("fw_user_login_source"); } else if(!newUser && loginOrigin && userID) { if (!userLoginProvider) { Rollbar.error("Misssing User_Login_provider Value"); } gtag("event", "Sign_in", payload); unsetCookie("fw_login_origin"); unsetCookie("fw_user_login_source"); } } window.addEventListener("load", function() { userLoginEvents(); }); document.addEventListener("mousemove", function (event) { //update time elements updateTimeStringsToFormatTimeSince(); var elements = $all('[data-category]'); for (var i = 0; i < elements.length; i++) { if (elements[i].hasAttribute("has-click-listener")) { // skip adding duplicate event listeners return; } elements[i].setAttribute("has-click-listener", "true") elements[i].addEventListener("click", function () { var action = this.getAttribute('data-action'); var label = this.getAttribute('data-label'); ga_event_click(action, label); }); } }); setTimeout(function(){ updateTimeStringsToFormatTimeSince(); }, 1500); function getCurrentUserID() { return getCookie("fw_ID"); } function getName() { return decodeURIComponent(getCookie("fw_name")); } function getFirstName() { var name = getCookie("fw_name"); return decodeURIComponent(name).split(' ')[0]; } function askForLoginIfNotLoggedIn() { if (!getCookie('fw_ID')) { // TODO: use the generic function for this, like "allowWhenLoggedIn()" window.location = ('/login?after-login=' + document.location.href ); } } var capabilitiesArray =[]; function removeDomElement(ele) { if (ele) { ele.parentNode.removeChild(ele); } } function checkUserCapabilities() { var capabilitiesAPI = 'https://a-login.sportskeeda.com/en/user/capabilities'; return pureJSAjaxGetWithPromise(capabilitiesAPI).then(function(res) { var data = JSON.parse(res); return new Promise(function(resolve, reject) { if(data.indexOf(1) > -1) { capabilitiesArray.push('superAdmin'); } if(data.indexOf(6) > -1) { capabilitiesArray.push('revShare'); } else { capabilitiesArray.push('noRevShare'); } if(data.indexOf(5) == -1) { capabilitiesArray.push("notSuperEditor"); } if(data.indexOf(3) == -1) { capabilitiesArray.push("notMenuEditor"); } if(data.indexOf(9) == -1) { capabilitiesArray.push("notTaxonomy"); } if(data.indexOf(10) == -1) { capabilitiesArray.push("notTagPages"); } if(data.indexOf(11) == -1) { capabilitiesArray.push("notOnlineEditor"); } if(data.indexOf(12) > -1) { capabilitiesArray.push("appNotificationAdmin"); } if(data.indexOf(14) == -1) { capabilitiesArray.push("notNewAffilate"); } if(data.indexOf(13) > -1) { capabilitiesArray.push("canPostContent"); } if(data.indexOf(2) > -1) { capabilitiesArray.push("canModerate"); } // checkUserCapabilities if(capabilitiesArray.indexOf("revShare") > -1 || capabilitiesArray.indexOf("canPostContent") > -1) { resolve(capabilitiesArray); } else { reject(capabilitiesArray); } }); }) } function hasUserAcceptedTerms(capabilitiesArray) { var acceptedTermsAPI = 'https://a-login.sportskeeda.com/en/user/accepted-terms'; return pureJSAjaxGetWithPromise(acceptedTermsAPI).then(function(res) { return new Promise(function(resolve, reject) { var data = JSON.parse(res); if(data.accepted_terms === false) { capabilitiesArray.push('notAcceptedTerms'); reject(capabilitiesArray); } else if(capabilitiesArray.length > 0) { reject(capabilitiesArray); } else { resolve(true); } }); }) } function debounceGeneric(func, wait, immediate) { var timeout; return function() { var context = this, args = arguments; var later = function() { timeout = null; if (!immediate) func.apply(context, args); }; var callNow = immediate && !timeout; clearTimeout(timeout); timeout = setTimeout(later, wait); if (callNow) func.apply(context, args); }; }; function getUrlParamsValue(name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"); var results = regex.exec(location.search); return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); } function isAuthorVerified(author_title) { if (author_title == 'EXPERT COLUMNIST' || author_title == 'OFFICIAL' || author_title == 'EXPERT') { return true; } else { return false; } } /** * @param: null * Comment: Check if the cookie exist otherwise set it from the request */ function checkAndSetUserCity() { var userCity = getCookie("user_city"); var citiesArray = ["Hyderabad", "Pune", "Chennai", "Delhi", "Bengaluru", "Mumbai", "Ahmedabad", "Kolkata", "Jaipur", "Vishakapatnam"]; var requiredCityExist = false; if (userCity == "" || userCity == null) { var xmlHttp = new XMLHttpRequest(); xmlHttp.open( "GET", "https://a-login.sportskeeda.com/visitor/city", false ); // false for synchronous request xmlHttp.send( null ); var result = JSON.parse(xmlHttp.responseText); if (result.city != "undefined") { userCity = result.city; var cookieExpire = new Date(); cookieExpire.setDate(cookieExpire.getDate() + 7); // Expiry after 7 days setCookie("user_city", userCity, cookieExpire); } } if (citiesArray.includes(userCity)) { requiredCityExist = true; } return requiredCityExist; } function checkAndSetUserState() { var userState = getCookie("user_state"); if (userState == "" || userState == null) { var xmlHttp = new XMLHttpRequest(); xmlHttp.open( "GET", "https://a-login.sportskeeda.com/visitor/state", false ); // false for synchronous request xmlHttp.send( null ); var result = JSON.parse(xmlHttp.responseText); if (result.city != "undefined") { userState = result.state; var cookieExpire = new Date(); cookieExpire.setDate(cookieExpire.getDate() + 7); // Expiry after 7 days setCookie("user_state", userState, cookieExpire); } } return userState; } !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t){!function(){var e=getCookie("unique_user_id");if(e)return e;var t,r=getCookie("fw_user_slug"),n=r||((t=(new Date).getTime()).toString(32)+"-xxxxxxxx-xxxx-6xxx-yxxx-xxxxxxxxxxx").replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?r:3&r|8).toString(16)})),o=new Date;o.setMonth(o.getMonth()+12),setCookie("unique_user_id",n,o)}()}]);
Create
Notifications
Cricketer turned Smuggler | Famous Cricketers who choose odd and Shocking careers 
Cricketer turned Smuggler | Famous Cricketers who choose odd and Shocking careers

Channels

Comments