I was scrolling on two completely separate web pages, pages I have visited many times before. However they do both have ads. My browser is Opera, and I use an adblocker (on the other site it doesn’t always block all ads). After opening the page and scrolling on it for a while, I’m not sure but after maybe 5-30 seconds on the page, the browser redirected me to a different page (in the same tab), which was a page advertising an ISP/phone company, but it was a false ad, which would surely give viruses/etc if clicked on. These incidents happened within 10 hours of each other, and when the second one happened, I had many tabs open, including one from the page where it happened first.
In the past I’ve encountered many kinds of popups and ads, but this one seems strange because 1) it directed me to the same malware-ad page from two totally separate pages (the topic of these pages is nothing similar, one is blog about music lyrics and the other a game wiki), and 2) I did not click anything at the moment when it redirected me to that page. Also my Opera settings says “popups and redirecting” is disabled. A whois-service said the IP had been registered yesterday.
Quick virus scan didn’t find anything, I am now running full scan. I want to know how this kind of thing works, and what should I do to prevent it / does it mean I have malware?
EDIT1: I googled about the first site that did this. I reveal that the site is wowhead.com (wiki-style page for World of warcraft -videogame). There was lots of forum threads complaining about redirecting ads on that page, dating from 2016 to 2019. If it was caused by their ad, I’m not sure why my adblock let that ad through. Also, I had a wowhead tab open while browsing the other page that did this, so is it possible that the same script would somehow redirect me in another tab of a different page?