`; // 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); }); });

Film Interviews

How Son Lux brought experimental post-rock energy to Marvel’s ‘Thunderbolts*’

NME joins the Oscar-nominated trio at Abbey Road Studios for a sneak-peek at their massive MCU score

‘Sinners’ director Ryan Coogler and composer Ludwig Göransson on their creative relationship: “We have to give people a unique, visceral movie experience”

The longtime collaborators talk about making their fifth film together: the genre-blending vampire thriller 'Sinners'

‘Shōgun’s Cosmo Jarvis on the gritty ‘Warfare’ and Christopher Nolan’s’ ‘Odyssey’: “There’s always more to do”

From scrappy folk singer to working on some of the biggest projects around, Jarvis tells NME how he’s just getting started

Finn Wolfhard on his post-‘Stranger Things’ summer: “This is the start of a different chapter”

Gen-Z indie's poster boy has left Hawkins for good – and he's got a lot going on

Jason Momoa on hosting Black Sabbath’s final gig: “It’s the greatest show on Earth”

Hollywood’s biggest metalhead tells NME how the band’s iconic debut album introduced him "to everything”

New doc ‘One To One: John & Yoko’ is a lesson in using your platform for good

Director Kevin Macdonald talks us through his experimental film

“’Dig!’ could never be made again”: why the drug-fuelled rock doc is the last of its kind

You won’t catch any modern bands hoovering up lines of gak on camera

Robert De Niro on lunch with Noel Gallagher: “Did I go away and listen to Oasis? No!”

The Hollywood icon and Britpop legend met at Bono’s house in 2016

Cate Blanchett praises “fantastic” Timothée Chalamet’s Bob Dylan portrayal in ‘A Complete Unknown’

The Hollywood legend played Dylan in Todd Haynes' 2007 film ‘I’m Not There’

Pamela Anderson is back in business: “I feel like I’ve just begun”

How a critically acclaimed acting comeback put the ‘90s pin-up on a new path
Advertisement