10 Celebrities who are into anime


Given that anime is still considered a niche despite its worldwide popularity, anime fans find it fascinating to learn about celebrities who are into anime. Similar to how anime fans have grown up watching anime, so have celebrities. Hence, with the growing popularity of anime worldwide, many celebrities have begun sharing their love for their favorite anime online.

It is shocking to see the diversity of celebrities who love anime. These fans not only include celebrities who watch certain renowned anime and anime films but also avid anime fans who have watched several anime, including the latest releases. Hence, here we shall look at 10 celebrities who are into anime.


Megan Thee Stallion, Disha Patani, and 8 other celebrities who are into anime

1) David De Gea

David De Gea likes Gaara (Image via Studio Pierrot)<img class="lazy-img" width="1920" height="1080" data-img="https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134409973.jpg" alt="David De Gea likes Gaara (Image via Studio Pierrot)" data-img-low="https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134409973.jpg?w=640" src="data:image/svg+xml,” srcset=”https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134409973.jpg?w=190 190w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134409973.jpg?w=720 720w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134409973.jpg?w=640 640w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134409973.jpg?w=1045 1045w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134409973.jpg?w=1200 1200w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134409973.jpg?w=1460 1460w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134409973.jpg?w=1600 1600w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134409973.jpg 1920w”>
David De Gea likes Gaara (Image via Studio Pierrot)

The former Manchester United and Spain international goalkeeper, David De Gea is an avid anime fan. He is not only vocal about his love for anime in interviews but also loves to share with his fans what anime he is watching at the moment.

Some of the anime he has watched include Naruto, Blue Lock, and Pokemon. Some of his favorite characters from Naruto include Gaara, Jiraiya, and Naruto. Moreover, in an interview with GOAL, he also shared how much he liked Pokemon like Gyarados, Onix, and Hitmonchan.


2) Michael B. Jordan

Michael B. Jordan's Killmonger costume was inspired by Vegeta (Image via Disney, Toei Animation)<img class="lazy-img" width="1920" height="1080" data-img="https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134415565.jpg" alt="Michael B. Jordan's Killmonger costume was inspired by Vegeta (Image via Disney, Toei Animation)" data-img-low="https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134415565.jpg?w=640" src="data:image/svg+xml,” srcset=”https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134415565.jpg?w=190 190w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134415565.jpg?w=720 720w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134415565.jpg?w=640 640w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134415565.jpg?w=1045 1045w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134415565.jpg?w=1200 1200w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134415565.jpg?w=1460 1460w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134415565.jpg?w=1600 1600w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134415565.jpg 1920w”>
Michael B. Jordan’s Killmonger costume was inspired by Vegeta (Image via Disney, Toei Animation)

American actor and film producer Michael B. Jordan is a very vocal anime fan who might be part of a very small number of celebrities who are into anime and try to incorporate it into their work. He previously revealed that his Killmonger costume in the Black Panther movie was directly inspired by Vegeta’s Saiyan suit.

In addition, Michael B. Jordan has also revealed that he incorporated the fight moves between Naruto and Sasuke into his directorial debut film, Creed III. As for his five favorite anime, the actor stated that One Piece, Dragon Ball Z, Naruto, Bleach, and Hunter X Hunter were some must-watch anime.


3) Disha Patani

Disha Patani graces screening event in Mumbai (Image via Crunchyroll)<img class="lazy-img" width="1920" height="1279" data-img="https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134420329.jpg" alt="Disha Patani graces screening event in Mumbai (Image via Crunchyroll)" data-img-low="https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134420329.jpg?w=640" src="data:image/svg+xml,” srcset=”https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134420329.jpg?w=190 190w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134420329.jpg?w=720 720w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134420329.jpg?w=640 640w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134420329.jpg?w=1045 1045w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134420329.jpg?w=1200 1200w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134420329.jpg?w=1460 1460w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134420329.jpg?w=1600 1600w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134420329.jpg 1920w”>
Disha Patani graces screening event in Mumbai (Image via Crunchyroll)

Indian actress Disha Patani is a huge anime fan. This is evident from her social media activity as she regularly updates fans on what she has been watching lately. Her love for Son Goku was revealed years ago, but recently, she has become more open to wearing anime merchandise in public.

Disha Patani’s love for anime also saw her arrive at the Indian premiere of the Demon Slayer – To the Hashira Training movie. The most famous anime she has watched reportedly include Dragon Ball Z, Naruto, Attack on Titan, Hunter x Hunter, Demon Slayer, and Black Clover.


4) Megan Thee Stallion

Megan Thee Stallion cosplaying Mirko (Image via X/@theestallion. BONES)<img class="lazy-img" width="1920" height="1080" data-img="https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134426783.jpg" alt="Megan Thee Stallion cosplaying Mirko (Image via X/@theestallion. BONES)" data-img-low="https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134426783.jpg?w=640" src="data:image/svg+xml,” srcset=”https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134426783.jpg?w=190 190w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134426783.jpg?w=720 720w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134426783.jpg?w=640 640w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134426783.jpg?w=1045 1045w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134426783.jpg?w=1200 1200w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134426783.jpg?w=1460 1460w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134426783.jpg?w=1600 1600w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134426783.jpg 1920w”>
Megan Thee Stallion cosplaying Mirko (Image via X/@theestallion. BONES)

While we aren’t ranking the celebrities based on the number of anime they like, if we were to, American rapper Megan Thee Stallion might be at the top of the list of celebrities who are into anime. She not only openly shares her love for anime but has also cosplayed her favorite characters on several occasions.

Not just that, her love for anime also saw her become a presenter at the Crunchyroll Anime Awards for presenting the Anime of the Year. Some of her favorite anime include My Hero Academia, Jujutsu Kaisen, Attack on Titan, Black Clover, Hunter x Hunter, The Disastrous Life of Saiki K., JoJo’s Bizarre Adventure, and Demon Slayer.


5) Ronda Rousey

Dwayne Johnson and Ronda Rousey as seen in WrestleMania (Image via WWE)<img class="lazy-img" width="1920" height="1079" data-img="https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134431583.jpg" alt="Dwayne Johnson and Ronda Rousey as seen in WrestleMania (Image via WWE)" data-img-low="https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134431583.jpg?w=640" src="data:image/svg+xml,” srcset=”https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134431583.jpg?w=190 190w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134431583.jpg?w=720 720w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134431583.jpg?w=640 640w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134431583.jpg?w=1045 1045w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134431583.jpg?w=1200 1200w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134431583.jpg?w=1460 1460w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134431583.jpg?w=1600 1600w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134431583.jpg 1920w”>
Dwayne Johnson and Ronda Rousey as seen in WrestleMania (Image via WWE)

Former American professional wrestler and actress Ronda Rousey is one of those celebrities who are into anime and also got to live their favorite anime to some extent, given that she is a fan of the Dragon Ball franchise.

She has donned Dragon Ball Z merchandise on several occasions, surprisingly even in WWE’s Wrestlemania. In addition, she has also been seen wearing Pokemon outfits during her time training for her bouts. Surprisingly, donning anime merchandise wasn’t enough for Ronda as she has also streamed herself playing Dragon Ball Z: Kakarot.


6) Bruno Mars

While American singer and songwriter Bruno Mars is one of the newest names among celebrities who are into anime, he certainly does have good taste as he is a fan of Jujutsu Kaisen, Pokemon, and Hello Kitty.

The award-winning pop star posted a picture of himself holding Jujutsu Kaisen Volume 25 and a Hello Kitty doll while donning a Pikachu cap. This picture was taken during his time in Tokyo, Japan.


7) Daniel Radcliffe

