Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Modes and Mode Rules
A Mode is what functionality the extension disables on a page. Currently, there are only two modes:
autoplay-only- Only autoplay is disabled on the page.
nothing- No features are disabled on the page. When disabling autobuffering is implemented, a third Mode (
autobuffer-and-autoplay) will be added. See the [Project Status and Roadmap page](Project Status and Roadmap) for more information.
A Mode Rule is a setting for a domain that specifies what mode that pages from that domain will have.
A Mode Rules List is a collection of Mode Rules. It is viewed and stored (in the local web browser profile) in plain-text format. A Mode Rules List can be configured in two ways:
- Per domain via the Browser Action Popup (see the [Browser Action and Popup page](Browser Action and Popup) page for more information about the Browser Action Popup)
- Configured manually via the [Options Page](Options Page)
NOTE: There is no "whitelist" concept defined in the extension. The Mode Rules List provides equivalent functionality, but it has features that go beyond a whitelist. Please do not use "whitelist" as an alias for Mode Rules List.
Mode Rules List Format and Behavior
Here's an example of a Mode Rules List that explains everything:
# Here's a comment. Comments always begin with "#" and end with a new line # The format for a Mode Rule is as follows: # (Domain Name) (Mode name) (optional prevent-deletion flag) # Make sure that each value is separated by one space example.com autoplay-only # Disable autoplay on example.com and *.example.com (e.g. bar.example.com, foo.bar.example.com, etc.) # Mode Rules of a subdomain have precedence over Mode Rules of its parent domain. another.example.com nothing # Do not disable anything on another.example.com and *.another.example.com # Mode Rules with the same domain name are not allowed another.example.com autoplay-only # Setting Mode Rules via the Browser Action Popup will automatically modify Mode Rules here # Only the Mode Rule that matches a page's domain name EXACTLY will be modified # If the new Mode is the same as the one of a parent domain, the Mode Rule will be deleted if one of the two conditions are met: # 1. It matches that of a parent domain # 2. It matches the default mode # Otherwise if no such Mode Rule exists, one will be appended to this list # To prevent the deletion of mode rules, add the "prevent-deletion" flag yet-another.example.com autoplay-only prevent-deletion