Giter VIP home page Giter VIP logo

nyt-byline-chrome's People

Contributors

pdugan20 avatar

Watchers

 avatar

nyt-byline-chrome's Issues

Match on relative URLs instead of absolute URLs

Thanks for creating this extension!

Unfortunately the version from the Chrome Web Store wasn't working at all for me, because it was looking for the absolute URLs coming out of the feed, whereas all the links on the NYT homepage are relative for me. (Not sure if that's a recent change or you're seeing something different.)

I fixed this by replacing

url = url.split('?')[0];

with

url = url.match(/https:\/\/[^\/]+([^\?]+)/)[1];

(I'd submit a PR but the current code isn't in the repo.)

Run on document_idle instead of document_end

When set to document_end, the bylines were appearing and then disappearing as the page loaded further. I didn't look into what the page was doing to clear those — I assume some view layer that's updating server-rendered components — but using document_idle fixed it for me.

Unfortunately the bylines appear a good bit later with document_idle, so an alternative would be figuring out why they're disappearing and whether there's a better trigger to use to know when it's safe to add them, but this is better than having them disappear.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.