Daniel Radcliffe likes Monster anime (Image via Instagram/@daniel9340, Madhouse)<img class="lazy-img" width="1920" height="1080" data-img="https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134436323.jpg" alt="Daniel Radcliffe likes Monster anime (Image via Instagram/@daniel9340, Madhouse)" data-img-low="https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134436323.jpg?w=640" src="data:image/svg+xml,” srcset=”https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134436323.jpg?w=190 190w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134436323.jpg?w=720 720w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134436323.jpg?w=640 640w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134436323.jpg?w=1045 1045w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134436323.jpg?w=1200 1200w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134436323.jpg?w=1460 1460w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134436323.jpg?w=1600 1600w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134436323.jpg 1920w”>
Daniel Radcliffe likes Monster anime (Image via Instagram/@daniel9340, Madhouse)

Who would have thought that Harry Potter’s Daniel Radcliffe was not only a fantasy movie franchise actor but also an anime fan? Earlier, he had revealed how he wasn’t sure what classified as an anime, stating that he did like Avatar: The Last Airbender but did not know if it counted as an anime.

Soon after, Daniel Radcliffe seemingly revealed the anime he likes, making him one of the celebrities who are into anime. The actor has dabbled into some niche yet renowned anime like Monster, Initial D, and the ‘Miyazaki’ movies.


8) PewDiePie

Unlike other celebrities who are into anime, Swedish YouTuber PewDiePie (Felix Kjellberg) has been vocal about his love for anime for a really long time. While he likes several mainstream anime like Attack on Titan, Haikyuu!!, and others, he has also revealed some niche series he loves watching and reading.

PewDiePie revealed the same through one of his YouTube videos how he liked watching Ergo Proxy while growing up in Sweden. Additionally, he was also a fan of Berserk, Blame!, Devilman Crybaby, Mononoke, and many other anime.


9) Robert Pattinson

Robert Pattinson voices The Heron Man (Image via WireImage, Studio Ghibli)<img class="lazy-img" width="1920" height="1080" data-img="https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134441389.jpg" alt="Robert Pattinson voices The Heron Man (Image via WireImage, Studio Ghibli)" data-img-low="https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134441389.jpg?w=640" src="data:image/svg+xml,” srcset=”https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134441389.jpg?w=190 190w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134441389.jpg?w=720 720w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134441389.jpg?w=640 640w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134441389.jpg?w=1045 1045w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134441389.jpg?w=1200 1200w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134441389.jpg?w=1460 1460w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134441389.jpg?w=1600 1600w, https://static.beescdn.com/news.myworldfix.com/2024/04/20240406134441389.jpg 1920w”>
Robert Pattinson voices The Heron Man (Image via WireImage, Studio Ghibli)

While the 2022 The Batman actor Robert Pattinson isn’t an avid fan of anime, he has certainly watched his fair share of Miyazaki movies to know that he loves watching them devotedly.

Surprisingly, the English actor also got to work in a Miyazaki film, the Oscar-winning film The Boy and The Heron. Robert Pattinson dubbed the English voice of Heron Man in the Japanese anime film.


10) Tiger Shroff

youtube-cover

Considering that Indian actor Tiger Shroff is India’s Crunchyroll ambassador, it just proves that he is one of the celebrities who are into anime. He loves a variety of anime but his favorites are Dragon Ball Z, Naruto, and Naruto Shippuden.

Surprisingly, during Jujutsu Kaisen’s Hindi dub premiere in Mumbai, India, he made it clear that while he liked the Naruto franchise, he wasn’t a fan of Boruto anime. In addition, Tiger Shroff also revealed that he loved protagonists like Son Goku, Satoru Gojo, Minato Namikaze, and Itachi Uchiha, and antagonists like Akaza, Madara Uchiha, and Orochimaru.


These are some of the celebrities who are into anime. If we have missed out on any, do comment them below.


Related Links

10 other celebrities who are into anime

10 celebrities who love One Piece

10 Naruto characters and their celebrity look alike

Megan Thee Stallion breaks the internet with Mirko cosplay

10 celebrities who have the same birthday as Luffy from One Piece

function KeedaCarousalControlsHelper(input) {
var self = this;
this.target = input.target;
this.whenCarouselInViewport = input.whenCarouselInViewport;
this.whenCarouselNotInViewport = input.whenCarouselNotInViewport;
this.whenFistItemInViewport = input.whenFistItemInViewport;
this.whenFistItemNotInViewport = input.whenFistItemNotInViewport;
this.whenLastItemInViewport = input.whenLastItemInViewport;
this.whenLastItemNotInViewport = input.whenLastItemNotInViewport;
this.options = input.intersectionObserverOptions || {
threshold: 1
};
}
KeedaCarousalControlsHelper.prototype.observeTarget = function() {
var self = this;
var firstItem = this.target.firstElementChild;
var lastItem = this.target.lastElementChild;
var allChildren = this.target.children;
var firstItem, lastItem;
for (var i = 0; i = 0; i–) {
if (!allChildren[i].classList.contains(“hidden”)) {
lastItem = allChildren[i];
break;
}
}
this.firstItemObserver = new IntersectionObserver(function(entries) {
entries.forEach(function(entry) {
if (entry.isIntersecting) {
self.whenFistItemInViewport(entry);
} else {
self.whenFistItemNotInViewport(entry);
}
})
}, this.options);
this.lastItemObserver = new IntersectionObserver(function(entries) {
entries.forEach(function(entry) {
if (entry.isIntersecting) {
self.whenLastItemInViewport(entry);
} else {
self.whenLastItemNotInViewport(entry);
}
})
}, this.options);
firstItem && this.firstItemObserver.observe(firstItem);
lastItem && this.lastItemObserver.observe(lastItem);
if (typeof self.whenCarouselInViewport == “function” && typeof self.whenCarouselNotInViewport == “function”) {
this.carouselObserver = new IntersectionObserver(function(entries) {
entries.forEach(function(entry) {
if (entry.isIntersecting) {
self.whenCarouselInViewport(entry);
} else {
self.whenCarouselNotInViewport(entry);
}
})
}, {
threshold: 1
});
this.carouselObserver.observe(this.target);
}
return this;
}
KeedaCarousalControlsHelper.prototype.unobserveTarget = function() {
if (this.carouselObserver) {
this.carouselObserver.disconnect();
}
if (this.firstItemObserver) {
this.firstItemObserver.disconnect();
}
if (this.lastItemObserver) {
this.lastItemObserver.disconnect();
}
return this;
}
KeedaCarousalControlsHelper.prototype.reset = function() {
return this.unobserveTarget().observeTarget();
}

