What exchange did you send to? Was it a well known one or a small one. Your browser window appears to show there's only one tab open. Did your browser redirect from your exchange page to that scam page?
Electrum has never shown me web popup ads.
Where did you download your electrum wallet from, and did you pgp verify it was the authentic wallet installer and not a fake?
If you still have the installer try scanning it using this website to check if it's clean.
https://www.virustotal.com/