[]
“WHO FOR THE WHAT”: Trump’s ‘Justice For All’ song for Jan 6 rioters reaches #1 on iTunes, sparking hilarious reactions refreshDate)) || (!!!refreshCookie && userSlug)) { refreshUserCookies(); } function refreshUserCookies() { pureJSAjaxGetWithCredentialsFlag(‘https://a-login.sportskeeda.com/en/login/refresh-token’, function(res) { console.log(res); }, function failed() { console.error(“Failed to refresh tokens”); }, true); } function getCookie(cname) { var name = cname + “=”; var ca = document.cookie.split(‘;’); for(var i = 0; i 0) { attributes.forEach(function(attribute) { script.setAttribute(attribute.key, attribute.value); }); } function loadScript() { if (attachTo) { attachTo.appendChild(script); } else { document.head.appendChild(script); } } var scriptLoaded = false; function loadScriptOnInteraction() { if (scriptLoaded) return; scriptLoaded = true; loadScript(); } if (onUserInteraction) { document.addEventListener(“scroll”, loadScriptOnInteraction, { once: true }); document.addEventListener(“mousemove”, loadScriptOnInteraction, { once: true }); document.addEventListener(“touchmove”, loadScriptOnInteraction, { once: true }); } else { loadScript(); } }); } ]]> ‘, ‘”‘: ‘”‘, “‘”: ‘'’ }; return text.replace(/[&”‘]/g, function(m) { return map[m]; }); } function extendedEncodeURIComponent(str) { return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { return ‘%’ + c.charCodeAt(0).toString(16); }); } ]]> = 12) { amOrPm = “PM”; } if (hour > 12) { hour = hour – 12; } return hour + “:” + minute + ” ” + amOrPm; } function getShortDayNames() { return [‘Sun’, ‘Mon’, ‘Tue’, ‘Wed’, ‘Thu’, ‘Fri’, ‘Sat’]; } function getFullDayNames() { return [‘Sunday’, ‘Monday’, ‘Tuesday’, ‘Wednesday’, ‘Thursday’, ‘Friday’, ‘Saturday’]; } function getFormattedDate(isoDatetime) { var currentDate = new Date(); var matchDate = new Date(isoDatetime); var tomorrowDate = new Date(new Date().getTime() + 24 * 60 * 60 * 1000); var monthNames = getShortMonthNames(); var dayNames = getShortDayNames(); var currentDateString = currentDate.getDate() + ‘-‘ + currentDate.getMonth() + ‘-‘ + currentDate.getFullYear(); var matchDateString = matchDate.getDate() + ‘-‘ + matchDate.getMonth() + ‘-‘ + matchDate.getFullYear(); var tomorrowDateString = tomorrowDate.getDate() + ‘-‘ + tomorrowDate.getMonth() + ‘-‘ + tomorrowDate.getFullYear(); var localTime = matchDate.toLocaleTimeString().replace(/:dds/, ” “); var timeZone = matchDate.toString().match(/((.*))/).pop(); return dayNames[matchDate.getDay()] + “, ” + matchDate.getDate() + ” ” + monthNames[matchDate.getMonth()] + ” ” + matchDate.getFullYear() + “, ” + localTime + ” ” + timeZone; } function timeSince(isoDateString) { var date = new Date(isoDateString); var monthNames = [“Jan”, “Feb”, “Mar”, “Apr”, “May”, “Jun”, “Jul”, “Aug”, “Sep”, “Oct”, “Nov”, “Dec”]; var seconds = Math.floor((new Date() – date) / 1000); var interval = Math.floor(seconds / 86400); if(interval > 6) { return date.getDate() + ” ” + monthNames[date.getMonth()] + “, ” + date.getFullYear(); } if (interval > 1) { return interval + ” days ago”; } if(interval === 1) { return “1 day ago”; } interval = Math.floor(seconds / 3600); if (interval === 1) { return interval + ” hr ago”; } if (interval > 1) { return interval + ” hrs ago”; } interval = Math.floor(seconds / 60); if (interval === 1) { return “1 min ago”; } if (interval > 1) { return interval + ” mins ago”; } return Math.floor(seconds) + ” seconds ago”; } function updateTimeStringsToFormatTimeSince() { var isPendingContent = window.location.hash === ‘#pending’; var timeElements = $all(‘.keeda-time-since’); for (var i = 0; i < timeElements.length; i++) { var isoDateString = timeElements[i].getAttribute('data-iso-string'); var timeSinceVal = timeSince(isoDateString); if(timeElements[i].classList.contains("author-post-time") && !timeSinceVal.includes("ago")) { timeElements[i].innerHTML = ""; } else if (isPendingContent) { timeElements[i].innerHTML = (timeSinceVal + "
(” + isoDateString.split(“T”)[0] + “)”); } else { timeElements[i].innerHTML = timeSinceVal; } } } function getDateObjectInIST() { var currentTime = new Date(); var currentOffset = currentTime.getTimezoneOffset(); var ISTOffset = 330; // IST offset UTC +5:30 var ISTTime = new Date(currentTime.getTime() + (ISTOffset + currentOffset) * 60000); return ISTTime; } function getDateInYYYYMMDD(date) { var d = !date ? getDateObjectInIST() : date; var month = ” + (d.getMonth() + 1), day = ” + d.getDate(), year = d.getFullYear(); if (month.length < 2) month = '0' + month; if (day.length = 12 ? 'pm' : 'am'; hours = hours % 12; hours = hours ? hours : 12; minutes = minutes < 10 ? '0'+minutes : minutes; var strTime = hours + ':' + minutes + ' ' + ampm; return strTime; } function getTimeDiffInDaysHoursMinutes(timeInMilliseconds) { var diffDays = Math.floor(timeInMilliseconds / 86400000); // difference in days var diffHrs = Math.floor((timeInMilliseconds % 86400000) / 3600000); // difference in hours var diffMins = Math.round(((timeInMilliseconds % 86400000) % 3600000) / 60000); // difference in minutes var result = []; if (diffDays) { result.push(diffDays + " day(s)"); } if (diffHrs) { result.push(diffHrs + " hour(s)"); } if (diffMins) { result.push(diffMins + " minute(s)"); } if (!result.length) { result.push(Math.round(timeInMilliseconds / 1000) + " second(s)"); } return result; } function getTimeAndDate(isoDateString) { var isoDateString = new Date(isoDateString); var monthNames = getShortMonthNames(); var weekNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; var hours = isoDateString.getHours(); if (hours <= 9) { hours = "0" + hours; } var minutes = isoDateString.getMinutes(); if (minutes 3 && number -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(16) == -1) { capabilitiesArray.push(“notWikiContributor”); } if(data.indexOf(13) > -1) { capabilitiesArray.push(“canPostContent”); } if(data.indexOf(2) > -1) { capabilitiesArray.push(“canModerate”); } if(data.indexOf(17) > -1) { capabilitiesArray.push(“wikiAdmin”); } // checkUserCapabilities if(capabilitiesArray.indexOf(“revShare”) > -1 || capabilitiesArray.indexOf(“canPostContent”) > -1) { resolve(capabilitiesArray); } else { reject(capabilitiesArray); } if (data.indexOf(18) == -1) { capabilitiesArray.push(“notTagPageAuthor”); } if (data.indexOf(19) == -1) { capabilitiesArray.push(“notTagPageEditor”); } }); }) } 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; } var userId = getCookie(“fw_ID”); var REACTION_IMAGES = { like: STATIC_URL + “/post-reactions/reaction-like.svg”, excited: STATIC_URL + “/post-reactions/reaction-excited.svg”, happy: STATIC_URL + “/post-reactions/reaction-happy.svg”, anxious: STATIC_URL + “/post-reactions/reaction-anxious.svg”, angry: STATIC_URL + “/post-reactions/reaction-angry.svg”, sad: STATIC_URL + “/post-reactions/reaction-sad.svg”, default: STATIC_URL + “/skm/assets/feed/ic-like-gray.svg”, }; var REACTION_TEXT = { like: “Liked”, excited: “Excited”, happy: “Happy”, anxious: “Anxious”, angry: “Angry”, sad: “Sad”, default: “Like”, }; function fetchAndUpdateUserLikesForPosts(postIdsArray) { if (postIdsArray.length < 1) return; if (!userId) return; var postIdsParam = postIdsArray.join(","); pureJSAjaxGet( GOTHAM_URL_HA_FRONTEND + "/posts/reactedBy?post_ids=" + postIdsParam, syncPostLikesInFeed, {}, function (err) {}, true ); } function syncPostLikesInFeed(response) { if (!userId) return; try { response = JSON.parse(response); } catch (e) { return; } for (var i = 0; i delay){ prev = now; return func.apply(context, args); } } } function generateRandomString() { var allCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; var base = allCharacters.split(''); var randomstr = ""; for (var i=0; i<30; i++) { randomstr += base[Math.random()*base.length|0]; } return randomstr; } function getImageWidthTransformedURL(imageURL, width) { if (!imageURL) { return ""; } if (isNaN(width)) { return imageURL; } imageURL = imageURL.replace("http://", "https://"); try { var imageURI = new URL(imageURL); imageURI.searchParams.set("w", width); return imageURI.toString(); } catch (e) { console.error("Error while transforming image width"); return ""; } } function getImageHeightTransformedURL(imageURL, height) { if (!imageURL) { return ""; } if (isNaN(height)) { return imageURL; } imageURL = imageURL.replace("http://", "https://"); try { var imageURI = new URL(imageURL); imageURI.searchParams.set("h", height); return imageURI.toString(); } catch (e) { console.error("Error while transforming image height"); return ""; } } function getNumFormat(num) { var num_format = Math.round(num); if (num >= 1000 && num = 1000000 && num = 1000000000) { num_format = (Math.round(num) / 1000000000).toFixed(1) + ‘B’; } return num_format; } function isOverflow(element) { if (!element) return false; return element.scrollWidth > element.clientWidth; } function isFacebookApp() { if(!navigator) { return false; } var ua = navigator.userAgent || navigator.vendor || window.opera; return (ua.indexOf(“FBAN”) > -1) || (ua.indexOf(“FBAV”) > -1); } /** * @param: Integer timestamp * @return: String * Comment: Get the difference b/w the timestamp and current time and return user friendly date time */ function getFriendlyTimeDifferenceFromNow(timestamp) { // takes timestamp in microseconds var seconds = (Date.now() / 1000) – (timestamp / 1000); if (seconds > 31536000) { // 31536000 = 60s * 60m * 24h * 365d = one year var years = Math.round(seconds / 31536000); seconds = seconds % 31536000; if (seconds > 2592000) { // 2592000 = 60s * 60m * 24h * 30d = one month var months = Math.round(seconds / 2592000); return years + ” yr ” + months + ” mn”; } return years + ” yr”; } if (seconds > 2592000) { var months = Math.round(seconds / 2592000); seconds = seconds % 2592000; if (seconds > 86400) { var days = Math.round(seconds / 86400); return months + ” mn ” + days + ” d”; } return months + ” mn”; } if (seconds > 86400) { // 3600 * 24 = one day return Math.round(seconds / 86400) + ” d”; } else if(seconds > 3600) { // One hour return Math.round(seconds / 3600 ) + ” hr”; } else { // Difference in minutes return Math.round(seconds / 60 ) + ” min”; } } function isInViewport(el) { var rect = el.getBoundingClientRect(); return ( rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right 0) { gtag( 'set' , { 'dimension10' : loggedInUserID } ); } gtag( 'set' , { 'dimension11' : "PrimisPlayerdesktop" } ); var uniqueBrowserIdCookie = getCookie('unique_browser_id'); if (uniqueBrowserIdCookie) { gtag( 'set' , 'user_properties', { 'browser_id' : uniqueBrowserIdCookie } ); } gaSubSet = { 'send_to': gaID }; var sessionCookieValue = getCookie("keeda-session-uuid"); if (sessionCookieValue) { gaSubSet['keeda-session-uuid'] = sessionCookieValue; } var userID = getCookie("fw_ID"); try { var commonGASubSetKeys = JSON.parse('{"common_tags":{"page_type":"","sport":"","loggedIn_user_id":""},"article_page_tags":{"author_slug":"","published_date":"","tax-list":""},"non_amp_tags":{"SEO_article":"","Adaptive_Tag":""},"cmc_page_tags":{"match_id":"","commentary":"","match_status":"","start_time":"","end_time":""}}' || '{}'); if (Object.keys(commonGASubSetKeys).length > 0) { var commonTags = commonGASubSetKeys[“common_tags”]; gaSubSet[“page_type”] = ‘Articlepage’; if ((“SK POP”).length > 0) { gaSubSet[“sport”] = ‘SK POP’; } if ((“PrimisPlayer”).length > 0) { gaSubSet[“sk_version”] = “PrimisPlayer”; } if (userID > 0) { gaSubSet[“loggedIn_user_id”] = userID; } var articlePageTags = commonGASubSetKeys[“article_page_tags”]; gaSubSet[“author_slug”] = ‘niralifin-t8ydv’; gaSubSet[“published_date”] = ‘2023-03’; gaSubSet[“tax-list”] = ‘,pop-culture,news,twiter-reactions,esports-socials,trending,’; var postId = 1429161; if (postId) { gaSubSet[“post_id”] = postId; } var postSection = “News”; if (postSection) { gaSubSet[“post_section”] = postSection; } var nonAMPTags = commonGASubSetKeys[“non_amp_tags”]; for (var tagKey in nonAMPTags) { if (tagKey == “SEO_article” && ((“”).length > 0)) { gtag( ‘set’ , { ‘dimension4’ : “true” } ); gaSubSet[tagKey] = “https://www.sportskeeda.com/pop-culture/news-who-for-the-what-trump-s-justice-for-all-song-jan-6-rioters-reaches-1-itunes-sparking-hilarious-reactions”; } else if (tagKey == “Adaptive_Tag” && (“article”).length > 0 && “article” == ‘adaptive_page’) { gaSubSet[tagKey] = ”; } else { gtag( ‘set’ , { ‘dimension4’ : “false” } ); } } } } catch(e) { console.log(e); } var userAdoptionType = getUserAdoptionType(gaSubSet[“page_type”]); if (userAdoptionType) { gaSubSet[“userAdoptionType”] = userAdoptionType; } if (!isVideoPage && “1”) { gtag(‘event’, ‘page_view’, gaSubSet); } if (!isVideoPage && “”) { if(location.search.indexOf(“key1=opera”) > -1) { gtag(‘event’, ‘page_view’, { ‘send_to’: gaID, ‘page_path’: location.pathname + location.search }); } else { if(sessionKey1CookieVal && sessionKey1CookieVal.indexOf(“opera”) > -1) { gtag(‘event’, ‘page_view’, { ‘send_to’: gaID, ‘page_path’: location.pathname + location.search + (location.search ? “&” : “?”) + “key1=” + sessionKey1CookieVal }); } else { gtag(‘event’, ‘page_view’, gaSubSet); } } } } gtag(‘js’, new Date()); gtag(‘config’, GA_ID, { send_page_view: false }); window.addEventListener(“scroll”, loadGA.bind(this, GA_ID)); window.addEventListener(“click”, loadGA.bind(this, GA_ID)); window.addEventListener(“mousemove”, loadGA.bind(this, GA_ID)); if(GA4_ID) { gtag(‘config’, GA4_ID, { send_page_view: false }); window.addEventListener(“scroll”, loadGA.bind(this, GA4_ID)); window.addEventListener(“click”, loadGA.bind(this, GA4_ID)); window.addEventListener(“mousemove”, loadGA.bind(this, GA4_ID)); } if (getCookie(“gdpr”) == ‘true’) { window[‘gtag_enable_tcf_support’] = true; } if(location.search.indexOf(“opera”) > -1 || sessionKey1CookieVal.indexOf(“opera”) > -1 || location.pathname.indexOf(“third-party/”) > -1 || location.hostname.includes(“opera”)) { loadGA(GA_ID); if (GA4_ID) { loadGA(GA4_ID); } } var webVitalsLoaded = false; function sendToGoogleAnalytics(metric) { gtag(‘event’, metric.name, { metric_value: metric.value, sk_version: “PrimisPlayer”, pageType: pageType }); } //Code is executed only on .1% of the pages if(Math.floor(Math.random() * 100) = 0) { function loadWebVitals() { if(!true) { return; } if (webVitalsLoaded) { return; } var webVitalsScript = ‘https://unpkg.com/web-vitals/dist/web-vitals.iife.js’; loadScriptAsync(webVitalsScript, function() { webVitals.getCLS(sendToGoogleAnalytics, true); webVitals.getFID(sendToGoogleAnalytics); webVitals.getLCP(sendToGoogleAnalytics, true); }); webVitalsLoaded = true; } window.addEventListener(“scroll”, loadWebVitals); window.addEventListener(“click”, loadWebVitals); window.addEventListener(“mousemove”, loadWebVitals); } ]]> 0&&(_=_+o-1),o+=t[a].length;var u=f[_];for(n=0;n{f.push(“-“+e);for(var t=0;t{d.push(n+e)}))}})),{short:f,full:d}}(g,y,m,b,z,w,x);k&&(E.short=[]);var T=[];return o&&o.length&&T.push(function(e){var t=e;(“fluid”===e||”number”==typeof t[0]&&”number”==typeof t[1])&&(t=[e]);var n=[],r=1e5,i=1,o=1e5,a=1;for(var _ in t)if(“fluid”===t[_])n.push(t[_]);else{var s=t[_][0],g=t[_][1];si&&(i=s),ga&&(a=g),n.push(s+”x”+g)}n.sort(((e,t)=>e
Trumps song with J6 Prison Choir sparks memefest online (Image via Getty Images, Twitter/@DM3710Liberty)
Former US President Donald Trump released a charity single titled Justice For All on Friday, March 10, 2023. The single was released in collaboration with a choir of men who are being held in a Washington DC prison for riots that took place at the US Capitol on January 6, 2021.
The song features an alternate between the J6 Prison Choir, which has 20 men singing the national anthem, The Star-Spangled Banner, and Trump reciting the Pledge of Allegiance. It ends with the prisoners chanting, “U-S-A!”
The song was trending on iTunes and soon crossed Miley Cyrus‘s Flowers to reach the #1 spot on the music streaming platform.
As news of Justice For All reaching the top spot spread, internet users were left stunned, with one person even commenting:
Flowers, others claimed “society has failed” them.
A few Twitterati called out the rioters stating that their sentence was justice being served.
police officer at the Capitol.
On January 6, 2021, following Joe Biden’s presidential victory, Trump called the election “rigged” and told his supporters to “fight like h*ll” to block Biden’s certification. A mob then infamously attacked the US Capitol, leading to nine deaths and hundreds of convictions.
It was reported that a video was in production which would have footage from the riots and clips of Trump “performing patriotic acts during his presidency.” It is set to debut on far-right activist Steve Bannon’s podcast, War Room.
While the former president recorded his parts of the song at his home in Mar-a-Lago a few weeks ago, the imprisoned men recorded theirs over a jailhouse phone. An unidentified major recording artist reportedly produced the song that runs 2 minutes and 20 seconds long.
The song doesn’t come as a surprise as the former president has always expressed sympathy for the rioters, frequently claiming that they were facing “unfair treatment.” However, many have strongly criticized the project.
Trump is set to deliver a speech on Saturday afternoon at the Conservative Political Action Conference in DC.
1) { var savedOptionCount = localStorageValues[1]; resultData = localStorageValues[0]; if (savedOptionCount == pollData[resultData+”_count”]) { pollData[resultData + “_count”] += 1; } } renderPollWidget(pollData, resultData, false); } function getPollData() { } getPollData(); function onPollResponseSuccess(selectedOption) { setLocalStorageData(“article_poll_1429161”, selectedOption + “__” + pollDataDefault[selectedOption+”_count”]); } function onPollResponseFail(selectedOption) { console.log(‘Poll response fail’); var pollData = null; var pollOptions = $(“#poll-options”); var pollCount = $(“#poll-count”); var pollOptionsDom = ”; var totalVotes = Number(pollData.option1_count + pollData.option2_count + pollData.option3_count + pollData.option4_count); var optionsArray = [‘option1’, ‘option2’]; if (pollData.option3 !== “” && pollData.option3 !== null) { optionsArray.push(‘option3’) } if (pollData.option4 !== “” && pollData.option4 !== null) { optionsArray.push(‘option4’) } optionsArray.forEach(function(option, index) { var clickHandler = ‘onclick=”answerPoll(event, ” + option + ”)”‘; $(‘#’+option).classList.remove(‘poll-option-answered’); if(option === selectedOption) { $(‘#’+option).classList.remove(‘poll-option-selected’); } pollOptionsDom += ”; pollOptionsDom += ‘
‘ + pollData[option] + ”; pollOptionsDom += ‘]]>
‘; }); pollOptions.innerHTML = pollOptionsDom; pollCount.innerHTML = totalVotes + ‘ votes’; } function updatePollCountOnAnswer(selectedOption) { var pollData = pollDataDefault; renderPollWidget(pollData, selectedOption, true); } function renderPollWidget(pollData, selectedOption, isAnswered) { if (!pollData) return; pollData.option1_count = pollData.option1_count || 0; pollData.option2_count = pollData.option2_count || 0; pollData.option3_count = pollData.option3_count || 0; pollData.option4_count = pollData.option4_count || 0; if (isAnswered) { if (selectedOption == “option1”) pollData.option1_count += 1; if (selectedOption == “option2”) pollData.option2_count += 1; if (selectedOption == “option3”) pollData.option3_count += 1; if (selectedOption == “option4”) pollData.option4_count += 1; } var totalVotes = Number(pollData.option1_count + pollData.option2_count + pollData.option3_count + pollData.option4_count); if (totalVotes && !Number.isNaN(totalVotes)) { var option1Percent = pollData.option1_count / totalVotes * 100; var option2Percent = pollData.option2_count / totalVotes * 100; var option3Percent = pollData.option3_count / totalVotes * 100; var option4Percent = pollData.option4_count / totalVotes * 100; var optionPercentages = [option1Percent, option2Percent, option3Percent, option4Percent]; var pollOptions = $(“#poll-options”); var pollCount = $(“#poll-count”); var pollOptionsDom = ”; var optionsArray = [‘option1’, ‘option2’]; if (pollData.option3 !== “” && pollData.option3 !== null) { optionsArray.push(‘option3’) } if (pollData.option4 !== “” && pollData.option4 !== null) { optionsArray.push(‘option4’) } optionsArray.forEach(function (option, index) { var clickHandler = ‘onclick=”answerPoll(event, ” + option + ”)”‘; var optionClass = [‘poll-option’]; if (selectedOption) { optionClass.push(‘poll-option-answered’); clickHandler = ”; } if (selectedOption === option) { optionClass.push(‘poll-option-selected’); } pollOptionsDom += ”; if (selectedOption) { var widthPercentage = optionPercentages[index] < 5 && optionPercentages[index] != 0 ? 5 : optionPercentages[index]; if (selectedOption === option) { if (widthPercentage > 97) { pollOptionsDom += ”; } else { pollOptionsDom += ”; } } else { if (widthPercentage > 97) { pollOptionsDom += ”; } else { pollOptionsDom += ”; } } } pollOptionsDom += ‘
‘ + pollData[option] + ‘
‘; if (selectedOption) { pollOptionsDom += ‘
‘ + Math.round(optionPercentages[index]) + ‘%
‘; } pollOptionsDom += ”; }); pollOptions.innerHTML = pollOptionsDom; pollCount.innerHTML = totalVotes + ‘ votes’; if (totalVotes > 10) { pollCount.classList.remove(“hidden”); } trackArticlePollImpression(pollData); } } function answerPoll(e, selectedOption) { e.preventDefault(); try{ permutive.track(‘PollResponse’,{ “pagetype”: “Articlepage”, “category”: “SK POP”, “answer”: { “text”: e.target.textContent }, “question”: { “text”: pollDataDefault.question } }); } catch (err) { console.log(err); } updatePollCountOnAnswer(selectedOption); var isDesktop = “1”; var gaPayload = { “question” : pollDataDefault.question, “answer” : e.target.textContent, “answer_option” : selectedOption.replace(“option”, “Option “), “category”: “SK POP”, “page_location”: window.location.href, } if (isDesktop) { gaPayload[“device”] = “Desktop”; } else { gaPayload[“device”] = “Mobile”; } gtag(“event”, “ARTICLE_POLL_RESPONSE”, gaPayload); var url = ‘https://a-gotham.sportskeeda.com/polls//response’; var data = { “poll_type”: “article”, “option”: selectedOption } pureJSAjaxPost(url, data, onPollResponseSuccess.bind(this, selectedOption), onPollResponseFail.bind(this, selectedOption), null, false); } function trackSponsoredLinkClick(e) { } var articlePollImpressionTracked = false; function trackArticlePollImpression(pollData) { var pollElement = $(“#poll”); var intersectionObserverForArticlePoll = new IntersectionObserver( function(entries) { entries.forEach(function(entry) { if (articlePollImpressionTracked) return; if (!entry.target || !entry.isIntersecting || entry.intersectionRatio < 0.5) return; setTimeout(function() { if (isInViewport(entry.target)) { articlePollImpressionTracked = true; var isDesktop = "1"; var gaPayload = { "question" : pollData.question, "category": "SK POP", "page_url": window.location.href, } if (isDesktop) { gaPayload["device"] = "Desktop"; } else { gaPayload["device"] = "Mobile"; } gtag("event", "ARTICLE_POLL_IMPRESSION", gaPayload); intersectionObserverForArticlePoll.unobserve(entry.target); } }, 1000); }); }, { threshold: 0.5 } ); if (pollElement){ var isAnswered = pollElement.querySelector(".poll-option-answered"); if (!isAnswered) { intersectionObserverForArticlePoll.observe(pollElement); } } }
Quick Links
More from Sportskeeda
0) { var pnProductNav = $(“#pnProductNav”); var pnProductNavContents = $(“#pnProductNavContents”); // Out advancer buttons var pnAdvancerLeft = $(“#pnAdvancerLeft”); var pnAdvancerRight = $(“#pnAdvancerRight”); var scrollAmount = 0; var scrollMin = 0 var scrollMax = pnProductNavContents.clientWidth; pnAdvancerRight.onclick = function() { pnProductNav.scrollTo({ top: 0, left: Math.max(scrollAmount += 240, scrollMax), behavior: ‘smooth’ }); }; pnAdvancerLeft.onclick = function() { pnProductNav.scrollTo({ top: 0, left: Math.max(scrollAmount -= 240, scrollMin), behavior: ‘smooth’ }); }; new KeedaCarousalControlsHelper({ target: pnProductNavContents, whenFistItemInViewport: function(entry) { pnAdvancerLeft.style.display = “none”; }, whenFistItemNotInViewport: function(entry) { pnAdvancerLeft.style.display = “inline-block”; }, whenLastItemInViewport: function(entry) { pnAdvancerRight.style.display = “none”; }, whenLastItemNotInViewport: function(entry) { pnAdvancerRight.style.display = “inline-block”; } }).observeTarget(); } } var topOfDropDown = ”; function toggleWikiDropDown(slug, level, tag, flag, fromExplore) { var node = $(“#” + slug); if (!node) { return; } if (hasClass(node, “hidden”)) { showDropDown(slug, level, tag, flag, fromExplore); } else { closeAllDropDown(); } } function setDropDownPosition(element) { var WIKI_HEADER_HEIGHT = 150; if (window.scrollY > WIKI_HEADER_HEIGHT) { element.style.position = “fixed”; element.style.top = “50px”; } else if (window.scrollY < WIKI_HEADER_HEIGHT) { element.style.position = "absolute"; element.style.top = "236px"; } } function showDropDown(slug, level, tag, flag, fromExplore) { var nodeId = "#" + slug; var dropDownNode = $(nodeId); if (!dropDownNode) { return; } var rec = tag.parentNode.getBoundingClientRect(); isMenuFromExplore = fromExplore == null ? isMenuFromExplore : fromExplore; closeAllDropDown(); updateMenu(nodeId); if (flag && (level == 0 || level == -1)){ level == 0 ? tag.lastChild.style.transform = "rotate(180deg) scale(1.5)" : true; topOfDropDown = rec.top + window.scrollY + 35 + "px"; } setDropDownPosition(dropDownNode); $('body').appendChild(dropDownNode); dropDownNode.classList.remove("hidden"); } function updateMenu(nodeId) { node = $(nodeId).querySelector('#back-block-0'); if (isMenuFromExplore && $(nodeId).getAttribute('data-level') == '0') { node.classList.remove('hidden'); } else if (!isMenuFromExplore && $(nodeId).getAttribute('data-level') == '0') { node.classList.add('hidden'); } } window.addEventListener("DOMContentLoaded", function() { document.addEventListener('click', function(e) { if (e.target.className != 'drop-down-icon' && e.target.className != 'explore-icon' && e.target.className != 'back-block' && e.target.className != 'wiki-submenu-item' && e.target.className != 'wiki-menu-toggle' ) { closeAllDropDown(); } }) }); function closeAllDropDown() { var nodes = $all(".drop-down-menu"); var menu = $all(".wiki-menu-item .drop-down-icon"); if (menu && menu.length) { for(var i = 0; i < menu.length; i++) { menu[i].style.transform = "scale(1.5)"; } } if (nodes && nodes.length) { for(var i = 0; i " modalPopup.closeOnEsc = false; modalPopup.setHeader("Why did you not like this content?"); modalPopup.setContentText(modalText); modalPopup.addCancelOkButton("Submit", resetRatingAndFeedbackForm, sendRating); modalPopup.removeCloseModalIcon(); modalPopup.disableDismissPopup(); modalPopup.open(); } else { sendRating(index); } } function sendRating() { var requestPayload = { "post_id": 1429161, "rating_value": ratingValue } if (ratingValue > 3) { requestPayload.rating_feedback_type = null; requestPayload.rating_feedback = null; } else { if (!$(‘input[name=”drone”]:checked’) || !$(‘input[name=”drone”]:checked’).value) { showErrorMessage(‘option’); return; } if (!$(“.post-rating-feedback-note textarea”) || !$(“.post-rating-feedback-note textarea”).value) { showErrorMessage(‘note’); return; } var selectedOption = $(‘input[name=”drone”]:checked’).value; var feedbackNote = $(“.post-rating-feedback-note textarea”).value; requestPayload.rating_feedback_type = selectedOption; requestPayload.rating_feedback = feedbackNote; } pureJSAjaxPost(addratingAPI, requestPayload, onsaveRatingSuccess, onsaveRatingFail, function() {}, true); } function resetRatingAndFeedbackForm() { var activeStars = Array.from($all(‘.rating span.rating-star.active’)); for (var i=0; i < activeStars.length; i++) { activeStars[i].classList.remove("active"); } if ($('input[name="drone"]:checked')) { $('input[name="drone"]:checked').checked = false; } var userNote = document.querySelector(".post-rating-feedback-note textarea"); userNote.value = ''; modalPopup.close(); } function onsaveRatingSuccess() { modalPopup.close(); savePostIdInUserRatedPostsCookie(); $("#post-rating-layout").classList.add("hidden"); $("#post-rating-message").classList.remove("hidden"); window.setInterval(function showMessage() { $("#post-rating-widget").classList.add("hidden"); }, 3000); } function onsaveRatingFail() { console.error('Saving post rating failed!'); modalPopup.close(); } function savePostIdInUserRatedPostsCookie() { userRatedPostIds.push(1429161); var expiryTime = new Date(); expiryTime.setMonth(expiryTime.getMonth() + 12); // Expiry after 1 year setCookie("user_rated_post_ids", JSON.stringify(userRatedPostIds), expiryTime); } function isPostRatedByUser() { var userRatedPostIds = getCookie('user_rated_post_ids'); if (userRatedPostIds) { try { userRatedPostIds = JSON.parse(userRatedPostIds); } catch (err) { console.error(err); return false; } } else { return false; } if(userRatedPostIds.indexOf(1429161) >= 0) { return true; } else { return false; } } function getRatingCountByPostId(postId) { return new Promise(function(resolve, reject) { pureJSAjaxGet( getRatingCountBaseURL + postId + ‘/rating/count’, function(data) { try { data = JSON.parse(data); if (data.meta_value) { resolve(data.meta_value); } reject(“Failed to fetch rating count for the post:” + postId); } catch (err) { reject(“Failed to fetch rating count for the post:” + postId); } }, function(err) { reject(“Failed to fetch rating count for the post:” + postId); }, true); }); } function showErrorMessage(messageType) { var messageContainerId = ‘#’ + messageType + ‘-error’; $(messageContainerId).classList.remove(‘hidden’); window.setInterval(function () { $(messageContainerId).classList.add(“hidden”); }, 5000); } if (!isPostRatedByUser()) { getRatingCountByPostId(1429161) .then(function(ratingCount) { if (ratingCount < 10) { $("#post-rating-widget").classList.remove("hidden"); } }) .catch(function(err){ console.error(err); }) } “+firstName+”. We will notify you when they publish new content.”); } gtag(‘event’, action, { ‘event_category’: ‘FOLLOW’, ‘event_label’: source, ‘non_interaction’: true }); } else { var actionRevert = (action == ‘follow’) ? ‘un-follow’ : ‘follow’; flipFollowStatus(actionRevert); } }, function (error) { console.log(error); var actionRevert = (action == ‘follow’) ? ‘un-follow’ : ‘follow’; flipFollowStatus(actionRevert); } ); flipFollowStatus(action); } else { window.location = (‘/login?after-login=’ + window.location.href ); } }; function setAdFloatingParams() { if ($(“.rightStickyTopWrap”) && $(‘.fragments-container’)) { $(“.rightStickyTopWrap”).style.height = ($(‘.fragments-container’).clientHeight – 44) + “px”; } } setInterval(function() { setAdFloatingParams(); }, 2000); window.addEventListener(“load”, setAdFloatingParams.bind(this)); window.addEventListener(“DOMContentLoaded”, function() { var trackCopyURL = “https://a-login.sportskeeda.com/en” + “/track-events”; document.addEventListener(“scroll”, addevents_youtube_embeds.bind(this)); document.addEventListener(“mousemove”, addevents_youtube_embeds.bind(this)); document.addEventListener(‘copy’, logCopyEvent.bind(this)); function addevents_youtube_embeds() { var youtube = document.getElementsByClassName(“youtube”); for (var i = 0; i < youtube.length; i++) { var ytURL = youtube[i].dataset.embed; var youtubeWrapper = youtube[i].parentElement; var youtubeCoverImg = youtube[i].getElementsByTagName("img")[0]; var iframe = document.createElement( "iframe" ); iframe.setAttribute( "width", youtubeCoverImg.width ); iframe.setAttribute( "height", youtubeCoverImg.height ); iframe.setAttribute( "src", "https://www.youtube.com/embed/"+ ytURL); iframe.setAttribute( "frameborder", "0" ); iframe.setAttribute( "allowfullscreen", ""); youtubeWrapper.innerHTML = ""; youtubeWrapper.appendChild( iframe ); }; var iframeEmbeds = document.getElementsByClassName("iframe-embeds"); for (var i = 0; i < iframeEmbeds.length; i++) { var iframeSRC = iframeEmbeds[i].dataset.embed; var aspectRatio = iframeEmbeds[i].dataset.aspectratio; var height = iframeEmbeds[i].dataset.height; var iframeWrapper = iframeEmbeds[i].parentElement; var iframe = document.createElement( "iframe" ); iframe.setAttribute( "width", "100%"); if(aspectRatio) { iframe.setAttribute( "style", "height: calc(" + iframeEmbeds[i].clientWidth + "px * " + aspectRatio + ")"); } else if (height) { iframe.setAttribute("style", "height: "+ height + "px"); } iframe.setAttribute( "src", iframeSRC); iframe.setAttribute( "frameborder", "0" ); iframe.setAttribute( "allowfullscreen", ""); iframeWrapper.innerHTML = ""; iframeWrapper.appendChild( iframe ); } } function logCopyEvent() { var payload = { event_type: "copy", post_id: 1429161 }; pureJSAjaxPost(trackCopyURL, payload, function() {}, function () { console.error('Failed to save copy event'); }, null, true); } }); function renderPrimaryCommentsWidget() { var primaryComments = new KeedaComments({ id: parseInt("1429161"), wpId: parseInt("3884368"), popup: false, commentsContainer: document.getElementById("keeda-comments-container"), pageType: "post" }); primaryComments.fetchCommentsAndRender(); setTimeout(showFeedCommentsContainer, 0); } (function() { var followUsCTA = $(".follow-us-cta"); function followUsGoogleNews(){ if (!followUsCTA) return; var st = window.pageYOffset || document.documentElement.scrollTop; if ( st 300 ) { followUsCTA.classList.remove("hidden"); } else { followUsCTA.classList.add("hidden"); } } window.addEventListener("scroll", followUsGoogleNews); })(); var bottom_tagline_links = document.querySelectorAll('.bottom_tagline_link'); for (var i = 0; i < bottom_tagline_links.length; i++) { bottom_tagline_links[i].addEventListener('click', trackBottomTaglineClickEvent.bind(this)); } function trackBottomTaglineClickEvent() { var sportCategory = "pop-culture" || "news-who-for-the-what-trump-s-justice-for-all-song-jan-6-rioters-reaches-1-itunes-sparking-hilarious-reactions"; var payload = { "page_url": window.location.href, "category": sportCategory, "Device" : "Desktop" } gtag("event", "Clicks_BottomTagline", payload); } var followUsCTAs = $all(".follow-action"); for (var i = 0; i
More from Sportskeeda
Fetching more content…
= DATASET_SIZE * 2) { return data[key].slice(0, DATASET_SIZE); } else { return data[key]; } } function track(cname, key, identifier, title) { var data = getTrackingCookie(cname, ‘{}’); data = JSON.parse(data); if (!data.hasOwnProperty(key) || key == ‘sport’) { data = initializeJSONDataStructure(data, key, identifier, title); } else { var item = data[key].filter(function(item) { return item.name == identifier; }); if (item.length > 0) { item = item[0]; var incrementResponse = incrementTrackingLogic(item); item = incrementResponse[‘value’]; if (incrementResponse[‘clipAll’]) { data[key].forEach(function(item){ item[‘value’] = parseInt(item[‘value’] / 2).toString(); }); } } else { data = initializeJSONDataStructure(data, key, identifier, title); } } data[key].sort(function(a, b) { return b[‘value’] > a[‘value’] ? 1 : -1; }); data[key] = clippingMechanism (data, key); setTrackingCookie(COOKIE_NAME, JSON.stringify(data)); } function trackSport(identifier, title) { track(COOKIE_NAME, ‘sport’, identifier, title); } function trackEvent(identifier) { track(COOKIE_NAME, ‘event’, identifier, “”); } function trackTeam(identifier) { track(COOKIE_NAME, ‘team’, identifier, “”); } return { getTrackingCookie: getTrackingCookie, setTrackingCookie: setTrackingCookie, trackSport: trackSport, trackEvent: trackEvent, trackTeam: trackTeam }; })(); var hpAlgoCookie = SKTrackingModule.getTrackingCookie(‘HP_ALGO’, null); if (!hpAlgoCookie) { var hpAlgoCookieRange = [‘false’, ‘hp_algo_1’]; var hpAlgoCookie = hpAlgoCookieRange[Math.floor(Math.random() * hpAlgoCookieRange.length)]; SKTrackingModule.setTrackingCookie(‘HP_ALGO’, hpAlgoCookie); } var category; try { var category = JSON.parse(‘{“slug”:”pop-culture”,”title”:”SK POP”}’); SKTrackingModule.trackSport(category.slug, category.title); } catch (e) {} ]]> = 5) { addClass(rows[i], “hidden”); } } var toggleButton = $(‘.see-more-stats’); if(hasClass(toggleButton, “hidden”)) { removeClass(toggleButton, “hidden”); } addClass(ele, “hidden”); } function seeMoreToggle(ele) { if(hasClass(ele, ‘toggled’)) { //expanded contentHolder.style.height = ’50px’; addClass(contentHolder, ‘fade-out-bottom’); ele.classList.remove(‘toggled’); } else { //collapsed contentHolder.style.height = ‘auto’; removeClass(contentHolder, ‘fade-out-bottom’); ele.classList.add(‘toggled’); if(taxonomyImg) { removeClass(taxonomyImg, ‘hidden’); } if(taxonomyInfo) { removeClass(taxonomyInfo, ‘hidden’); } } } if(contentHolder) { removeClass(contentHolder, ‘hidden’); contentHolder.style.height = ‘auto’; } if(taxonomyImg) { removeClass(taxonomyImg, ‘hidden’); } if(taxonomyInfo) { removeClass(taxonomyInfo, ‘hidden’); } //Check for collapsed_by_default’s value if set //Refresh Sticky Ad-Units var SKAdsArticleStickyRefreshVals = { Left: { Div: adUnits[“Desktop_article_rail_top_2022”][“div”], AdRefreshed: false, RefreshCount: 0, Hover: false, Refresh: 60 } } function registerRefreshForStickyAds() { refreshStickyAdUnit(SKAdsArticleStickyRefreshVals.Left, “Left”); } registerRefreshForStickyAds(); function hoverEventsOnStickyAds(slotAddress) { if (document.getElementById(SKAdsArticleStickyRefreshVals[slotAddress][“Div”])) { $(“#”+SKAdsArticleStickyRefreshVals[slotAddress][“Div”]).addEventListener(“mouseover”, function () { SKAdsArticleStickyRefreshVals[slotAddress][“Hover”] = true; }); $(“#”+SKAdsArticleStickyRefreshVals[slotAddress][‘Div’]).addEventListener(“mouseout”, function () { SKAdsArticleStickyRefreshVals[slotAddress][“Hover”] = false; }); } } function refreshStickyAdUnit(adUnit, slotAddress) { var targetSlot = adUnit.Div; googletag.cmd.push(function() { googletag.pubads().addEventListener(‘impressionViewable’, function(event) { var slot = event.slot; hoverEventsOnStickyAds(slotAddress); if (slot.getSlotElementId() === targetSlot) { waitForXSec(slot, slotAddress, SKAdsArticleStickyRefreshVals[slotAddress][“Refresh”]); } }); }); } function waitForXSec(adSlot, slotAddress, refreshTimeInSec) { window.setTimeout(function() { SKAdsArticleStickyRefreshVals[slotAddress][“AdRefreshed”] = false; captureScrollEvent(adSlot, slotAddress); }, refreshTimeInSec * 1000); } function captureScrollEvent(adSlot, slotAddress) { window.addEventListener(“scroll”, function () { if (adSlot.getSlotElementId() == SKAdsArticleStickyRefreshVals[slotAddress][“Div”] && !SKAdsArticleStickyRefreshVals[slotAddress][“AdRefreshed”] && !SKAdsArticleStickyRefreshVals[slotAddress][“Hover”]) { googletag.cmd.push(function() { console.log(“Refreshing Ad: “, adSlot.getSlotElementId()); SKAdsArticleStickyRefreshVals[slotAddress][“RefreshCount”] += 1; adSlot.setTargeting(“refresh”, SKAdsArticleStickyRefreshVals[slotAddress][“RefreshCount”] + “”); requestBidsForAdSlot(adSlot); }); SKAdsArticleStickyRefreshVals[slotAddress][“AdRefreshed”] = true; } }); } var SKAdsArticleDesktopInBetweenRefreshVals = { Top: { Div: adUnits[“Desktop_72890_1”][“div”], AdRefreshed: true, RefreshCount: 0, Refresh: 30 }, SideRailTop: { Div: adUnits[“Desktop_article_rail_top_2022”][“div”], AdRefreshed: true, RefreshCount: 0, Refresh: 30 } } googletag.cmd.push(function() { googletag.pubads().addEventListener(‘impressionViewable’, function(event) { var slot = event.slot; for(var slotAddress in SKAdsArticleDesktopInBetweenRefreshVals) { if (slot.getSlotElementId() === SKAdsArticleDesktopInBetweenRefreshVals[slotAddress].Div) { SKAdsArticleDesktopInBetweenRefreshVals[slotAddress][“slot”] = slot; waitForXSecDesktopAds(slot, slotAddress, SKAdsArticleDesktopInBetweenRefreshVals[slotAddress][“Refresh”]); } } }); }); function waitForXSecDesktopAds(adSlot, slotAddress, refreshTimeInSec) { window.setTimeout(function() { SKAdsArticleDesktopInBetweenRefreshVals[slotAddress][“AdRefreshed”] = false; }, refreshTimeInSec * 1000); } window.addEventListener(“scroll”, function () { for(var slotAddress in SKAdsArticleDesktopInBetweenRefreshVals) { var currentAdUnit = SKAdsArticleDesktopInBetweenRefreshVals[slotAddress]; var divSlot = document.getElementById(currentAdUnit[“Div”]); if (!divSlot) return; rect = divSlot.getBoundingClientRect(); if (currentAdUnit.slot && currentAdUnit.slot.getSlotElementId() == currentAdUnit[“Div”] && elementInViewPort(rect) && !currentAdUnit[“AdRefreshed”]) { currentAdUnit[“AdRefreshed”] = true; currentAdUnit[“RefreshCount”] += 1; currentAdUnit.slot.setTargeting(“refresh”, currentAdUnit[“RefreshCount”] + “”); requestBidsForAdSlot(currentAdUnit.slot); SKAdsArticleDesktopInBetweenRefreshVals[slotAddress] = currentAdUnit; } } }); function elementInViewPort(rect) { return rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right = 0.7 && !afterArticleSplitAdLoaded) { loadAfterArticleSplitAd(); } }, optionsArticleSplitAd); var observedEle = document.getElementById('article_pagesplit_ad'); if (observedEle) { intersectionObserverArticleSplitAd.observe(observedEle); } ]]> 0) { container.style.display = “block”; cardsContainer.innerHTML = ”; comments.forEach(function (comment, index) { var notificationCardTemplate = container.querySelector(‘#kcn-card’); var notificationCard = notificationCardTemplate.content.cloneNode(true); var notificationCardWrapper = notificationCard.querySelector(‘.kcn-card-wrapper’); notificationCardWrapper.setAttribute(‘data-notification-id’, comment.ID); var notificationText = notificationCard.querySelector(‘.kcn-comment-text’); notificationText.innerHTML = comment.comment_text; var keedaPostLink = notificationCard.querySelector(‘.keeda-posts-link’); keedaPostLink.href = comment.permalink; notificationCardWrapper.querySelector(‘.approve’).addEventListener(‘click’, function () { onCommentActionClick(container, comment, COMMENT_ACTION_STATUS.APPROVED); }); notificationCardWrapper.querySelector(‘.delete’).addEventListener(‘click’, function () { onCommentActionClick(container, comment, COMMENT_ACTION_STATUS.DELETE); }); cardsContainer.appendChild(notificationCard); }); } else { container.style.display = “block”; cardsContainer.innerHTML = “No new comments”; } }).catch(function (err) { console.log(err); }); } function displayPendingCommentsCount(container) { getPendingCommentsCount().then(function (res) { if (res.count && res.count > 0) { commentsCount = res.count; moderationCountHTMLElement.innerText = res.count; } }) } function toggleContainerVisibility(container) { var kcnContentContainer = container.querySelector(‘#kcn-comment-container’); var kcnPointer = container.querySelector(‘#kcn-pointer’); if (kcnContentContainer) { kcnContentContainer.classList.toggle(‘hidden’); } if (kcnPointer) { kcnPointer.classList.toggle(‘hidden’); } } function addClickHandler(container, clickCallback) { var iconContainerElement = container.querySelector(‘#kcn-comment-info-holder’); iconContainerElement.addEventListener(“click”, function (event) { toggleContainerVisibility(container); if (!commentsLoaded) { commentsLoaded = true; var cardsContainer = container.querySelector(‘.kcn-card-container’); if (cardsContainer) { cardsContainer.innerHTML = “Loading comments…”; } displayNewCommentNotifications(container); } }); } function init (element) { addClickHandler(element); displayPendingCommentsCount(element); moderationCountHTMLElement = document.getElementById(“kcn-comment-count”); } return { init: init } })(); function initCommentNotifications(capabilities) { if(window.innerWidth
Source
GIPHY App Key not set. Please check settings