.smart-menu-container {
background: #ffffff;
padding: 8px 16px 6px;
display: flex;
align-items: center;
border-bottom: 1px solid #E9E9E9;
box-shadow: 0px 4px 20px #f5f5f5;
}
.scrollable-content-holder {
position: relative;
box-sizing: border-box;
display: flex;
width: 100%;
align-items: center;
}
.pn-ProductNav::-webkit-scrollbar {
display: none;
}
.pn-ProductNav {
display: inline-block;
vertical-align: bottom;
overflow-x: auto;
overflow-y: hidden;
/* For WebKit implementations, provide inertia scrolling */
-webkit-overflow-scrolling: touch;
/* We don’t want internal inline elements to wrap */
white-space: nowrap;
/* hide the default scrollbar */
-ms-overflow-style: none;
overflow: -moz-scrollbars-none;
/* auto-hiding scroller for people using IE */
-ms-overflow-style: -ms-autohiding-scrollbar;
}
.pn-ProductNav_Contents {
float: left;
font-size: 0;
transition: transform .2s ease-in-out;
position: relative;
}
.pn-ProductNav_Contents-no-transition {
transition: none;
}
.scrollable-content-item {
color: #2D2D2D !important;
width: auto;
padding: 6px 10px;
background: #F5F5F5;
border: 1px solid #E9E9E9;
box-sizing: border-box;
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.07);
border-radius: 18px;
text-decoration: none;
display: inline-flex;
align-items: center;
font-size: 12px;
line-height: 14px;
font-weight: normal;
font-style: normal;
font-stretch: normal;
margin-right: 8px;
letter-spacing: normal;
text-decoration: none !important;
}
.scrollable-content-item:hover{
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
}
.scrollable-content-item.chosen{
color: #ffffff !important;
background-image: linear-gradient(281deg, #48b9b0, #0ba0b0);
}
.pn-Advancer {
background: transparent;
padding: 0;
border: 0;
width: 24px;
height: 24px;
border-radius: 15px;
background-color: #ffffff;
display: inline-block;
margin-bottom: 2px;
outline: 0;
display: none;
cursor: pointer;
align-self: center;
}
.pn-Advancer_Left {
margin-right: 5px;
left: 0;
}
.pn-Advancer_Right {
margin-left: 5px;
right: 0;
}
.pn-Advancer_Icon {
width: 20px;
height: 44px;
fill: #bbb;
}
.pn-ProductNav_Indicator {
position: absolute;
bottom: 0;
left: 0;
height: 4px;
width: 100px;
background-color: transparent;
transform-origin: 0 0;
transition: transform .2s ease-in-out, background-color .2s ease-in-out;
}
.wiki-menu-item {
padding: 0px;
}
.wiki-menu-item:hover {
color: #D32F2F;
background: #FBEBEB;
border: 1px solid #D32F2F;
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.07);
}
.wiki-menu-item a {
color:#2D2D2D !important;
}
.wiki-submenu-item {
width: 100%;
display: flex;
justify-content: space-between;
gap: 10px;
align-items: center;
text-decoration: none !important;
color:#666666;
padding: 10px;
}
button.wiki-submenu-item {
border: 0;
background: inherit;
}
.drop-down-menu:hover > .wiki-submenu-item, .drop-down-menu li:hover > .wiki-submenu-item, .wiki-menu-item:hover > .wiki-submenu-item{
color: #D32F2F !important;
}
.drop-down-icon {
background-image: url(//staticg.sportskeeda.com/skm/assets/menu/arrow-down.svg);
width: 20px;
height: 20px;
background-size: cover;
cursor: pointer;
background-repeat: no-repeat;
}
.explore-icon {
background-image: url(//staticg.sportskeeda.com/skm/assets/explore.png);
width: 20px;
height: 15px;
background-size: cover;
cursor: pointer;
background-repeat: no-repeat;
}
.drop-down-menu {
position: absolute;
width: 90%;
margin: 0;
margin-left: 5%;
text-align: left;
font-size: 14px;
background: #FFFFFF;
border: 1px solid #E9E9E9;
box-shadow: -1px 6px 12px rgba(0, 0, 0, 0.1);
border-radius: 6px;
z-index: 99998;
}
.drop-down-menu ul {
max-height: 300px;
overflow-y: scroll;
}
.drop-down-menu li:hover {
color: #D32F2F;
background: #FBEBEB;
}
.back-block {
font-weight: 500;
font-size: 16px;
line-height: 21px;
color: #2d2d2d;
}
.back-block.back-nav {
border-bottom: 1px solid #E9E9E9;
padding: 10px 4px;
}
.back-nav span {
background: none;
display: flex;
width: 100%;
align-items: center;
gap: 2px;
}
.back-nav img {
width: 20px;
height: 20px;
object-fit: cover;
transform: rotate(180deg);
}
.back-block a {
color: #2D2D2D;
}
.explore-menu-item {
min-width: 60px;
position: absolute;
right: -40px;
height: 35px;
top: -3px;
}
.article-p {
width:auto !important;
position: relative;
color: #666666;
font-size: 14px !important;
margin-bottom: 0 !important;
flex-shrink: 0;
margin-right: 4px;
}
.mobile-p {
font-size: 12px !important;
margin-top: 8px;
padding-right: 4px !important;
padding-left: 8px !important;
}
#tag-cloud {
clear: both;
margin: 0 auto;
}
.sports-more-info {
color: #666666;
clear: both;
font-weight: 500;
margin: 12px 0 0;
}
.sports-more-info.m-sports-more-info {
padding-left: 8px;
}

Quick Links

var scrollableMenuLength = “2”;
var isMenuFromExplore = false;
function initScrollableMenu() {
if (scrollableMenuLength > 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 < nodes.length; i++) {
nodes[i].classList.add("hidden");
}
}
}
function trackScrollableMenuClick(name, pageType) {
if (!gtag || !name) return;
ga_event('Tag Cloud Click', 'Mobile', name); // older event, keeping it for legacy purposes
gtag('event', 'click', {
"event_category": pageType,
"event_label": name
});
}

(function() {
if (typeof initScrollableMenu === “function”) {
initScrollableMenu();
}
})();

Edited by Tiasha

window.FB = window.FB || {};
window.FB.__buffer = true;

