Skip to content

Commit

Permalink
Automatically fetch data-* attributes (#74)
Browse files Browse the repository at this point in the history
* use xpath to match data-* attributes, try on page load and in response to mutation event.

---------
Co-authored-by: Ilya Kreymer <[email protected]>
  • Loading branch information
benoit74 authored Jul 12, 2024
1 parent 15b1fd8 commit ecf3093
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ see [Browsertrix Crawler](https://github.com/webrecorder/browsertrix-crawler) fo

Once the behavior script has been injected, run: `__bx_behaviors.init(opts)` to initialize which behaviors should be used. `opts` includes several boolean options:

- `autofetch` - enable background autofetching of img srcsets, and stylesheets (when possible)
- `autofetch` - enable background autofetching of img srcsets, stylesheets (when possible) and any data-* attribute
- `autoplay` - attempt to automatically play and video/audio, or fetch the URLs for any video streams found on the page.
- `autoscroll` - attempt to repeatedly scroll the page to the bottom as far as possible.
- `timeout` - set a timeout (in ms) for all behaviors to finish.
Expand Down
Loading

0 comments on commit ecf3093

Please sign in to comment.