Please read important announcements here: NanoAdblocker/NanoCore#362
Restarting fresh
A patch driven fork of uBlock Origin.
Upstream commit pin: 76eaef4d2b13bbc1b64d230182cac8f6523a9b17
or 1.27.10
Please submit issues to the Nano Core issues tracker.
Nano Core 2 has some extra locale strings, most of them are for Nano Linter.
You can contribute to localization here: https://crowdin.com/project/nano-adblocker
Your language is not listed? Submit an issue to let me know.
- Install latest version of Git and Node.js.
- In an appropriate directory, run:
git clone --depth 1 https://github.com/NanoAdblocker/NanoCore2.git
git clone --depth 1 https://github.com/NanoAdblocker/NanoFilters.git
git clone --depth 1 https://github.com/jspenguin2017/Edgyfy.git
git clone --depth 1 https://github.com/jspenguin2017/uBlockProtector
- Run
git clone https://github.com/gorhill/uBlock.git
in an appropriate directory to get upstream. Check out a tag or commit as appropriate. - In Nano Core 2 repository:
- Navigate to
/term
directory and runnpm install
. - Update
/config.nano.js
as appropriate. - Run
node ./term
to open Nano Core 2 Terminal.
- Navigate to
Note: The private repository Prototype
is required for publishing.
You should not modify the upstream repository, instead, use Nano Core 2 Terminal to create and manage development environment.
reset Delete development environment and create a fresh one using upstream
repository, uncommitted changes in the fresh development environment
will be cleared
apply Apply all existing patches, in order, starting from the beginning
sync Resynchronize all existing patches, in order, starting from the
beginning
cont Clear uncommitted changes and continue to resynchronize patches
starting from the last one that failed or from the beginning as
appropriate
mark Create a patch based on the difference between tip of resynchronize
patches and current code in development environment
make Build extension from development environment
pack Build, test, then package the extension
check Check the syntax of files under the "/src" directory
publish Build, test, package, then publish the extension
Optionally pass browser name to publish for only one browser
clean Remove all build files
lmake Build English locale file from locale definition
lsync Synchronize (non-English) locale files with the latest build of the
Crowdin project
This will not rebuild the Crowdin project even if there are changes
config Print active configuration data
reload Reload configuration data
exit Exit the terminal
- Run
mark
- Copy generated patch file to an appropriate directory
- Give the new patch a good name
- Add it to the README file
- Add it to the configuration file
- Run
reload
in the Terminal
- Give the patch a new name
- Update the README file
- Update the configuration file
- Run
reload
in the Terminal
- Delete the patch file
- Update the README file
- Update the configuration file
- Run
reload
in the Terminal
- Pull filters updates
- If needed, pull upstream updates then update about string and commit pin
- If needed, pull upstream updates to build scripts
- If needed, pull upstream updates to
assets.json
andmanifest.json
- If needed, pull upstream updates to
1p-filters.js
andasset-viewer.js
- If needed, build and pull locale updates
- Bump version number
- Perform sanity tests
- Add tags to repositories, and upload packages
- Upload packages to extension stores
These are the potential problems to look out for:
- Changes to development build detection logic
- Changes to Font Awesome related CSS
- Changes to image resources
- Update build scripts to adapt
- Changes to
/assets
directory structure - Changes to
scriptlets.js
format- Update build scripts and extended script snippets manifest to adapt
- Changes to redirect declaration maps format in
redirect-engine.js
- Update
nano-background.js
to adapt
- Update
- Renaming or removal of
messaging
andpopupData
variables inpopup.js
andpopup-fenix.js
- Changes to filters header parsing logic in
storage.js
- Update MirrorEngine to adapt
- Changes to CNAME uncloaking Chromium support
- Consider changing the default settings to disabled
- Changes to local IP detection logic in
storage.js
- Update build scripts in NanoFilters and NanoMeow legacy server to adapt
- Changes to filters syntax
- Update NanoFilters, NanoContrib, and Nano Defender Integration to adapt
- Changes to documented behaviors
- Update documentations in NanoCore, NanoCore2, and NanoDoc to adapt
- When assets are removed
- Open an issue in UltimateMirror to schedule removal of matching mirrored file
- Remove the mirrored file after a few months
- When assets that are enabled by default have changed
- Update NanoFilters build scripts
- Delete and refresh third party assets cache
When there is a severe issue with the content of a subresource, an intervention can be easily placed with the help of UltimateMirror and MirrorEngine:
- Lock the subresource in UltimateMirror
- Remove problematic content from UltimateMirror, if needed
- Update
assets.json
so the sanitized subresource will be loaded from UltimateMirror
Later, the intervention can be lifted as follows:
- Update
assets.json
as appropriate, the subresource should no longer be loaded from UltimateMirror - Wait a bit for cache to expire (takes about 10 minutes), then restart MirrorEngine
- Unlock the subresource in UltimateMirror
- Ace
src-noconflict/ace.js
15.04.20
(1.4.10
)src-noconflict/ext-searchbox.js
21.02.19
To update a patch, simply paste further changes to the bottom of that patch and
sync
them in.
To fix conflict, either edit the broken patch file manually or disable it along with patches after it then recreate the changes.