0
<script type="text/javascript">
onmousemove = function adfy() {
adfy_id = '.html'; //replace with your ID
for (var i = 0; i < document.links.length; i++) {
var hrefer = document.links[i].href;
if (hrefer.match(".html") || hrefer.match("javascript:") || hrefer.match("#")) {
document.links[i].href = document.links[i].href;
} else {
document.links[i].href = document.links[i].href + adfy_id;
}
}
}
</script>
<a href="test.html">com .html</a>
<a href="test">sem .html</a>
I’m using this codido adfly para por . html in the links of my site, there are more than 300 so I don’t want to do it manually. It worked very well, but it is disturbing other links that do not need it.
I was wondering if there’s any way to make it work in just one div?
I don’t have time to answer now, but 1 question: your page has dynamic content or HTML is the same since the page loads.
adfy_id
is declared somewhere?– Sergio
HTML, not just in the function
– Lucas Oliveira