Has anyone had any luck using this with Cloudflare's email obfuscation feature? Due to how they are manipulating the DOM, any mailto: links end up throwing "Uncaught TypeError: o.previousSibling.checkVisibility is not a function".

Comments

jackfoust created an issue. See original summary.

itmaybejj’s picture

Assigned: Unassigned » itmaybejj

Oh interesting. That should not be hard to fix. Do you have an example site where I can study the markup?

jackfoust’s picture

https://www.andovervillageny.gov/ should work. There is an email link on the footer so any page will throw the exception. It is interesting how in chrome console it shows the real email address and in view source it shows the cloudflare obfuscation.

  • itmaybejj committed 955536fe on 1.0.x
    fix: #3609387 cloudflare email obfuscation
    
    By: jackfoust
    By: itmaybejj
    

  • itmaybejj committed 49a33d00 on 1.0.x
    fix: #3609387 cloudflare email obfuscation
    
    By: jackfoust
    By: itmaybejj
    
itmaybejj’s picture

I can't get it to throw there but I did reproduce the error by putting an HTML comment node as the second to last word.

This tag will fix that. It will still cause false negatives (it should iterate past the code comment), but that's how the existing code works too so that can be a problem for a larger refactor.

itmaybejj’s picture

Status: Active » Fixed

marking as fixed with fingers crossed. Reopen if I'm wrong!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.