Skip to content

Instantly share code, notes, and snippets.

@sysnucleussupport
Created July 1, 2020 09:40
Show Gist options
  • Save sysnucleussupport/12fe2bc720b93727edc405b99711d82d to your computer and use it in GitHub Desktop.
Save sysnucleussupport/12fe2bc720b93727edc405b99711d82d to your computer and use it in GitHub Desktop.
JS code to Open Contact link of the website (if contact link is available) :
var buttons = document.getElementsByTagName('a');
for (var i = buttons.length - 1; i >= 0; i--) {
var button = buttons[i];
if(button.innerText=='Contact'|button.innerText=='CONTACT'|button.innerText=='CONTACT US'|button.innerText=='Contact Us') {
button.click();
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment