`; // target the cover menu item const target = document.querySelector('#menu-header-uk-1 .menu-item-2911415'); // position popover to the left if the target is on the right half of the screen if (target.getBoundingClientRect().right > document.documentElement.clientWidth / 2) { popover.classList.add('left'); } target.appendChild(popover); // used to check if the article info let articleTitle = ''; // fetch info once, then show popover on hover target.addEventListener('mouseover', async () => { if (!articleTitle) { const [coverRes, articleRes] = await Promise.all([ fetch('https://www.nme.com/wp-json/wp/v2/posts?categories=268320&per_page=1&_fields[]=thumbnail_url&_fields[]=featured_media'), fetch('https://www.nme.com/wp-json/wp/v2/posts?categories=268101&per_page=1&_fields[]=title&_fields[]=link'), ]); const [cover, article] = await Promise.all([coverRes.json(), articleRes.json()]); articleTitle = article[0].title.rendered; document.querySelector('#the-cover-article-title').textContent = articleTitle; document.querySelector('#the-cover-article-title').href = article[0].link; document.querySelector('#the-cover-image-link').href = article[0].link; document.querySelector('#the-cover-read-now').href = article[0].link; document.querySelectorAll('#the-cover-image').forEach((img) => { // add size modifier to the cover image url img.src = cover[0].thumbnail_url.replace(/(\.[\w\d_-]+)$/i, '-400x500$1'); }); // document.querySelector('#the-cover-image-link').href = article[0].link; } setTimeout(() => popover.classList.add('active'), 0); }); // hide popover on mouse leave target.addEventListener('mouseleave', () => { setTimeout(() => popover.classList.remove('active'), 0); }); });

ROCK AGAINST RACISM!

The band say they're "dedicated to melody and bringing people together through music"...

Libertines are to headline a LOVE MUSIC HATE RACISM gig at the LONDON ASTORIA (March 16).

The Libertines will also be joined by Buzzcocks, Eighties Matchbox B-Line Disaster, Miss Black America and The Others for the event inspired by the Rock Against Racism movement of the late ‘70s – originally supported by Buzzcocks and Clash.

Advertisement

Guitarist and singer Pete Doherty told NME.COM: “For evil to triumph, all that is necessary is that good people do nothing. Apathy is a killer and it’s easy to be complacent. We’re dedicated to this in the same way we’re dedicated to melody and bringing people together through music.”

He added: “The BNP is on the rise like never before and it’s a threat to us all. They have more councillors across Britain than ever. In 2003 they averaged about 17% in local elections and they’re also ready to field candidates in the European parliament. It breeds on hatred, violence and racism.”

Tickets for the gig are priced at £12.50. For availability call the NME Ticketline on 0870 1 663 663.

You May Also Like

Advertisement

TRENDING

Advertisement

More Stories