(function() {
var maxScrollCaptured = 0;
var eventTriggered = false;
var gaScrollObject = {
‘event_label’: “percentage_scrolled”
}
var sessionCookieValue = getCookie(“keeda-session-uuid”);
if (sessionCookieValue) {
gaScrollObject[‘keeda-session-uuid’] = sessionCookieValue;
}
var userID = getCookie(“fw_ID”);
if (userID) {
gaScrollObject[‘loggedIn_user_id’] = userID;
}
function calculateScrollDepth() {
var targetEle = document.getElementById(“in-house-ads”);
gaScrollObject[‘event_category’] = “article_read_depth”;
gaScrollObject[“post_id”] = “1932947”;
gaScrollObject[‘content_total_pages’] = “1”;
gaScrollObject[‘content_current_page’] = “1”;
if (!targetEle) return;
var scrollDepth = window.scrollY.toFixed(2);
var targetScrollHeight = targetEle.offsetTop.toFixed(2);
var percentageScrolled = (100 – ((targetScrollHeight-scrollDepth)/targetScrollHeight)*100).toFixed(2);
if (percentageScrolled > 100) {
percentageScrolled = 100;
}
if (maxScrollCaptured < percentageScrolled) {
maxScrollCaptured = percentageScrolled;
}
if (!eventTriggered && maxScrollCaptured == 100) {
sendPageDepthScrollGAEvent();
window.removeEventListener('pagehide', recalculateDepthAndSendGAEvent);
eventTriggered = true;
}
}
function sendPageDepthScrollGAEvent() {
gaScrollObject["scrolled_depth"] = Math.round(maxScrollCaptured);
gtag('event', 'scroll', gaScrollObject);
}
var timeoutScroll = 0;
function articleDepthDebounce(fn, delay) {
clearTimeout(timeoutScroll);
timeoutScroll = setTimeout(fn, delay);
}
function recalculateDepthAndSendGAEvent() {
calculateScrollDepth();
sendPageDepthScrollGAEvent();
}
document.addEventListener('scroll', function(e) {
articleDepthDebounce(calculateScrollDepth, 100);
})
window.addEventListener('pagehide', recalculateDepthAndSendGAEvent);
})();
(function(){
var pageType = "Articlepage";
var pageLoadedTime = Date.now();
var postId = "1932947";
var timeSpentHandlerLoaded = false;
function loadTimeSpentHandler() {
if (timeSpentHandlerLoaded) return;
timeSpentHandlerLoaded = true;
function timeSpentHandler() {
var timeSpentDifference = Date.now() – pageLoadedTime;
var timeSpentSeconds = Math.floor(timeSpentDifference/1000);
var payload = {
"transport_type": "beacon",
"time_spent_seconds": timeSpentSeconds
};
var sessionCookieValue = getCookie("keeda-session-uuid");
if (sessionCookieValue) {
payload['keeda-session-uuid'] = sessionCookieValue;
}
if (postId && (pageType == "Articlepage" || pageType == "slideshow" || pageType == "Singlepageslideshow")) {
payload["post_id"] = postId;
gtag("event", "time_spent_on_article", payload);
} else if (pageType == "Homepage") {
payload["device"] = IS_MOBILE ? "Mobile" : "Desktop";
gtag("event", "time_spent_on_homepage", payload);
} else if (pageType == "wikipage" || pageType == "WikiHomepage" || pageType == "wiki_tagpage") {
payload["wiki_page"] = window.location.href;
payload["page_id"] = "";
payload["wiki_lang"] = "";
gtag("event", "time_spent_on_wikipage", payload);
} else if (pageType == "Tagpage" || pageType == "playerpage" || pageType == "teampage" || pageType == "Eventpage" || "") {
payload["tag_page"] = window.location.href;
payload["page_id"] = "";
gtag("event", "time_spent_on_staticpage", payload);
}
}
document.addEventListener("visibilitychange", function() {
if (document.visibilityState === "visible") {
pageLoadedTime = Date.now();
} else {
timeSpentHandler();
}
});
document.removeEventListener("scroll", loadTimeSpentHandler);
document.removeEventListener("mousemove", loadTimeSpentHandler);
document.removeEventListener("touchmove", loadTimeSpentHandler);
}
document.addEventListener("scroll", loadTimeSpentHandler, { once: true, passive: true });
document.addEventListener("mousemove", loadTimeSpentHandler, { once: true, passive: true });
document.addEventListener("touchmove", loadTimeSpentHandler, { once: true, passive: true });
})();
var trackedClick = false;
function trackBelowContentFeedClick(event) {
if(trackedClick) {
return true;
}
var clickedElement = event.target;
while(!!clickedElement.parentNode) {
if(hasClass(clickedElement, "story-wrapper")) {
trackedClick = true;
gtag('event', 'click', {
'event_category': "All Sports_Articles_Related Articles_Below Article_Desktop_17March2021",
'event_label': Array.prototype.indexOf.call(clickedElement.parentNode.getElementsByClassName("story-wrapper"), clickedElement) + 1,
'non_interaction': true
});
return true;
}
clickedElement = clickedElement.parentNode;
}
return true;
}
if ($(".comments-total-container")) {
$(".comments-total-container").addEventListener("click", function () {
var gaObject = {
'event_category': "Comments",
'event_label': "No_of_comments",
}
var sessionCookieValue = getCookie("keeda-session-uuid");
if (sessionCookieValue) {
gaObject['keeda-session-uuid'] = sessionCookieValue;
}
var userID = getCookie("fw_ID");
if (userID) {
gaObject['loggedIn_user_id'] = userID;
}
gtag('event', 'click', gaObject);
})
}
if ($(".comments-total-container-bottom")) {
$(".comments-total-container-bottom").addEventListener("click", function () {
var gaObject = {
'event_category': "Comments",
'event_label': "No_of_comments_bottom",
}
var sessionCookieValue = getCookie("keeda-session-uuid");
if (sessionCookieValue) {
gaObject['keeda-session-uuid'] = sessionCookieValue;
}
var userID = getCookie("fw_ID");
if (userID) {
gaObject['loggedIn_user_id'] = userID;
}
gtag('event', 'click', gaObject);
})
}
document.addEventListener("click", trackBelowContentFeedClick.bind(this));
var followButtons = $all('.btn-follow');
var followButtons = $all('.follow-btn');
var authorId;
var source;
/* for user profile page */
function displayFollowContent() {
addClass($('.follow-pc'),'hidden');
removeClass($('.follow-content .author-profile-info'), 'hidden');
removeClass($('.follow-content .follow-author'),'hidden');
}
function followCallback (resp) {
data = JSON.parse(resp);
displayFollowContent();
for(i=0;i<followButtons.length;i++){
if (data.status == true) {
removeClass(followButtons[i], "follow");
addClass(followButtons[i], "following");
removeClass(followButtons[i], "hidden");
if(source == "article") {
followButtons[i].querySelector('span').innerText = "Following";
if (followButtons[i].querySelector('img')) {
followButtons[i].querySelector('img').remove();
}
} else {
followButtons[i].innerHTML = "FOLLOWING";
}
} else {
removeClass(followButtons[i], "following");
addClass(followButtons[i], "follow");
removeClass(followButtons[i], "hidden");
if(source == "article") {
followButtons[i].querySelector('span').innerText = "Follow";
if (!followButtons[i].querySelector('img')) {
var plusImg = document.createElement('img');
plusImg.height = "10";
plusImg.width = "10";
plusImg.src = "//staticg.sportskeeda.com/skm/assets/plus-icon.svg";
followButtons[i].querySelector('span').insertAdjacentElement("beforebegin", plusImg);
}
} else {
followButtons[i].innerHTML = "FOLLOW";
}
}
}
}
function followErrorCallback(error) {
console.log(error);
}
function initFollow(id, type) {
authorId = id;
source = type;
var myUserId = getCurrentUserID();
if (myUserId) {
if(authorId != myUserId) {
pureJSAjaxGet('https://a-login.sportskeeda.com/en/user/' + authorId + '/is-followed',
followCallback,
followErrorCallback,
true);
} else {
addClass($('.follow-pc'),'hidden');
removeClass($('.follow-content .author-profile-info'), 'hidden');
}
} else {
displayFollowContent();
for(i=0;i<followButtons.length;i++){
removeClass(followButtons[i], "following");
addClass(followButtons[i], "follow");
removeClass(followButtons[i], "hidden");
if(source == "article") {
followButtons[i].querySelector('span').innerText = "Follow";
if (!followButtons[i].querySelector('img')) {
var plusImg = document.createElement('img');
plusImg.height = "10";
plusImg.width = "10";
plusImg.src = "//staticg.sportskeeda.com/skm/assets/plus-icon.svg";
followButtons[i].querySelector('span').insertAdjacentElement("beforebegin", plusImg);
}
} else {
followButtons[i].innerHTML = "FOLLOW";
}
}
}
}
initFollow('872210', 'article');
function flipFollowStatus(action) {
for(i=0;i<followButtons.length;i++){
if (action == 'follow') {
removeClass(followButtons[i], "follow");
addClass(followButtons[i], "following");
if(source == "article") {
followButtons[i].querySelector('span').innerText = "Following";
if (followButtons[i].querySelector('img')) {
followButtons[i].querySelector('img').remove();
}
} else {
followButtons[i].innerHTML = "Following";
}
} else {
removeClass(followButtons[i], "following");
addClass(followButtons[i], "follow");
if (source == "article") {
followButtons[i].querySelector('span').innerText = "Follow";
if (!followButtons[i].querySelector('img')) {
var plusImg = document.createElement('img');
plusImg.height = "10";
plusImg.width = "10";
plusImg.src = "//staticg.sportskeeda.com/skm/assets/plus-icon.svg";
followButtons[i].querySelector('span').insertAdjacentElement("beforebegin", plusImg);
}
} else {
followButtons[i].innerHTML = "Follow";
}
}
}
}
for(i = 0; i 0) ? userName.substring(0, userName.indexOf(‘ ‘)) : userName;
if (myUserId) {
var ths = this;
var action = ‘follow’;
if(ths.innerText == “Following”) {
action = ‘un-follow’;
}
pureJSAjaxPut(‘https://a-login.sportskeeda.com/en/user/’ + authorId + ‘/’ + action,'{}’,
function (resp) {
data = JSON.parse(resp);
if (data.status == true) {
flipFollowStatus(action);
if (source == ‘profile’) {
getFollowsCount();
}
if(action == ‘follow’) {
showMessage(“Hey! You’ve just followed “+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 source = iframeEmbeds[i].dataset.source;
var allowValue = iframeEmbeds[i].dataset.allow;
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", "");
if (allowValue) {
iframe.setAttribute("allow", allowValue);
}
if (source && iframeWrapper.parentElement) {
iframeWrapper.parentElement.classList.add(source);
}
iframeWrapper.innerHTML = "";
iframeWrapper.appendChild( iframe );
}
}
function logCopyEvent() {
var payload = { event_type: "copy", post_id: 1932947 };
pureJSAjaxPost(trackCopyURL, payload, function() {}, function () {
console.error('Failed to save copy event');
}, null, true);
}
});
(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 followUsCTAs = $all(“.follow-action”);
for (var i = 0; i < followUsCTAs.length; i++) {
followUsCTAs[i].addEventListener("click", function(e) {
var element = e.currentTarget;
var elementClass = element.getAttribute("class");
var payload = {
"title": document.title,
"category": "anime" || "10-celebrities-anime",
"device": "Desktop"
}
if (elementClass.includes("follow-us-cta")) {
payload["position"] = "header";
} else if (elementClass.includes("follow-action-bottom")) {
payload["position"] = "bottom";
} else {
payload["position"] = "top";
}
gtag("event", "Follow_Us", payload);
});
}

(function() {
var article_sponserd_links = $all(“.sponsored_link”);
for (var i = 0; i < article_sponserd_links.length; i++) {
article_sponserd_links[i].addEventListener("click", function(element) {
var sportCategory = "anime" || "10-celebrities-anime";
var isDesktop = "1";
var payload = {
"sponsed_link": element.target.href,
"sponsed_link_text": element.target.innerHTML,
"page_url": window.location.href,
"category": sportCategory,
}
if (isDesktop) {
payload["device"] = "Desktop"
} else {
payload["device"] = "Mobile"
}
gtag("event", "Article_Sponsered_Link_Click", payload);
});
}
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));
}
var bottom_tagline_video_links = document.querySelectorAll('.bottom-tagline-video-link');
for (var i = 0; i < bottom_tagline_video_links.length; i++) {
bottom_tagline_video_links[i].addEventListener('click', trackBottomTaglineClickEvent.bind(this));
}
function trackBottomTaglineClickEvent(element) {
var taglinePosition = element.currentTarget.getAttribute("data-tab");
var taglineUrl = element.currentTarget.getAttribute("href");
var payload = {
"tagline_position": taglinePosition,
"destination_url": taglineUrl
}
trackGAEvent("Clicks_BottomTagline", payload);
}
var bottom_tagline_text_container = document.querySelectorAll('.bottom-tagline');
for (var i = 0; i < bottom_tagline_text_container.length; i++) {
trackBottomTaglineImpression(bottom_tagline_text_container[i]);
}
var bottom_tagline_video_container = document.querySelectorAll('.bottom-tagline-video');
for (var i = 0; i < bottom_tagline_video_container.length; i++) {
trackBottomTaglineImpression(bottom_tagline_video_container[i]);
}
var bottom_tagline_promo_container = document.querySelectorAll('.bottom-tagline-banner');
for (var i = 0; i < bottom_tagline_promo_container.length; i++) {
trackPromoBannerImpression(bottom_tagline_promo_container[i]);
var bannerLink = bottom_tagline_promo_container[i].querySelector('.bottom-tagline-banner-link');
if (bannerLink) {
bannerLink.addEventListener('click', trackPromoBannerClickEvent);
}
}
function trackPromoBannerClickEvent(e) {
var target = e.target.closest(".bottom-tagline-banner-link");
if (!target) return;
var taglinePosition = target.getAttribute("data-tab");
var taglineUrl = target.getAttribute("href");
trackGAEvent("TAGLINE_CLICK", {
"position": taglinePosition,
"variant": "promo-banner",
"destination_url": taglineUrl
});
}
function trackBottomTaglineImpression(element) {
var taglinePosition = element.getAttribute("data-tab");
trackImpressionGAEventWhenInViewport({
element: element,
identifier: "element_" + taglinePosition,
eventName: "Tagline_Impression",
eventParams: {
"tagline_position": taglinePosition,
}
});
}
function trackPromoBannerImpression(element) {
var taglinePosition = element.getAttribute("data-tab");
trackImpressionGAEventWhenInViewport({
element: element,
identifier: "tagline_promo_banner_" + taglinePosition,
eventName: "TAGLINE_IMPRESSION",
eventParams: {
"position": taglinePosition,
"variant": "promo-banner",
}
});
}
// this will fire ga event on anchor tag clicks in article page
var hyperLinks = $all("#article-content p a, #article-content table a");
for (var i = 0; i < hyperLinks.length; i++) {
var hyperLink = hyperLinks[i];
hyperLink.addEventListener("click", sendHyperlinkClickedGAEvent);
}
function sendHyperlinkClickedGAEvent() {
trackGAEvent("Clicks_hyperlinks", {
destURL: this.href,
});
}
})();

