Skip to content
forked from stefanw/bibbot

VOEBBot is a browser extension that removes the paywall on German online news sites using your library account's access to press databases.

License

Notifications You must be signed in to change notification settings

skomski/voebbot

 
 

Repository files navigation

VOEBBot

Official website

Development

This uses rollup to build the extension files. Install and run like this:

npm install

# Run this during development
npm start

Extension overview

The extension has four different entry points:

  • The content script in src/content.js runs on the news article page, communicates with background script
  • the background script in src/background.js which opens new tabs, navigates them around and scrapes the content
  • the options page in src/options.js is the options page for the extension
  • the popup in popup/ is opened when the extension icon in the toolbar is clicked

These are the data pieces inside:

  • src/providers.js contains entities that you authenticate against and that grant access
  • src/sources.js contains databases that you can get access to through providers
  • src/sites.js contains news sites, how to extract their meta data and which source could provide access

Additionally user data like credentials and chosen provider is stored via browser.storage.sync.

Tests

There is a test setup for sites using Jest and Puppeteer that can be run with:

# install dependencies
npm ci
# Always run build before tests, as test uses build files!
npm run build
# Run tests
npm run test
# Run tests with actual browser window for one domain
HEADLESS=false npm run test -- -t "test www.zeit.de"

Add testing data to site objects like this:

// ...
  'www.example.com': {
    examples: [
      {
        url: 'http://example.com/article.html',
        selectors: {
          query: 'The string resulting from query selector'
        }
      }
    ],
    // optional setup async function
    testSetup: async (page) => {
        // page is pupeteer page
        // use this for initial page setup
    },
// ...

Release

  1. Run npm version <major|minor|patch>
  2. git push --tags origin main
  3. GitHub release Action will build, create release, sign Firefox extension, submit to Chrome Web Store and update website.

About

VOEBBot is a browser extension that removes the paywall on German online news sites using your library account's access to press databases.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 77.8%
  • HTML 13.4%
  • CSS 8.3%
  • Shell 0.5%