Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

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

License

NotificationsYou must be signed in to change notification settings

darkdragon-001/bibbot

 
 

Repository files navigation

Official website

Development

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

npm install# Run this during developmentnpm start

Extension overview

The extension has four different entry points:

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

These are the relevant players:

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

For details on how to construct any of these entities, have a look atsrc/types.ts

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

Tests

There is a test setup for sites usingJest andPuppeteer that can be run with:

# install dependenciesnpm ci# Run linting and type checkingnpm run lintnpm run check-types# Always run build before tests, as test uses build files!npm run build# Run testsnpm runtest# Run tests with actual browser window for one domainHEADLESS=false npm runtest -- -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 functiontestSetup:async(page)=>{// page is pupeteer page// use this for initial page setup},// ...

Release

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

About

BibBot 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

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript77.0%
  • HTML10.3%
  • CSS6.6%
  • JavaScript5.7%
  • Shell0.4%

[8]ページ先頭

©2009-2025 Movatter.jp