(function() {
var spotifyMonitor = setInterval(function() {
var elem = document.activeElement;
if (elem && elem.tagName == “IFRAME”) {
var src = elem.getAttribute(“src”);
if (src && src.indexOf(“open.spotify.com”) > -1) {
clearInterval(spotifyMonitor);
gtag(“event”, “ARTICLE_EMBED_CLICK__SPOTIFY”, {
link: window.location.href
});
}
}
}, 100);
})();
(function() {
function lazyTweetLoader() {
var twitterEmbeds = document.querySelectorAll(“.hidden-lazy”);
var intersectionObserverForLazyHidden = new IntersectionObserver(
function(entries) {
entries.forEach(function(entry) {
if (entry.isIntersecting) {
var verifiedElement = entry.target.querySelector(“.verified”);
removeClass(verifiedElement, “hidden”);
var likeElement = entry.target.querySelector(“.tweet-like-icon”);
removeClass(likeElement, “hidden”);
var retweetElement = entry.target.querySelector(“.tweet-retweet-icon”);
removeClass(retweetElement, “hidden”);
var twitterLogoElement = entry.target.querySelector(“.tweet-logo”);
removeClass(twitterLogoElement, “hidden”);
}
});
}, {
threshold: 0.1
}
);
twitterEmbeds.forEach(function(element) {
intersectionObserverForLazyHidden.observe(element);
});
}
window.addEventListener(“DOMContentLoaded”, function() {
lazyTweetLoader();
});
}());

(function() {
var storyMap = {};
const storyGAObserver = new IntersectionObserver (function (entries) {
entries.forEach(function (story, index) {
if(story.isIntersecting) {
var storyLink = story.target.querySelector(“.list-story-link”);
var storyID = storyLink.getAttribute(“data-id”);
var storyNumber = storyLink.getAttribute(“story-sequence”);
var destination = story.target.querySelector(“.story-link-overlay”).href;
var title = story.target.querySelector(“.block-story-title”).innerText;
trackGAEvent(“MORE_FROM_SK_IMPRESSION”, {
“sequence”: storyNumber,
“destinationURL” : destination,
“destinationTitle” : title
});
story.target.addEventListener(“click”, function() {
trackGAEvent(“MORE_FROM_SK_CLICKS”, {
“sequence”: storyNumber,
“destinationURL” : destination,
“destinationTitle” : title
});
});
storyMap[storyID] = true;
}
storyGAObserver.unobserve(story.target);
});
},
{
threshold: 0.5
});
function observeStoryWrapper() {
var storyWrappers = document.querySelectorAll(“.story-wrapper, .social-story-wrapper”);
storyWrappers.forEach(function(story, index) {
storyLink = story.querySelector(“.list-story-link”);
storyLink.setAttribute(“story-sequence”, index + 1);
storyID = storyLink.getAttribute(“data-id”);
if(!storyMap[storyID]) {
storyGAObserver.observe(story);
}
});
}
window.addEventListener(“DOMContentLoaded”, function() {
document.addEventListener(“scroll”, debounce(observeStoryWrapper, 500) , { passive: true })
});
})();

