Last active
April 14, 2021 00:18
-
-
Save phylliswong/ca42a3ebbc0b9576a558c11563e8ef2a to your computer and use it in GitHub Desktop.
TruGreen Click to Call
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | |
}) | |
}) | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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