Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No selector callbacks being invoked for certain sites #54

Open
justinhelmer opened this issue May 19, 2021 · 2 comments
Open

No selector callbacks being invoked for certain sites #54

justinhelmer opened this issue May 19, 2021 · 2 comments

Comments

@justinhelmer
Copy link

I apologize if this is actually an issue with the underlying trumpet module but this seems like the right place to start.

For some sites, everything works perfectly. For others, no selector matching works. Digging into the code, I can see that the selectors are being registered with tr.selectAll (one for head and one for body), but the callbacks are being invoked.

The only obvious difference between the two sites is that one is gzipped and one is not.

To reproduce:

  • Clone the simple-harmon-example repo I set up to demonstrate the issue
  • npm install dependencies
  • Test a working site by doing the following:
    • Run node index.js https://www.intellimize.com
    • Load https://localhost:8000
    • See the following console output, indicating that the selectors are matched and callbacks invoked:
in head
in body
  • Next test a site that does not work - you will not see any console output:
node index.js https://www.blackriflecoffee.com

Any help would be greatly appreciated.

@No9
Copy link
Owner

No9 commented May 20, 2021

If it is due to the gzip content you may need to look at the gzip example https://github.com/No9/harmon/blob/master/examples/gzipped.js

@justinhelmer
Copy link
Author

It is actually the non-gzipped URL that is not working.

Also from what I can tell by reading through the source, gzip is supported by this module already (as is proof by the fact that the gzipped page intellimize is working)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants