Add custom JS on all amp pages
-
Can you answer how to add this script on amp pages ?
var allLikeLink = document.querySelectorAll("button[data-href]"); for(var i=0; i<allLikeLink.length; i++){ allLikeLink[i].addEventListener("click", function(){ var link = this.getAttribute('data-href') if (link === "a") { link = 'https://www.google.com/';} window.open(link, '_blank'); }, false); }
I read about amp-iframe but don’t found support in plugin
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Add custom JS on all amp pages’ is closed to new replies.