Giter VIP home page Giter VIP logo

adnauseam-chrome's People

Contributors

cyrussuen avatar dhowe avatar

Stargazers

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

Watchers

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

adnauseam-chrome's Issues

Next steps

Keeping a list of next steps here (though each will be a separate issue):

  • PageVisitor (#4): Visit URLs in a hidden tab/window that is invisible to the user
  • Logger (#3) : A simple logger that writes JSON-formatted messages to a file
  • RequestHandler (#2): Listens-for and examines incoming/outgoing requests, handles cookies/headers
  • AdBlock Integration (#5): Need to override at least one function in an (unmodified) adblocker

RequestHandler

This entity should handle registering, de-registering, and listening for request-related events.

The equivalent events in Firefox are "http-on-modify-request" and "http-on-examine-response".

It needs to be able to read and modify cookies and headers for all requests.

It also needs to be able to distinguish whether requests are generated by ADN; that is, whether they have come from AdNauseam's hidden tab/window.

Logger

A simple logger that writes JSON-formatted messages to a file (generally adnauseam.log, which it should create if not existing). It should have functions like:

Logger.log(); // should take msg, object or multiple of either
Logger.warn(); // should take msg, exception or both
Logger.err(); // should take msg, exception or both
Logger.dispose(); // cleanup the logger on shutdown
Logger.deleteLog();

PageVisitor

Visit URLs in a hidden tab/window invisible to user.

In FF, we use the page-worker API for this. In Chrome we may need to create and manage an iframe on the background page (though I really hope there's a nicer way to do this). Another option might be this.

  • Step 1: Visit a URL and load the returning page in a hidden tab/window/iframe
  • Step 2: Store a list of URLs to be visited, trying each one on a timer (only one should be in-process at a time)
  • Step 3: Handle failures -- on failure, the URL should be visited again after a pause; after the 3rd failure, give-up
  • Step 4: Harden -- disable JS, Flash, plugins, popups, etc on returned page

AdBlock Integration

Need to override at least one function in an (unmodified) adblocker.

This is tricky if not impossible (any Chrome gurus want to weigh in on this?) when the adblocker does not expose a public API, as Adblock Plus does in the FF case. Which means we may end up needing to fork a version of an existing adblocker... at which point it may be easier to just package ADN as a single extension, rather than using the 2-install model we have for FF.

That question aside, one option that looks promising, though we would need to check licensing, is AdBlock. See links to source below. At first glance, it appears that replacing/overriding elementPurger.onPurgeRequest() does what we need...

svn:  http://adblockforchrome.googlecode.com/svn/trunk/ adblockforchrome-read-only
releases: http://code.getadblock.com/releases/

Some info on cross-extension messaging

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.