(function() {
var postId = “1932947”;
if (!postId) {
return;
}
var commentsBadgeElements = $all(“.comments–badge”);
document.addEventListener(“DOMContentLoaded”, function() {
var apiURL = “https://www.sportskeeda.com/comments/count/” + postId + “/ajax”;
pureJSAjaxGetWithPromise(apiURL).then(function(res) {
try {
var data = JSON.parse(res);
if (data.comments_count) {
updateCommentBadgeElements(data.comments_count);
}
} catch (e) {
console.error(e);
}
});
});
function updateCommentBadgeElements(count) {
for (var i = 0; i < commentsBadgeElements.length; i++) {
var commentsBadgeElement = commentsBadgeElements[i];
if (!commentsBadgeElement.parentElement || !commentsBadgeElement.parentElement.dataset.id ||
commentsBadgeElement.parentElement.dataset.id != postId) {
continue;
}
if (count 9 ? “9+” : count;
removeClass(commentsBadgeElements[i], “hidden”);
}
}
}
})();

.signup-msg-cta-wrapper {
position: relative;
flex-direction: column;
width: 100%;
clear: both;
padding: 16px 0;
display: none;
}
.signup-msg-cta-wrapper .logo {
display: flex;
align-items: center;
justify-content: center;
margin-left: 6px;
position: relative;
top: 1px;
padding: 3px;
width: 160px;
z-index: -1;
background-color: #D32F2F;
border-top-left-radius: 4px;
overflow: visible;
}
.signup-msg-cta-wrapper .logo::before {
position: absolute;
left: 160.2px;
top: 0;
z-index: -1;
content: “”;
width: 40px;
height: 24px;
background-color: #D32F2F;
transform-origin: top left;
transform: rotate(45deg);
}
.signup-msg-cta-wrapper .logo img {
width: 136px;
height: 16px;
}
.signup-msg-cta-wrapper .signup-prompt {
display: flex;
justify-content: space-between;
align-items: center;
gap: 4px;
background: linear-gradient(to right, #FEFFF6, #FEFFF5, #E7FEF6);
padding: 7px 20px;
border-radius: 12px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.signup-msg {
display: flex;
flex-direction: column;
gap: 2px;
width: 70%;
}
.signup-msg .sponsor-msg {
display: flex;
align-items: center;
justify-content: left;
}
.signup-msg .sponsor-msg span {
font-size: 16px;
font-weight: 700;
line-height: 28px;
}
.signup-msg .exclusive-msg span {
font-size: 12px;
font-weight: 400;
line-height: 16px;
}
.signup-container {
display: flex;
flex-direction: column;
gap: 5px;
width: 30%;
}
.signup-container .signup-cta {
background-color: #007F0D;
color: #fff;
padding: 8px 20px;
text-decoration: none;
border: none;
border-radius: 33px;
cursor: pointer;
font-size: 16px;
font-weight: 600;
line-height: 24px;
text-align: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.signup-info-container {
display: flex;
align-items: center;
justify-content: center;
}
.signup-info {
text-align: center;
font-size: 10px;
font-weight: 400;
line-height: 14px;
}
.signup-msg-cta-wrapper .close-icon {
position: absolute;
right: 0;
top: 30px;
display: flex;
z-index: 99;
width: 16px;
height: 16px;
cursor: pointer;
border-radius: 50%;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}
.signup-msg-cta-wrapper .close-icon img {
background-color: #999999;
border-radius: 50%;
}
.signup-msg .sponsor-msg .brand-name {
color: #D32F2F;
}
.signup-msg .sponsor-msg .article-count {
color: #007F0D;
}
@media (max-width: 768px) {
.signup-msg-cta-wrapper {
padding: 16px;
}
.signup-msg-cta-wrapper .signup-prompt {
flex-direction: column;
background: linear-gradient(to right, #E3EEFF, #FFFFED, #F1FFFE, #FFEBEB);
gap: 12px;
padding: 11px 20px;
}
.signup-msg {
width: 100%;
height: auto;
margin-top: 2px;
}
.signup-container {
width: 100%;
align-items: center;
gap: 8px;
}
.signup-msg .sponsor-msg {
justify-content: center;
text-align: center;
}
.signup-msg .exclusive-msg {
justify-content: center;
text-align: center;
}
.signup-msg-cta-wrapper .logo {
width: 124px;
}
.signup-msg-cta-wrapper .logo::before {
left: 124px;
}
.signup-msg-cta-wrapper .logo img {
width: 98px;
height: 12px;
}
.signup-msg-cta-wrapper .close-icon {
right: 16px;
top: 30px;
}
}

(function() {
function signupMsgCtaInit() {
Promise.all([
asyncScriptLoader({
src: “/js/production/signup-msg-cta-bundle-9766c85c36.js”,
loadWithAsync: true,
loadWithDefer: true,
onUserInteraction: true,
})
]).catch(function(err) {
console.error(err);
});
}
window.addEventListener(“DOMContentLoaded”, signupMsgCtaInit);
})();

#sk-timeline #stories-list {
background:#fff;
}
.recommended-posts{
margin:20px auto 0;
}

var taboolaScriptLoaded = false;
window._taboola = window._taboola || [];
_taboola.push({ article: ‘auto’ });
(function() {
var userCountry = getCookie(“country_code”);
var IS_GDPR_APPLICABLE = getCookie(COOKIE_GDPR) == “true”;
if (![“IN”].includes(userCountry)) {
if (window.performance && typeof window.performance.mark == ‘function’) {
window.performance.mark(‘tbl_ic’);
}
var scriptInput = {
src: “https://cdn.taboola.com/libtrc/sportskeedaindia/loader.js”,
loadWithDefer: true,
onUserInteraction: true,
attributes: [{
key: “id”,
value: “tb_loader_script”
}]
};
function loadTaboolaScript() {
if (!taboolaScriptLoaded) {
taboolaScriptLoaded = true;
asyncScriptLoader(scriptInput);
}
}
loadTaboolaScript();
}
})();

#taboola-below-article-thumbnails {
padding: 0;
margin: 0;
}

_taboola.push({
mode: “thumbnails-a”,
container: “taboola-below-article-thumbnails”,
placement: “Below Article Thumbnails”,
target_type: “mix”
});

window._taboola = window._taboola || [];
_taboola.push({ flush: true });

(function () {
function lazyLoadArticle() {
var lazyImages = $all(‘img.lazy-img’);
for (var i = 0; i 500) {
image.src = image.attributes[‘data-img’].value;
}
else {
image.src = image.attributes[‘data-img-low’].value;
}
image.className = image.className.replace(‘lazy-img’, ”);
}
window.lazyLoadImages = lazyLoadArticle;
lazyLoadAll();
lazyLoadArticle();
window.addEventListener(‘scroll’, lazyLoadAll);
window.addEventListener(‘scroll’, lazyLoadArticle);
window.addEventListener(‘load’, lazyLoadAll);
})();

(function() {
var comScoreFired = false;
function lazyLoadComscoreScript() {
if (comScoreFired) {
return;
}
comScoreFired = true;
var _comscore = _comscore || [];
_comscore.push({ c1: “2”, c2: “13438550” });
(function() {
var s = document.createElement(“script”),
el = document.getElementsByTagName(“script”)[0];
s.async = true;
s.src =
(document.location.protocol == “https:”
? “https://sb”
: “http://b”) + “.scorecardresearch.com/beacon.js”;
el.parentNode.insertBefore(s, el);
})();
document.removeEventListener(“scroll”, lazyLoadComscoreScript);
document.removeEventListener(“mousemove”, lazyLoadComscoreScript);
document.removeEventListener(“touchmove”, lazyLoadComscoreScript);
}
document.addEventListener(“scroll”, lazyLoadComscoreScript, { passive: true, once: true });
document.addEventListener(“mousemove”, lazyLoadComscoreScript, { passive: true, once: true });
document.addEventListener(“touchmove”, lazyLoadComscoreScript, { passive: true, once: true });
})();

/* */

.message-card {
width: 304px;
height: 70px;
border-radius: 3px;
background-color: #ffffff;
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);
display: flex;
position: fixed;
bottom: 20px;
left: 20px;
padding: 10px 10px 0px 15px;
z-index: 2000;
}
.message-icon {
width: 36px;
height: 36px;
background-color: #e8e8e8;
border-radius: 18px;
display: flex;
position: relative;
margin-top: 10px;
}
.message-img {
background: url(https://staticg.sportskeeda.com/skm/assets/header/btn-notification.svg) no-repeat;
background-size: 20px 20px;
height: 20px;
width: 20px;
display: flex;
position: absolute;
top: 8px;
left: 8px;
}
.message-count {
width: 20px;
height: 20px;
border-radius: 10px;
background-color: #d32f2f;
font-size: 13px;
font-weight: 500;
font-style: normal;
font-stretch: normal;
line-height: normal;
letter-spacing: normal;
color: #ffffff;
display: flex;
position: absolute;
top: -8px;
right: -6px;
justify-content: center;
align-items: center;
}
.message-txt {
padding-top: 5px;
padding-left: 15px;
width: 77%;
font-size: 12px;
font-weight: normal;
font-style: normal;
font-stretch: normal;
line-height: 1.33;
letter-spacing: normal;
color: #555555;
vertical-align: middle;
}
.message-close {
width: 20px;
height: 20px;
content: “✕”;
color: #808080;
margin-left: auto;
cursor: pointer;
font-size: 10px;
border-radius: 10px;
background-color: #e8e8e8;
display: flex;
justify-content: center;
align-items: center;
}
.message-background {
width: 320px;
height: 200px;
position: fixed;
left: 0px;
bottom: 0px;
background: transparent;
z-index: 1000;
}

$(‘.message-close’).addEventListener(“click”, function (event) {
addClass($(“.message-card”), ‘hidden’);
addClass($(“.message-background”), ‘hidden’);
});
function showMessage(message) {
removeClass($(“.message-card”), ‘hidden’);
removeClass($(“.message-background”), ‘hidden’);
$(“.message-txt”).innerHTML = message;
setTimeout(function(){
addClass($(“.message-card”), ‘hidden’);
addClass($(“.message-background”), ‘hidden’);
}, 10*1000);
}

.top-cta-button{
display: block;
width: 78px;
height: 24px;
border-radius: 12px;
background-color: #d32f2f;
border: solid 1px #d32f2f;
color: #fff;
text-transform: uppercase;
padding: 0px 12px;
margin: -4px 10px 0 20px;
cursor: pointer;
font-size: 14px;
text-align: center;
}
.top-cta-button:hover{
background: #BB2F2F;
}
.logged-out .login-cta{
display: block;
width: 78px;
height: 26px;
border-radius: 12px;
background-color: #d32f2f!important;
border: solid 1px #d32f2f;
color: #fff!important;
text-transform: uppercase;
padding: 0px 12px!important;
margin: 0 10px 0 20px!important;
cursor: pointer;
font-size: 14px;
text-align: center;
text-decoration: none!important;
font-weight: normal!important;
}
.youtube {
background-color: #000;
cursor: pointer;
}
.youtube img {
cursor: pointer;
object-fit: cover;
}
.play-button {
position: relative;
display: inline-block;
}
.play-button:before {
content: “”;
position: absolute;
width: 100%;
height: 100%;
z-index: 1;
background: transparent url(‘https://staticg.sportskeeda.com/YouTube_play_button_icon.svg’) center center no-repeat;
background-size: 12%;
}

var fbPixelFired = false;
var pixelID = “952063904834769”;
document.addEventListener(“scroll”, loadFBPixel, { once: true, passive: true });
document.addEventListener(“mousemove”, loadFBPixel, { once: true, passive: true });
function loadFBPixel() {
if(fbPixelFired) {
return;
}
fbPixelFired = true;
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version=’2.0′;n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,’script’,’https://connect.facebook.net/en_US/fbevents.js’);
fbq(‘init’, pixelID);
fbq(‘track’, “PageView”);
fbq(‘track’, ‘ViewContent’);
document.removeEventListener(“scroll”, loadFBPixel);
document.removeEventListener(“mousemove”, loadFBPixel);
}

var SKTrackingModule = (function () {
var COOKIE_NAME = ‘HP_ALGO_DATA_V2’;
var DATASET_SIZE = 10;
var CLIPPING_SIZE = 100;
function getTrackingCookie(cname, defaultValue) {
var name = cname + “=”;
var ca = document.cookie.split(‘;’);
for(var i = 0; i = CLIPPING_SIZE) {
item[‘value’] = CLIPPING_SIZE.toString();
var clipAll = true;
} else {
item[‘value’] = item[‘value’].toString();
}
return {
‘value’: item,
‘clipAll’: clipAll
};
}
function clippingMechanism(data, key) {
if (data[key].length >= 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”:”anime”,”title”:”Anime”}’);
SKTrackingModule.trackSport(category.slug, category.title);
} catch (e) {}

function trackHashValueContentSource() {
var keyValueArray = window.location.hash.replace(‘#’, ”).split(‘=’);
console.log(“VALUES: “, keyValueArray);
if(keyValueArray.length === 2 && keyValueArray[0] === “src”) {
history.replaceState({}, document.title, window.location.pathname + window.location.search); // keep the url with query string
if(keyValueArray[1] === “ARTICLE_PAGE”) {
gtag(‘event’, ‘TRENDING’, {
‘event_category’: “BELOW_CONTENT_FEED_PAGE_LOADED”,
‘event_label’: “1”,
‘non_interaction’: true
});
} else if(keyValueArray[1] === “RELATED_WIDGET”) {
var currentPagePath = window.location.pathname;
gtag(‘event’, ‘RELATED’, {
‘event_category’: “BELOW_CONTENT_FEED_PAGE_LOADED”,
‘event_label’: currentPagePath,
‘non_interaction’: true
});
}
}
}
trackHashValueContentSource();

//see more logic
var contentHolder = $(‘.event-content’) || $(‘.taxonomy-content’);
var taxonomyImg = $(‘.taxonomy-img’);
var taxonomyInfo = $(‘.taxonomy-info’);
$(‘#hp_feed_select’) && $(‘#hp_feed_select’).addEventListener(‘change’, function() {
document.body.scrollTop = document.documentElement.scrollTop = 0;
});
function seeMoreStats(ele) { //show all stats rows
var rows = $all(‘.season-stats-tr’);
for (i in rows) {
if(hasClass(rows[i], “hidden”)) {
removeClass(rows[i], “hidden”);
}
}
var toggleButton = $(‘.see-less-stats’);
if(hasClass(toggleButton, “hidden”)) {
removeClass(toggleButton, “hidden”);
}
addClass(ele, “hidden”);
}
function seeLessStats(ele) { //show less stats rows
var rows = $all(‘.season-stats-tr’);
for (i in rows) {
if(!hasClass(rows[i], “hidden”) && i >= 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

function lazyLoadInFeedNativeAds() {
}

var articleContent = $(‘#article-content’);
var articleTitle = $(‘#heading’).innerText;
var scrollPercent = 0;
var scrollEventRecorded = false;
window.addEventListener(‘scroll’, function() {
var rect = articleContent.getBoundingClientRect();
var height = rect.height, bottom = rect.bottom;
if (bottom <= height*0.75 && scrollEventRecorded == false) {
scrollPercent = 25;
scrollEventRecorded = true;
gtag('event','25%', {
'event_category': 'NTG article milestone',
'event_label': articleTitle,
'event_value': 25 ,
'non_interaction' : true
});
}
});


var countryCodeCookie = getCookie(“country_code”);
if (countryCodeCookie == “US” || countryCodeCookie == “CA”) {
removeClass($(“#advertise-sk-hamburger”), “hidden”);
addClass($(“#app-download-hamburger”), “hidden”);
}
function onSideMenuSearchFocus() {
trackGAEvent(“SEARCH_BUTTON_CLICK”, {
“position”: “hamburger”,
});
}
function onSideMenuSearchValueChanged(input) {
trackGAEvent(“SEARCH_ACTION”, {
“position”: “hamburger”,
“query”: input.value,
});
}
const onSearchTrack = debounce(function (input) {
onSideMenuSearchValueChanged(input);
}, 500);

function loadContentPagesAdDefinitionsScript() {
asyncScriptLoader({
src: CONTENT_PAGES_AD_DEFINITION_SCRIPT_LOCATION,
loadWithAsync: true,
attributes: [
{
key: “id”,
value: “CONTENT_PAGES_AD_DEFINITION_SCRIPT_LOCATION”,
},
],
}).then(function() {
return asyncScriptLoader({
src: CONTENT_PAGES_AD_REFRESH_SCRIPT_LOCATION,
loadWithAsync: true,
attributes: [
{
key: “id”,
value: “CONTENT_PAGES_AD_REFRESH_SCRIPT_LOCATION”,
},
],
});
}).then(function() {
var adCounter = 0;
var infiniteContentAdSlotsNodeList = document.querySelectorAll(‘[id^=infinite-content-ad-]’);
var infiniteContentAdSlots = [];
for(var i = infiniteContentAdSlotsNodeList.length; i–; infiniteContentAdSlots.unshift(infiniteContentAdSlotsNodeList[i]));
var optionsArticleContentAd = { threshold: 0 , rootMargin: ‘200% 0px 200% 0px’};
var intersectionObserverArticleContent = new IntersectionObserver(function(entries) {
entries.forEach(function (oneEntry) {
if (oneEntry.isIntersecting) {
intersectionObserverArticleContent.unobserve(oneEntry.target);
console.log(“ENTERED, infinite content ad viewport”);
googletag.cmd.push(function() {
var adSlot = initInfiniteContentAdUnit(“Desktop_300250_3”);
insertInfiniteContentAdSlot(‘Desktop_300250_3’, adSlot, oneEntry.target, ‘desktop’, adCounter++);
});
}
});
}, optionsArticleContentAd);
infiniteContentAdSlots.forEach(function(adElement) {
intersectionObserverArticleContent.observe(adElement);
});
});
}

var NewCommentNotification = (function () {
var commentsLoaded = false;
var COMMENT_ACTION_STATUS = {
APPROVED: “approved”,
REJECTED: “rejected”,
DELETE: “delete”
}
var commentsCount = 0;
var COMMENT_ACTION_RESPONSE_ITEMS = {
“approved”: {
“text”: “This comment is approved 👍”,
“class”: “approved-text”
},
“delete”: {
“text”: “This comment is deleted ❌”,
“class”: “rejected-text”
}
}
var moderationCountHTMLElement;
function getPendingCommentsCount() {
return new Promise(function (resolve, reject) {
pureJSAjaxGetWithCredentialsFlag(‘https://a-login.sportskeeda.com/en/comment-moderation/pending/count’, function (data) {
try {
var parsedData = JSON.parse(data);
resolve(parsedData);
} catch (exception) {
reject(exception)
}
}, function (err) {
reject(err)
}, true)
})
}
function getIncomingComments() {
return new Promise(function (resolve, reject) {
pureJSAjaxGetWithCredentialsFlag(‘https://a-login.sportskeeda.com/en/comment-moderation/incoming’, function (data) {
if (typeof data === “string”) {
data = JSON.parse(data);
}
resolve(data);
}, function (err) {
reject(err)
}, true)
});
}
function onCommentActionClick(container, comment, statusToBeUpdated) {
// invalid status update check
if (!Object.values(COMMENT_ACTION_STATUS).includes(statusToBeUpdated)) {
return;
}
pureJSAjaxPut(‘https://a-login.sportskeeda.com/en/comment-moderation/update-status’,
Object.assign(comment, { id: comment.ID, status: statusToBeUpdated }),
function (result) {
commentsCount = Math.max(0, commentsCount – 1);
moderationCountHTMLElement.innerText = commentsCount > 0 ? commentsCount : ”;
var commentResponseItem = COMMENT_ACTION_RESPONSE_ITEMS && COMMENT_ACTION_RESPONSE_ITEMS[statusToBeUpdated];
if (commentResponseItem) {
var card = container.querySelector(‘div[data-notification-id=”‘ + comment.ID + ‘”]’);
var cardActionResult = card.getElementsByClassName(‘kcn-action’)[0];
if (cardActionResult) {
cardActionResult.innerText = commentResponseItem.text;
cardActionResult.classList.add(commentResponseItem.class);
}
}
},
function (err) {
console.log(err);
},
null, true
);
}
function displayNewCommentNotifications(container) {
getIncomingComments().then(function (comments) {
if (comments.error == true) {
container.style.display = “none”;
return;
}
var cardsContainer = container.querySelector(‘.kcn-card-container’);
if(comments.length > 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 < 340 || !capabilities) {
return;
}
var notificationContainer = document.getElementById("keeda-comment-notifications-container");
if (notificationContainer) {
if (capabilities.includes('superAdmin') || capabilities.includes('canModerate')) {
NewCommentNotification.init(notificationContainer);
notificationContainer.classList.remove('hidden');
} else {
notificationContainer.parentNode.removeChild(notificationContainer);
}
}
}

:root {
–topHeaderHeight: 49px;
–primaryNavHeight: 42px;
–bottomStickyAdHeight: 55px;
}
.pre-2023 .editor-width-100-pc .fragments-container {
width: 670px !important;
}
.pre-2023 .editor-width-100-pc .fragments-container.full {
width: 100% !important;
}
.pre-2023 .editor-width-100-pc .right-sidebar {
width: 390px !important;
}
.pre-2023 .masthead {
box-shadow: none;
background-color: unset;
}
.pre-2023 .sidebar-toggle #main-menu {
float: unset;
padding: unset;
color: unset;
font-weight: unset;
margin: unset;
}
.pre-2023 .masthead .sidebar-toggle button {
height: 14px !important;
}
.pre-2023 #keeda-profile-container {
position: unset;
float: unset;
right: unset;
top: unset;
}
.pre-2023 #keeda-profile-container a.login-cta {
background: #D32F2F !important;
border-radius: 30px !important;
padding: 6px 14px !important;
white-space: nowrap !important;
text-transform: uppercase !important;
color: #FFFFFF !important;
font-weight: 400 !important;
font-size: 14px !important;
line-height: 12px !important;
}
.pre-2023 .keeda-side-menu #keeda-profile-container a.login-cta {
margin-left: 20px !important;
margin-right: 20px !important;
padding: 10px 14px !important;
}
.pre-2023 .keeda-side-menu #keeda-profile-container .toggle {
margin-left: 35px !important;
}
.pre-2023 .share-text-holder.share-btn {
cursor: pointer;
background: none;
border: none;
display: flex;
gap: 3px;
align-items: center;
}
.pre-2023 .share-text-holder.share-btn span {
padding: 0;
margin: 0;
font-weight: 500;
color: #A7A7A7;
}


Leave a Reply

Your email address will not be published. Required fields are marked *