Git Product home page Git Product logo

trackmenot-chrome's People

Contributors

vtoubiana avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

trackmenot-chrome's Issues

forking TrackMeNot-Chrome

If there is more then one RSS feed this extension never gets results from any other then the last feed and sometimes it takes results from the last feed multiple times. So you end up with multiple extracted feeds with the same content.

This is caused by bug in handling of async requests by req.onreadystatechange() in doRssFetch(). (Chrome 58)

I got irritated by this bug so I have rewritten this function:

    function doRssFetch(feedUrl) {
        debug('doRSSFetch: ' + feedUrl);
        try {
            var req = new XMLHttpRequest();
            req.open('GET', feedUrl, true); // false == not async but this is depreciated
            req.onreadystatechange = function() {
                if (req.readyState == 4 && req.status == 200 && req.responseXML != null) {
                    debug("doRSSFetch: Recieved feed from " + feedUrl);
                    var adds = extractRssTitles(req.responseXML, feedUrl);
                    // debug(req.responseXML);
                    // debug(req.responseText);
                }
            }
            req.send();
        } catch (ex) {
            cout("[WARN]  doRssFetch(" + feedUrl + ")\n" +
                "  " + ex.message + " | Using defaults...");
            return; 
        }
    }

Unfortunately it had been only a start for me as I have got sucked in experimenting with augmenting logic of this extension.

The result is this fork

I have stripped away some logic, refactored some code and also added XregExp and nlp_compromise libraries. So now it can handle queries in other scripts like Chinese (if you seed with some foreign RSS feed for example) and also do some NLP - extracting more meaningful queries from search results. This could be of course extended.

I am not trying to say that mine is better. Just enjoyed testing some ideas.

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.