Skip to content

Instantly share code, notes, and snippets.

@phylliswong
Last active April 14, 2021 00:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phylliswong/ca42a3ebbc0b9576a558c11563e8ef2a to your computer and use it in GitHub Desktop.
Save phylliswong/ca42a3ebbc0b9576a558c11563e8ef2a to your computer and use it in GitHub Desktop.
TruGreen Click to Call
module.exports = function() {
var url = window.location.href;
var nodes = document.querySelectorAll('[href^="tel"]');
var callBtns = Array.prototype.slice.call(nodes);
callBtns.forEach(function(btn) {
btn.addEventListener('click', function() {
evolv.client.emit('tap_to_call.clicked');
})
})
};
{
"name": "evolv-trugreen-click-to-call-event",
"version": "1.0.1",
"main": "index.js"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment