NanoCore2
NanoCore2 copied to clipboard
Restarting fresh for Firefox
Nano Adblocker For Firefox Is No Longer Maintained!
As of upstream sell the project to unknown developers, I refuse to maintain the project for stranger(s) that never show up to introduce themselves to their users.
NOTE: Unlike upstream, Nano Adblocker on this port is under my control and not related to any upstream's developer(s)!
For more details or questions, visit my issue ticket. If you can't read English, use a translator or raise your problem on this issue ticket such that other volunteer can help.
What Should I Do?!
- Backup settings: In Nano Adblocker, Go to
Dashboard>Settings>Backup to files. (Optional ) - Backup Filter Lists: Take a screenshot of your Filter List such that you can recover later. (Optional)
- Disable/Remove Nano Adblocker: In Firefox, Go to
Add-onsand Disable Nano Adblocker. You may also remove it later if you sure everything are backup and reversible.
But I Need An Ad-blocker!
Try uBlock Origin where Nano Adblocker forked from. Their interfaces are similar and quite easy to familiar with. This article explains the difference between two extensions. It is recommended to manually restore by copying settings and filters to fresh uBO. But in case you are too lazy to restore manually, you may still perform:
- In uBlock Origin, Go to
Dashboard>Settings - Click
Restore from file...and choose the file you backup from previous section. - Read migration note to watch out incompatibility for avoiding unexpected behavior.
Since uBlock Origin and Nano Adblocker do not share exactly same built-in filter list. In case restore cannot fully recover all filter list, you may manually add back according to the screenshot you take from previous section.
Of course, you are free to choose any ad-blocker you want! Above is just my personal recommendation.
What If I Really Want to Use Nano Adblocker?
No problem, you can still use it. Filter list can still be updated and you can use it as usual.
But it is not recommended because you won't receive update anymore. No fix will be released when you experience issue(s). In future, you may not be able to use filter rule that is written in new syntax which is released after the retirement.
Timeline for Retirement
v1.0.0.154 will be the final version of Nano Adblocker. Extension will be unlisted from AMO one week after released, no more new installation from AMO. You may still install from my repository after that day if you really want Nano Adblocker back.
It is highly recommended to install alternative instead of continue using Nano Adblocker, however.
Final Words from Maintainer
Thanks for all volunteer that contribute to this project. Also thanks for users reporting issue to benefit other users as well. Thanks for all users choose Nano Adblocker as their content-blocker. Hope everyone can still enjoy clean web site in future.
Nano Core 2 for Firefox
Restarting fresh on Firefox.
A patch driven fork of uBlock Origin.
Upstream commit pin: 76eaef4d2b13bbc1b64d230182cac8f6523a9b17 or 1.27.10
The code of project is shared with upstream before it is sold.
Please submit issues to the Nano Core issues tracker.
Localization
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.
Setup
- Install latest version of Git and Node.js.
- In an appropriate directory, run:
git clone --depth 1 https://github.com/LiCybora/NanoCore2.gitgit clone --depth 1 https://github.com/NanoAdblocker/NanoFilters.gitgit clone --depth 1 https://github.com/LiCybora/NanoDefenderFirefox -b moz
- Run
git clone https://github.com/gorhill/uBlock.gitin an appropriate directory to get upstream. Check out a tag or commit as appropriate. - In Nano Core 2 repository:
- Navigate to
/termdirectory and runnpm install. - Update
/config.nano.jsas appropriate. - Run
node ./termto open Nano Core 2 Terminal.
- Navigate to
Note: The private repository Prototype is required for publishing.
Development
You should not modify the upstream repository, instead, use Nano Core 2 Terminal to create and manage development environment.
init Initialize source 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 make/pack/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
Creating a New Patch
- 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
reloadin the Terminal
Renaming a Patch
- Give the patch a new name
- Update the README file
- Update the configuration file
- Run
reloadin the Terminal
Removing a Patch
- Delete the patch file
- Update the README file
- Update the configuration file
- Run
reloadin the Terminal
Version Update Checklist
- 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.jsonandmanifest.json - If needed, pull upstream updates to
1p-filters.jsandasset-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
Version Update Extended Checklist
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
/assetsdirectory structure - Changes to
scriptlets.jsformat- Update build scripts and extended script snippets manifest to adapt
- Changes to redirect declaration maps format in
redirect-engine.js- Update
nano-background.jsto adapt
- Update
- Renaming or removal of
messagingandpopupDatavariables inpopup.jsandpopup-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
Assets Manifest Update Checklist
- 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
Subresource Integrity Incidence Response Protocol
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.jsonso the sanitized subresource will be loaded from UltimateMirror
Later, the intervention can be lifted as follows:
- Update
assets.jsonas 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
External Dependencies
- Ace
src-noconflict/ace.js15.04.20(1.4.10)src-noconflict/ext-searchbox.js21.02.19
Tips
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.