https://github.com/stefanw/bibbot
BibBot is a browser extension that removes the paywall on German online news sites using your library account's access to press databases.
https://github.com/stefanw/bibbot
paywall
Last synced: about 1 year ago
JSON representation
BibBot is a browser extension that removes the paywall on German online news sites using your library account's access to press databases.
- Host: GitHub
- URL: https://github.com/stefanw/bibbot
- Owner: stefanw
- License: gpl-3.0
- Created: 2020-03-22T18:32:22.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2025-03-14T13:15:39.000Z (over 1 year ago)
- Last Synced: 2025-04-14T16:57:20.036Z (over 1 year ago)
- Topics: paywall
- Language: TypeScript
- Homepage: https://stefanw.github.io/bibbot/
- Size: 1.63 MB
- Stars: 539
- Watchers: 14
- Forks: 83
- Open Issues: 198
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# BibBot
[Official website](https://stefanw.github.io/bibbot/)
## Development
This uses rollup to build the extension files. Install and run like this:
```sh
npm install
# Run this during development
npm start
```
## Extension overview
The extension has four different entry points:
- The content script in `src/content.ts` runs on the news article page, communicates with background script
- the background script in `src/background.ts` which opens new tabs, navigates them around and scrapes the content
- the options page in `src/options.ts` 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 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 at `src/types.ts`
Additionally user data like credentials and chosen provider is stored via `browser.storage.sync`.
## Tests
There is a test setup for sites using [Playwright](https://playwright.dev/) that can be run with:
```bash
# install dependencies
npm ci
# Run linting and type checking
npm run lint
npm run check-types
# 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
npm run test -- --headed -g "zeit.de"
```
Add testing data to site objects like this:
```javascript
// ...
'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 playwright page
// use this for initial page setup
},
// ...
```
## Release
1. Run `npm version `
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.