Asurvio Page Boost -- AdGuard relabel
"yarn install" to get packages
"yarn filters" to update filters. This does not need to be done with every commit. IMPORTANT: If you update the filters, make sure to add our whitelisted domains into filter_2.txt so it's part of the base list. Check the Title at the top of the file to ensure it's the rig 8000 ht one in case they change the file name: "Title: AdGuard Base filter" Our domain whitelist is in Confluence: https://asurvio.atlassian.net/wiki/spaces/SOLVEIQ/pages/933134337/Whitelisted+Domains Put each domain on its own line in the following format, replacing "example.com" with the domain to whitelist: @@||example.com^$document
"yarn dev" for dev build
"yarn release" for release build
builds will go in the "build" folder and can be loaded into Chrome through the extension manager by clicking the "load unpacked" button and selecting the folder
Below copied from AdGuard:
Starting from January 2023 the old Manifest V2 extensions will be deprecated and the only way to achieve content blocking in Chrome would be to use the new Manifest V3.
In mid-2021, we started working on the prototype of a new extension that would be able to block ads even within the strict limits of Manifest V3. The task was not easy, but we're finally able to present the first working prototype of an MV3-enabled ad blocker.
The prototype is fully functional and if you're not a power-user, you may feel little difference with the existing MV2-blockers. Unfortunately, this does not mean that everything is great and we suggest you to read the blog post to learn about all the limitations.
nodejs
- only version 16.yarn
- nodejs package manager.
yarn install
- install necessary dependencies.yarn filters
- download the latest versions of the filter lists built-in the extension and convert them to declarative format.
yarn release
- release build.yarn dev
- dev build.yarn dev --watch
- prepare the dev build and monitor the files for changes. Note, that this command will not run filters conversion, you'll need to do it manually.
Some of the extension capabilities are only available when you install it as an "unpacked" extension. Also, if you want to test how it works with a different version of your filter, you need to make changes to your list manually and then rebuild & reload the extension.
So here's what you need to do:
- Build the extension with
yarn dev chrome --watch
. - Go to
chrome://extensions
, enable "Developer mode", click "Load unpacked" and choose the newly built extension (it will be located inbuild/dev/chrome
). - In order to see how it works, open Chrome's Developer Tools and switch to the "AdGuard" tab. Refresh the page to see what has been blocked and by which rule.
- Let's try changing something. For instance, you may want to change the Base
list. Open
src/filters/chrome/filter_1.txt
and implement your changes. - Run
yarn filters-convert
to prepare the static lists. - Since you're running with
--watch
, the extension will be re-built automatically, but you still need to reload the extension in Chrome. You will also need to reload the "AdGuard" tab in Dev Tools or simply reopen Dev Tools to make it work.
tabs
- this permission is required in order to get the URL of the options page tabalarms
- this permission is required in order to set the pause protection timercontextMenus
- this permission is required in order to create a context menuscripting
- this permission is required in order to inject assistant script only in the required pagesstorage
- this permission is required in order to save user settings, user rules and custom filtersdeclarativeNetRequest
- this permission is required in order to block, redirect and modify URL requestsdeclarativeNetRequestFeedback
- this permission is required in order to create a log of the blocked, redirected or modified URL requestsunlimitedStorage
- this permission is required in order to save large filterswebNavigation
- this permission is required in order to catch the moment for injecting scriptlets
nodejs
- https://nodejs.org/en/download/, only version 16yarn
, nodejs package manager - https://classic.yarnpkg.com/lang/en/docs/install