// get link window.location.href //condition with link if (window.location.href =='https://www.YourLink.com') { console.log('it's true') }else{ console.log('it's false') }