├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── .jshintrc ├── .travis.yml ├── CONTRIBUTING.md ├── LICENSE.txt ├── README.md ├── assets └── assets.json ├── dist ├── chromium │ └── publish-beta.py ├── firefox │ ├── publish-signed-beta.py │ ├── updates.json │ └── updates.template.json └── version ├── doc ├── BUILDING.md ├── MANIFESTO.md ├── README.md ├── description │ ├── description.am_ET.txt │ ├── description.ar_SA.txt │ ├── description.bg_BG.txt │ ├── description.bn_BD.txt │ ├── description.ca_ES.txt │ ├── description.cs_CZ.txt │ ├── description.da_DK.txt │ ├── description.de_DE.txt │ ├── description.el_GR.txt │ ├── description.es_ES.txt │ ├── description.et_EE.txt │ ├── description.fa_IR.txt │ ├── description.fi_FI.txt │ ├── description.fil_PH.txt │ ├── description.fr_FR.txt │ ├── description.gu_IN.txt │ ├── description.he_IL.txt │ ├── description.hi_IN.txt │ ├── description.hr_HR.txt │ ├── description.hu_HU.txt │ ├── description.id_ID.txt │ ├── description.it_IT.txt │ ├── description.ja_JP.txt │ ├── description.kn_IN.txt │ ├── description.ko_KR.txt │ ├── description.lt_LT.txt │ ├── description.lv_LV.txt │ ├── description.ml_IN.txt │ ├── description.mr_IN.txt │ ├── description.ms_MY.txt │ ├── description.nl_NL.txt │ ├── description.no_NO.txt │ ├── description.pl_PL.txt │ ├── description.pt_BR.txt │ ├── description.pt_PT.txt │ ├── description.ro_RO.txt │ ├── description.ru_RU.txt │ ├── description.sk_SK.txt │ ├── description.sl_SI.txt │ ├── description.sr_CS.txt │ ├── description.sv_SE.txt │ ├── description.sw_KE.txt │ ├── description.ta_IN.txt │ ├── description.te_IN.txt │ ├── description.th_TH.txt │ ├── description.tr_TR.txt │ ├── description.txt │ ├── description.uk_UA.txt │ ├── description.vi_VN.txt │ ├── description.zh_CN.txt │ └── description.zh_TW.txt ├── img │ ├── chromium-about-blank.png │ ├── chromium-privacy-settings.png │ ├── per-scope-switches.png │ ├── strict-https-at-work.png │ ├── wired-walkthru-1.png │ ├── wired-walkthru-2.png │ ├── wired-walkthru-3.png │ ├── wired-walkthru-4.png │ ├── wired-walkthru-5.png │ └── wired-walkthru-6.png └── screenshots │ ├── chrome-1.png │ ├── chrome-2.png │ ├── chrome-3.png │ ├── chrome-4.png │ ├── chrome-5.png │ ├── ff-1.png │ ├── ff-2.png │ ├── ff-3.png │ ├── ff-4.png │ ├── opera-1.png │ ├── opera-2.png │ ├── opera-3.png │ └── opera-4.png ├── platform ├── chromium │ ├── img │ │ └── browsericons │ │ │ ├── icon19-0.png │ │ │ ├── icon19-1.png │ │ │ ├── icon19-10.png │ │ │ ├── icon19-11.png │ │ │ ├── icon19-12.png │ │ │ ├── icon19-13.png │ │ │ ├── icon19-14.png │ │ │ ├── icon19-15.png │ │ │ ├── icon19-16.png │ │ │ ├── icon19-17.png │ │ │ ├── icon19-18.png │ │ │ ├── icon19-19.png │ │ │ ├── icon19-2.png │ │ │ ├── icon19-3.png │ │ │ ├── icon19-4.png │ │ │ ├── icon19-5.png │ │ │ ├── icon19-6.png │ │ │ ├── icon19-7.png │ │ │ ├── icon19-8.png │ │ │ ├── icon19-9.png │ │ │ ├── icon19-off.png │ │ │ └── icon38-off.png │ ├── manifest.json │ ├── vapi-background.js │ ├── vapi-client-extra.js │ ├── vapi-client.js │ ├── vapi-common.js │ ├── vapi-webrequest.js │ ├── vapi.js │ └── webext.js ├── firefox │ ├── manifest.json │ ├── vapi-webrequest.js │ └── webext.js └── opera │ └── manifest-add.json ├── src ├── _locales │ ├── am │ │ └── messages.json │ ├── ar │ │ └── messages.json │ ├── bg │ │ └── messages.json │ ├── bn │ │ └── messages.json │ ├── ca │ │ └── messages.json │ ├── cs │ │ └── messages.json │ ├── da │ │ └── messages.json │ ├── de │ │ └── messages.json │ ├── el │ │ └── messages.json │ ├── en │ │ └── messages.json │ ├── eo │ │ └── messages.json │ ├── es │ │ └── messages.json │ ├── et │ │ └── messages.json │ ├── fa │ │ └── messages.json │ ├── fi │ │ └── messages.json │ ├── fil │ │ └── messages.json │ ├── fr │ │ └── messages.json │ ├── gu │ │ └── messages.json │ ├── he │ │ └── messages.json │ ├── hi │ │ └── messages.json │ ├── hr │ │ └── messages.json │ ├── hu │ │ └── messages.json │ ├── id │ │ └── messages.json │ ├── it │ │ └── messages.json │ ├── ja │ │ └── messages.json │ ├── kn │ │ └── messages.json │ ├── ko │ │ └── messages.json │ ├── lt │ │ └── messages.json │ ├── lv │ │ └── messages.json │ ├── ml │ │ └── messages.json │ ├── mr │ │ └── messages.json │ ├── ms │ │ └── messages.json │ ├── nb │ │ └── messages.json │ ├── nl │ │ └── messages.json │ ├── pl │ │ └── messages.json │ ├── pt_BR │ │ └── messages.json │ ├── pt_PT │ │ └── messages.json │ ├── ro │ │ └── messages.json │ ├── ru │ │ └── messages.json │ ├── sk │ │ └── messages.json │ ├── sl │ │ └── messages.json │ ├── sr │ │ └── messages.json │ ├── sv │ │ └── messages.json │ ├── sw │ │ └── messages.json │ ├── ta │ │ └── messages.json │ ├── te │ │ └── messages.json │ ├── th │ │ └── messages.json │ ├── tr │ │ └── messages.json │ ├── uk │ │ └── messages.json │ ├── vi │ │ └── messages.json │ ├── zh_CN │ │ └── messages.json │ └── zh_TW │ │ └── messages.json ├── about.html ├── asset-viewer.html ├── background.html ├── cloud-ui.html ├── css │ ├── cloud-ui.css │ ├── codemirror.css │ ├── common.css │ ├── dashboard-common.css │ ├── dashboard.css │ ├── fa-icons.css │ ├── fonts │ │ └── Roboto_Condensed │ │ │ ├── LICENSE.txt │ │ │ ├── RobotoCondensed-Light.ttf │ │ │ └── RobotoCondensed-Regular.ttf │ ├── hosts-files.css │ ├── logger-ui.css │ ├── main-blocked.css │ ├── popup.css │ ├── raw-settings.css │ ├── scope-selector.css │ └── user-rules.css ├── dashboard.html ├── hosts-files.html ├── img │ ├── cloud.png │ ├── fontawesome │ │ ├── LICENSE.txt │ │ └── fontawesome-defs.svg │ ├── icon_128.png │ ├── icon_16.png │ ├── icon_64.png │ ├── matrix-group-hide.png │ ├── matrix-group-hline.png │ ├── matrix-group-show.png │ ├── permanent-black-small-cb.png │ ├── permanent-black-small.png │ ├── permanent-white-small-cb.png │ └── permanent-white-small.png ├── js │ ├── about.js │ ├── asset-viewer.js │ ├── assets.js │ ├── background.js │ ├── browsercache.js │ ├── cachestorage.js │ ├── cloud-ui.js │ ├── codemirror │ │ ├── mode │ │ │ └── raw-settings.js │ │ └── search.js │ ├── console.js │ ├── contentscript-no-inline-script.js │ ├── contentscript-no-workers.js │ ├── contentscript-start.js │ ├── contentscript.js │ ├── cookies.js │ ├── dashboard-common.js │ ├── dashboard.js │ ├── fa-icons.js │ ├── filtering-context.js │ ├── hntrie.js │ ├── hosts-files.js │ ├── httpsb.js │ ├── i18n.js │ ├── liquid-dict.js │ ├── logger-ui.js │ ├── logger.js │ ├── lz4.js │ ├── main-blocked.js │ ├── matrix.js │ ├── messaging.js │ ├── pagestats.js │ ├── popup.js │ ├── raw-settings.js │ ├── recipe-manager.js │ ├── scope-selector.js │ ├── settings.js │ ├── start.js │ ├── storage.js │ ├── tab.js │ ├── traffic.js │ ├── udom.js │ ├── uritools.js │ ├── user-rules.js │ ├── usersettings.js │ ├── utils.js │ └── wasm │ │ ├── README.md │ │ ├── hntrie.wasm │ │ └── hntrie.wat ├── lib │ ├── codemirror │ │ ├── LICENSE │ │ ├── README.md │ │ ├── addon │ │ │ ├── display │ │ │ │ └── panel.js │ │ │ ├── merge │ │ │ │ ├── merge.css │ │ │ │ └── merge.js │ │ │ ├── scroll │ │ │ │ └── annotatescrollbar.js │ │ │ ├── search │ │ │ │ ├── matchesonscrollbar.css │ │ │ │ ├── matchesonscrollbar.js │ │ │ │ └── searchcursor.js │ │ │ └── selection │ │ │ │ └── active-line.js │ │ └── lib │ │ │ ├── codemirror.css │ │ │ └── codemirror.js │ ├── diff │ │ ├── README.md │ │ └── swatinem_diff.js │ ├── lz4 │ │ ├── README.md │ │ ├── lz4-block-codec-any.js │ │ ├── lz4-block-codec-js.js │ │ ├── lz4-block-codec-wasm.js │ │ ├── lz4-block-codec.wasm │ │ └── lz4-block-codec.wat │ ├── publicsuffixlist │ │ ├── publicsuffixlist.js │ │ └── wasm │ │ │ ├── README.md │ │ │ ├── publicsuffixlist.wasm │ │ │ └── publicsuffixlist.wat │ └── punycode.js ├── logger-ui.html ├── main-blocked.html ├── popup.html ├── raw-settings.html ├── settings.html └── user-rules.html └── tools ├── import-crowdin.sh ├── make-assets.sh ├── make-chromium-meta.py ├── make-chromium.sh ├── make-clean.sh ├── make-firefox-meta.py ├── make-firefox.sh ├── make-opera-meta.py └── make-opera.sh /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **Describe the bug** 8 | A clear and concise description of what the bug is. 9 | 10 | **To Reproduce** 11 | Steps to reproduce the behavior: 12 | 1. Go to '...' 13 | 2. Click on '....' 14 | 3. Scroll down to '....' 15 | 4. See error 16 | 17 | **Expected behavior** 18 | A clear and concise description of what you expected to happen. 19 | 20 | **Screenshots** 21 | If applicable, add screenshots to help explain your problem. 22 | 23 | **Browser (please complete the following information):** 24 | - OS: [e.g. MacOS, Linux] 25 | - Browser [e.g. Firefox] 26 | - Version [e.g. 80.0.1] 27 | 28 | **Additional context** 29 | Add any other context about the problem here. 30 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | dist/build/ 2 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "browser": true, 3 | "devel": true, 4 | "eqeqeq": true, 5 | "esversion": 8, 6 | "globals": { 7 | "browser": false, 8 | "self": false, 9 | "chrome": false, 10 | "log": false, 11 | "webext": false, 12 | "vAPI": false, 13 | "µMatrix": false 14 | }, 15 | "laxbreak": true, 16 | "strict": "global", 17 | "undef": true, 18 | "unused": true, 19 | "validthis": true 20 | } 21 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | env: 3 | matrix: 4 | - BROWSER=chromium EXT=zip 5 | - BROWSER=firefox EXT=xpi 6 | script: "./tools/make-${BROWSER}.sh ${TRAVIS_TAG}" 7 | deploy: 8 | provider: releases 9 | prerelease: true 10 | api_key: 11 | secure: eQgPAHH6PKu2dLK+NafxwLl66t0cyW5x5NZFquOwsNMal5nsfof7lyXj2F0Q0vUpGeI21MOipBI8UGv5oXPoiXnr0fhEbEBz65C9vypK61WkDCQVGVeZVNGQwSXUm6gD2EzpPgTCIs52+7dKCDJ3stXzdimOiOTYs4WMNKKarFM= 12 | file: dist/build/uMatrix_${TRAVIS_TAG}.${BROWSER}.${EXT} 13 | skip_cleanup: true 14 | on: 15 | repo: gorhill/uMatrix 16 | tags: true 17 | all_branches: true 18 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ### Submitting issues 2 | 3 | Submit on . 4 | 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## nuTensor 2 | 3 | Definitely for advanced users. 4 | 5 | This is a fork of the now-discontinued [uMatrix](https://github.com/gorhill/uMatrix). 6 | My focus will be on keeping it working on Firefox for now. I'll do my best to keep it working, but sadly no guarantees. Help will always be welcome! 7 | 8 | *** 9 | 10 | Forked and refactored from [uMatrix](https://github.com/gorhill/uMatrix). 11 | 12 | ## Warnings 13 | 14 | #### Regarding broken sites 15 | 16 | nuTensor does not guarantee that sites will work fine: it is for advanced users who can figure how to un-break sites, because essentially nuTensor is a firewall which works in relaxed block-all/allow-exceptionally mode out of the box: it is not unexpected that sites will break. 17 | 18 | **So this means do not file issues to report broken sites when the sites are broken because nuTensor does its job as expected.** I will close any such issue without further comment. 19 | 20 | **Using nuTensor logger is key to un-break sites:** the logger will show you all that nuTensor does internally. 21 | 22 | ## License 23 | 24 | GPLv3. 25 | -------------------------------------------------------------------------------- /assets/assets.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets.json": { 3 | "content": "internal", 4 | "updateAfter": 13, 5 | "contentURL": [ 6 | "https://raw.githubusercontent.com/geekprojects/nuTensor/master/assets/assets.json", 7 | "assets/assets.json" 8 | ] 9 | }, 10 | "public_suffix_list.dat": { 11 | "content": "internal", 12 | "updateAfter": 19, 13 | "contentURL": [ 14 | "https://publicsuffix.org/list/public_suffix_list.dat", 15 | "assets/thirdparties/publicsuffix.org/list/public_suffix_list.dat", 16 | "assets/thirdparties/publicsuffix.org/list/effective_tld_names.dat" 17 | ] 18 | }, 19 | "malware-0": { 20 | "content": "filters", 21 | "title": "Malware Domain List", 22 | "contentURL": [ 23 | "https://www.malwaredomainlist.com/hostslist/hosts.txt", 24 | "assets/thirdparties/www.malwaredomainlist.com/hostslist/hosts.txt" 25 | ] 26 | }, 27 | "malware-1": { 28 | "content": "filters", 29 | "title": "Malware domains", 30 | "contentURL": [ 31 | "https://mirror.cedia.org.ec/malwaredomains/justdomains", 32 | "https://mirror1.malwaredomains.com/files/justdomains", 33 | "assets/thirdparties/mirror1.malwaredomains.com/files/justdomains", 34 | "assets/thirdparties/mirror1.malwaredomains.com/files/justdomains.txt" 35 | ], 36 | "supportURL": "http://www.malwaredomains.com/" 37 | }, 38 | "dpollock-0": { 39 | "content": "filters", 40 | "updateAfter": 11, 41 | "title": "Dan Pollock’s hosts file", 42 | "contentURL": [ 43 | "https://someonewhocares.org/hosts/hosts", 44 | "assets/thirdparties/someonewhocares.org/hosts/hosts.txt" 45 | ], 46 | "supportURL": "https://someonewhocares.org/hosts/" 47 | }, 48 | "hphosts": { 49 | "content": "filters", 50 | "updateAfter": 11, 51 | "title": "hpHosts’ Ad and tracking servers", 52 | "contentURL": [ 53 | "https://hosts-file.net/.%5Cad_servers.txt", 54 | "assets/thirdparties/hosts-file.net/ad_servers.txt" 55 | ], 56 | "supportURL": "https://hosts-file.net/" 57 | }, 58 | "mvps-0": { 59 | "content": "filters", 60 | "updateAfter": 11, 61 | "title": "MVPS HOSTS", 62 | "contentURL": [ 63 | "https://winhelp2002.mvps.org/hosts.txt", 64 | "assets/thirdparties/winhelp2002.mvps.org/hosts.txt" 65 | ], 66 | "supportURL": "https://winhelp2002.mvps.org/" 67 | }, 68 | "plowe-0": { 69 | "content": "filters", 70 | "updateAfter": 13, 71 | "title": "Peter Lowe’s Ad and tracking server list", 72 | "contentURL": [ 73 | "https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext", 74 | "assets/thirdparties/pgl.yoyo.org/as/serverlist", 75 | "assets/thirdparties/pgl.yoyo.org/as/serverlist.txt" 76 | ], 77 | "supportURL": "https://pgl.yoyo.org/adservers/" 78 | }, 79 | "recipes_en-0": { 80 | "content": "recipes", 81 | "title": "Ruleset recipes for English websites", 82 | "contentURL": [ 83 | "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/recipes/recipes_en.txt", 84 | "assets/umatrix/recipes_en.txt" 85 | ], 86 | "lang": "en" 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /dist/firefox/updates.json: -------------------------------------------------------------------------------- 1 | { 2 | "addons": { 3 | "nuTensor@geekprojects.com": { 4 | "updates": [ 5 | { 6 | "version": "1.4.1.6", 7 | "browser_specific_settings": { "gecko": { "strict_min_version": "56" } }, 8 | "update_info_url": "https://github.com/geekprojects/nuTensor/releases/tag/1.4.1b6", 9 | "update_link": "https://github.com/geekprojects/nuTensor/releases/download/1.4.1b6/nuTensor_1.4.1b6.firefox.signed.xpi" 10 | } 11 | ] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /dist/firefox/updates.template.json: -------------------------------------------------------------------------------- 1 | { 2 | "addons": { 3 | "nuTensor@geekprojects.com": { 4 | "updates": [ 5 | { 6 | "version": "$ext_version", 7 | "browser_specific_settings": { "gecko": { "strict_min_version": "56" } }, 8 | "update_info_url": "https://github.com/geekprojects/nuTensor/releases/tag/$tag_version", 9 | "update_link": "https://github.com/geekprojects/nuTensor/releases/download/$tag_version/nuTensor_$tag_version.firefox.signed.xpi" 10 | } 11 | ] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /dist/version: -------------------------------------------------------------------------------- 1 | 1.5.0.0 2 | -------------------------------------------------------------------------------- /doc/BUILDING.md: -------------------------------------------------------------------------------- 1 | ## Building nuTensor 2 | 3 | ### Requirements 4 | 5 | Tools: 6 | * bash 7 | * python 3 8 | 9 | You will need both this nuTensor and the nuAssets repositories. These should both be placed in the same directory: 10 | ``` 11 | git clone https://github.com/geekprojects/nuAssets.git 12 | git clone https://github.com/geekprojects/nuTensor.git 13 | cd nuTensor 14 | ``` 15 | 16 | ### Packaging 17 | You can now run the scripts that package everything up. 18 | These are bash scripts. They have only been tested on Linux and MacOS. 19 | 20 | #### For Firefox 21 | ``` 22 | tools/make-firefox.sh all 23 | ``` 24 | 25 | #### For Chrome/Chromium (Not yet tested) 26 | ``` 27 | tools/make-chromium.sh all 28 | ``` 29 | 30 | #### For Opera (Not yet tested) 31 | ``` 32 | tools/make-opera.sh 33 | ``` 34 | 35 | The installation package should now be found in dist/build/ 36 | 37 | ### Installing 38 | 39 | Follow the instructions in [README.md](README.md) to install it. 40 | -------------------------------------------------------------------------------- /doc/MANIFESTO.md: -------------------------------------------------------------------------------- 1 | ### This is uMatrix's manifesto 2 | 3 | 1. The **user decides** what web content is acceptable or not in their browser. 4 | 5 | That is all. 6 | 7 | The purpose of _uMatrix_ is to give the user the means for informed 8 | consent and informed dissent. 9 | -------------------------------------------------------------------------------- /doc/README.md: -------------------------------------------------------------------------------- 1 | ## INSTALL 2 | 3 | #### Chromium 4 | 5 | - Download and unzip `nuTensor.chromium.zip` ([latest release desirable](https://github.com/geekprojects/nuTensor/releases)). 6 | - Rename the unzipped directory to `nuTensor` 7 | - When you later update manually, replace the **content** of the `nuTensor` folder with the **content** of the latest zipped version. 8 | - This will ensure that all the extension settings will be preserved 9 | - As long as the extension loads **from same folder path from which it was originally installed**, all your settings will be preserved. 10 | - Go to chromium/chrome *Extensions*. 11 | - Click to check *Developer mode*. 12 | - Click *Load unpacked extension...*. 13 | - In the file selector dialog: 14 | - Select the directory `nuTensor` which was created above. 15 | - Click *Open*. 16 | 17 | The extension will now be available in your chromium/chromium-based browser. 18 | 19 | Remember that you have to update manually also. For some users, updating manually is actually an advantage because: 20 | - You can update when **you** want 21 | - If ever a new version sucks, you can easily just re-install the previous one 22 | 23 | #### Firefox 24 | 25 | Although nuTensor is a restartless addon, I found that **installing** a newer version over an older one often will glitch the installation. These steps always worked fine: 26 | 27 | - Download `nuTensor.firefox.xpi` ([latest release desirable](https://github.com/geekprojects/nuTensor/releases)). 28 | - Uninstall current nuTensor if already installed 29 | - Quit Firefox completely 30 | - Launch Firefox 31 | - Drag and drop the previously downloaded `nuTensor.firefox.xpi` into Firefox 32 | 33 | nuTensor settings are kept intact even after you uninstall the addon. 34 | 35 | On Linux, the settings are saved in a SQlite file located at `~/.mozilla/firefox/[profile name]/extension-data/nuTensor.sqlite`. 36 | 37 | On Windows, the settings are saved in a SQlite file located at `%APPDATA%\Mozilla\Firefox\Profiles\[profile name]\extension-data\nuTensor.sqlite`. 38 | -------------------------------------------------------------------------------- /doc/description/description.es_ES.txt: -------------------------------------------------------------------------------- 1 | uMatrix: Un cortafuegos matricial ajustable mediante clics, con varias herramientas para mejorar su privacidad. 2 | 3 | *Para usuarios avanzados* 4 | 5 | uMatrix le proporciona control total sobre su navegador, permitiéndole decidir que conexiones se establecen, que tipo de datos se descargan y que códigos se ejecutan. Nadie más decide: usted escoge. Usted está en control total de su privacidad. 6 | 7 | Por defecto, uMatrix funciona en modo relajado "bloquear todo/permitir excepcionalmente". Esto significa que los sitios que requieren scripts de terceros, posiblemente se muestren con problemas. Con solo dos clics, puede configurar uMatrix para funcionar en modo "permitir todo/bloquear excepcionalmente", lo que hará que usualmente los sitios web se muestren sin problema. Para más detalles sobre el tema, consulte https://github.com/gorhill/httpswitchboard/wiki/How-to-use-HTTP-Switchboard:-Two-opposing-views (en inglés). 8 | 9 | * Examine TODAS las conexiones remotas, fallidas o intentadas, según fueron bloqueadas o permitidas (usted decide). 10 | 11 | * Con un solo clic añada a su lista de permitidos o a su lista negra, uno o varios tipos de peticiones, según el destino y el tipo de datos (una petición bloqueada NUNCA saldrá del navegador). 12 | 13 | * Filtrado eficiente: las cookies no saldrán de su navegador, JavaScript no se ejecutará, las extensiones no funcionarán, no se descargarán píxeles de rastreo, etc. 14 | 15 | * No tiene que depender de una sola lista de filtros (probablemente con muchas omisiones) fuera de la cual nada pueda ser bloqueado: usted controla todo. 16 | 17 | * Facilidad de uso: uMatrix le permite agregar fácilmente las peticiones de red que se originen desde una página web a una lista de permitidos/lista negra, mediante clics en la matriz: 18 | 19 | - nombres de dominio (columna izquierda) 20 | * de muy específico 21 | * a muy genérico 22 | 23 | - tipos de peticiones (fila superior) 24 | * cookies 25 | * recursos CSS (hojas de estilo y fuentes web) 26 | * imágenes 27 | * plugins 28 | * scripts 29 | * XHR (peticiones hechas por los scripts) 30 | * frames 31 | * otras 32 | 33 | Puede agregar a la lista negra/lista de permitidos una única celda, una fila completa, un grupo de filas, una columna o toda la matriz, todo con solo un clic. 34 | 35 | El motor de filtrado de uMatrix usa lógica de precedencia para evaluar que bloquea o permite, en dependencia de las celdas en lista de permitidos o lista negra. Por ejemplo, puede agregar toda una página a la lista de permitidos con un clic, sin que sea necesario agregar nuevos elementos que puedan aparecer luego en dicha página uno a uno. 36 | 37 | Todas las reglas se definen para un ámbito. Puede, por ejemplo, bloquear elementos de `facebook.com` y `facebook.net` dondequiera, excepto cuando esté navegando en una página en el sitio`www.facebook.com`. De esta forma, Facebook se verá imposibilitado de crear o reunir un perfil sobre sus hábitos de navegación web. 38 | 39 | El objetivo de esta extensión es hacer todo el proceso de permitir o bloquear sitios web tan simple como sea posible, de manera tal que los usuarios se sientan alentados a preocuparse por su privacidad. 40 | 41 | La extensión hace uso de ficheros hosts mantenidos por terceros, con más de 62,000 nombres de dominios diferentes (las listas pueden ser habilitadas/deshabilitadas según su deseo). 42 | 43 | Al final, usted decide de que manera navegar por la red: 44 | 45 | * Poner todo en lista negra por defecto, añadiendo a la lista de permitidos según sea necesario (modo por defecto). 46 | 47 | * Poner todo en la lista de permitidos y agregar a la lista negra según sea necesario. 48 | 49 | En cualquier modo, siempre se beneficiará de los filtros ya configurados, que le brindarán una protección básica contra rastreadores, sitios de malware, etc. O puede también deshabilitar todos los filtros pre-configurados. 50 | 51 | Usted elige. 52 | 53 | Documentación miscelánea reunida: https://github.com/gorhill/uMatrix/wiki (incompleta) 54 | 55 | ===== 56 | 57 | Esta extensión también es útil para entender que hace una página web abierta por el navegador, muchas veces sin su conocimiento. Usted será totalmente capaz de decidir con quien se comunica una página web, y restringir dicha comunicación a determinados tipos de objetos dentro de la página. 58 | 59 | El número que aparece en el ícono de la extensión se corresponde con el número total de peticiones diferentes hechas por la página web (ya sea que tuvieron éxito o no, de acuerdo a si fueron bloqueadas o permitidas). 60 | 61 | Simplemente haga clic en el lugar apropiado de la matriz para bloquear, permitir o heredar un componente. Heredar significa que el componente será bloqueado o permitido de acuerdo a la regla que se herede de otro elemento de la matriz con mayor precedencia. 62 | 63 | Cuadro rojo = elemento bloqueado, por ejemplo, las peticiones son impedidas de alcanzar su destino: 64 | * Cuadro rojo fuerte: el dominio y/o el tipo de petición han sido bloqueados específicamente. 65 | * Cuadro rojo pálido: el bloqueo ocurre por herencia. 66 | 67 | Cuadro verde = elemento permitido, por ejemplo, a las peticiones se les permite alcanzar su destino: 68 | * Cuadro verde fuerte: el dominio y/o el tipo de petición han sido permitidos específicamente. 69 | * Cuadro verde pálido: elemento permitido por herencia. 70 | 71 | La celda superior izquierda en la matriz (celda "todo"), representa la configuración global por defecto, permitiendo escoger entre los modos bloquear todo o permitir todo. Algunos prefieren permitir todo y bloquear ciertos elementos como excepción. Mi preferencia personal es por supuesto lo contrario, bloquear todo y permitir ciertas excepciones. 72 | 73 | Esta extensión también puede ser útil si desea aumentar la velocidad de navegación, por ejemplo, bloqueando de manera global todas las peticiones de imágenes. 74 | 75 | ===== 76 | 77 | ERRORES, PROBLEMAS: https://github.com/gorhill/uMatrix/issues 78 | 79 | CÓDIGO FUENTE: https://github.com/gorhill/uMatrix (GPLv3) 80 | 81 | REGISTRO DE CAMBIOS: https://github.com/gorhill/uMatrix/releases 82 | -------------------------------------------------------------------------------- /doc/description/description.he_IL.txt: -------------------------------------------------------------------------------- 1 | µMatrix: פירוול כוון-ולחץ מבוסס מטריצה, עם הרבה עזרים לשיפור הפרטיות. עבור משתמשים מתקדמים. 2 | 3 | µMatrix שם אותך בשליטה מלאה במקום שבו אתה מחליט לאן לדפדפן שלך מותר להתחבר, איזה סוג של מידע הוא יכול להוריד ומה מותר לו להריץ. אף אחד אחד לא קובע בשבילך: אתה מחליט. אתה בשליטה מלאה על הפרטיות שלך. 4 | 5 | בברירת המחדל, µMatrix פועל במצב של הירגע וחסום-הכל/אפשר-ליוצאי דופן, מה שאומר שאתרים שדורשים בשימוש בסקריפטים צד שלישי אפשרי שייראו משובשים. בשתי לחיצות, אפשר להגדיר ל µMatrix לעבוד במצב אפשר-הכלל/חסום-ליוצאי דופן, אשר בדרך כלל לא ישבש אתרי אינטרנט. ראה https://github.com/gorhill/httpswitchboard/wiki/How-to-use-HTTP-Switchboard:-Two-opposing-views למידע נוסף על נושא זה. 6 | 7 | לגבי המיתוס כי "דפדפנים מבוססי כרומיום לא יכולים לחסום JavaScript באופן אמין", ראה:https://github.com/gorhill/httpswitchboard/wiki/Blocking-javascript-execution-reliably-in-Chromium-based-browsers. לסיכום: כן, JavaScript יכול להיחסם באופן אמין בכרומיום. 8 | 9 | * ראה את כל החיבורים המרוחקים, לא מוצלחים או ניסיונות חיבור, תלוי בהאם הם היו חסומים או מאופשרים (אתה מחליט). 10 | 11 | * לחיצה-בודדת על מנת להכניס בקשה או קבוצה של בקשות לרשימה הלבנה/השחורה על פי היעד וסוג הנתונים (בקשה חסומה לעולם לא תצא מהדפדפן שלך). 12 | 13 | * חסימה יעילה: עוגיות לא ייצאו מהדפדפן שלך, JavaScript לא יורץ, פלאגינים לא ינגנו, פיקסלים המשמשים למעקב לא יורדו, וכד'. 14 | 15 | אתה לא צריך להסתמך רק על רשימה שחורה אוצרת אחת בלבד (אפשר לטעון כי קיימים בה הרבה ערכים חסרים) מבחוץ אשר שום דבר אחר לא יכול להיחסם: אתה נמצא בשליטה מלאה. 16 | 17 | * קלות השימוש: µMatrix מאפשר לך להוסיף בקלות בקשות רשת לרשימה הלבנה/השחורה שמקורן מדף אינטרנט בהתאם להגדרות שבמטריצה: 18 | 19 | שמות דומיינים (עמודה ימנית) 20 | * מההכי ספציפי 21 | * להכי גנרי 22 | 23 | - סוג הבקשות (שורה עליונה) 24 | * עוגיות 25 | * משאבים הקשורים ל CSS (קודים של עיצוב ופונטים אינטרנטיים) 26 | * תמונות 27 | * פלאגינים 28 | * סקריפטים 29 | * XHR (בקשות הנעשות על ידי סקריפטים) 30 | * מסגרות 31 | * אחרות 32 | 33 | אתה יכול להכניס לרשימה השחורה/הלבנה תא בודד, שורה שלמה, אוסף של שורות, עמודה שלמה, או את כל המטריצה בלחיצה אחת בלבד. 34 | 35 | מנגנון הסינון של µMatrix משתמש בהיגיון קדימות על מנת להעריך מה נחסם/מאופשר בהתאם לאילו תאים נמצאים ברשימה השחורה/הלבנה. למשל, זה מאפשר לך להכניס לרשימה הלבנה עמוד שלם בלחיצה אחת, ללא צורך בהכנסה לרשימה הלבנה כל פעם מחדש מידע חדש שמופיע באתר. 36 | 37 | כח החוקים מטווחים (מתוחמים). לדוגמה, אתה יכולה לחסום את `facebook.com` ואת `facebook.net` בכל מקום חוץ מכאשר אתה מבקר בדף ב `www.facebook.com`. בדרך זו פייסבוק לא יוכל לבנות פרופיל של הרגלי הגלישה שלך. 38 | 39 | המטרה של תוסף זה היא להפוך את האיפשור או החסימה של אתרי אינטרנט, במלואם או בחלקם, פשוט ככל האפשר, על מנת לעודד את המשתמשים לדאוג לפרטיות שלהם. 40 | 41 | התוסך מגיע עם קבצי Hosts צד שלישי שמהווים יותר מ 58,000 דומיינים שונים (רשימות יכולות להיות מבוטלות/מאופשרות באופן סלקטיבי בהתאם לבחירה שלך). 42 | 43 | בסופו של דבר, אתה יכול לבחור בכל צורה שתרצה איך אתה גולש ברשת: 44 | 45 | * חסום הכל בברירת מחדל, ואפשר לפי הצורך (מצב ברירת מחדל). 46 | 47 | * אפשר הכל בברירת מחדל, וחסום לפי הצורך. 48 | 49 | כך או כך, אתה עדיין מרוויח מהרשימות השחורות הקיימות מראש, כך שלפחות אתה מקבל הגנה בסיסית מאלה שמנסים לעקוב אחרייך, אתרים זדוניים, וכו'. או שאתה יכול לכבות את כל הרשימות הקיימות מראש. 50 | 51 | בחירה שלך. 52 | 53 | דוקומנטציה שנאספה באקראי: https://github.com/gorhill/uMatrix/wiki 54 | 55 | ===== 56 | 57 | פידבק: 58 | 59 | לכל שאלה/בעיה שיש לך, השתמש בכפתור "שלח משוב" בצד שמאל, על מנת שאהיה מסוגל לענות בקלות. אני לא יכול לענות ישירות לביקורות, אבל אני יותר מאשמח לענות לך ישירות במשוב. 60 | 61 | ===== 62 | 63 | באגים, בעיות, הצעות: 64 | 65 | https://github.com/gorhill/uMatrix/issues 66 | 67 | בחירה שלך. 68 | 69 | קלות השימוש היא המטרה העיקרית. ראיתי משתמשים שמוותרים על התוסף NoScript ל FireFox משום שהוא מפריע להם יותר מדי בזמן השימוש, אז במקום להאשים את המשתמשים האלה בהרגלי אבטחה דלים, אני מעדיף להאשים את המפתחים והפרויקט הזה בא לנסות לטפל בבעיות שגורמות לחלק מהמשתמשים לוותר על אבטחה בסיסית. 70 | 71 | תוסף זה גם שימושי כדי להבין מה דף האינטרנט בדפדפן שלך עושה, לעתים קרובות ללא ידיעתך. יש לך יכולת מלאה לראות ולהחליט עם מי דף אינטרנט מתקשר, ולהגביל את התקשורות הללו לסוגים ספציפיים של אובייקטים בתוך דף האינטרנט. 72 | 73 | המספר שמופיע לאייקון של התוסף מתייחס למספר הכולל של בקשות שונות שנוסו (בהצלחה או לא, תלוי אם אלה הורשו או היו חסומות) על ידי דף האינטרנט. 74 | 75 | פשוט לחץ על המקום המתאים במטריצה על מנת להלבין-, להשחיר- או להאפיר מרכיב. האפרה משמעותה שסטאטוס החסימה או האיפשור יעבור בירושה מתא אחר עם עדיפות גבוהה יותר במטריצה. 76 | 77 | ריבוע אדום = חסומים ביעילות, לדוגמא. בקשות מנועות מלהגיע אל היעד שלהן: 78 | * ריבוע אדום כהה: הדומיין ו/או סוג הבקשה חסומה מפורשות. 79 | ריבוע אדום דהוי: מצב החסימה עובר בירושה, כי התא מאופר. 80 | 81 | ריבוע ירוק = מאופשרים ביעילות, לדוגמא. בקשות מאופשרות להגיע אל היעד שלהן: 82 | * ריבוע ירוק כהה: הדומיין ו/או סוג הבקשה מאופשרת מפורשות. 83 | ריבוע ירוק דהוי: מצב האיפשור עובר בירושה, כי התא מאופר. 84 | 85 | התא הימני העליון במטריצה, תא ה-"הכל", מייצג את הטווח הגלובלי הדיפולטיבי, אשר נותן לך לבחור האם אפשור או חסימה של הכל יהיה ברירת המחדל. חלק מעדיפים לאפשר הכל תןך חסימה של יוצאים מן הכלל. ההעדפה האישית שלי כמובן הפוכה, חסימה של הכל ואפשור יוצאים מן הכלל. 86 | 87 | תוסף זה גם שימושי אם אתה רוצה להאיץ את הגלישה שלך, על ידי חסימה גלובלית של כל הבקשות לתמונות כדוגמא. 88 | 89 | ===== 90 | 91 | קוד מקור: https://github.com/gorhill/uMatrix (GPLv3) 92 | 93 | יומן שינויים: https://github.com/gorhill/uMatrix/releases 94 | -------------------------------------------------------------------------------- /doc/description/description.ja_JP.txt: -------------------------------------------------------------------------------- 1 | uMatrix:格子状のマトリクスで管理するファイヤウォール。様々なプライバシー強化ツールを兼ね備えます。 2 | 3 | * 上級ユーザー向けです * 4 | 5 | uMatrix を使うと、ブラウザーがどこと通信して良いのか、どの種類のデータをダウンロードするのか、何を実行して良いのかを決定することができます。誰か他の人があなたの代わりに決めてくれることはありません。自分のプライバシーを自分で制御するのです。 6 | 7 | 初期設定では、uMatrix は安心できる「すべてブロック・必要なら許可」の設定になっています。つまり、サードパーティーのスクリプトを必要とするウェブサイトは“壊れる”ことが多いでしょう。2クリックで、「すべて許可・必要ならブロック」の設定に変えることもでき、この場合、ウェブサイトを壊すことはほとんどありません。より詳しくは https://github.com/gorhill/httpswitchboard/wiki/How-to-use-HTTP-Switchboard:-Two-opposing-views を見て下さい。 8 | 9 | * あなたが選んだブロック/許可の結果による“すべての”リクエストの失敗/実施の状況を確認できます。 10 | 11 | * ワンクリックで、接続先やデータの種類に応じてリクエストを許可/ブロックすることができます。ブロックされたリクエストがブラウザーから外に出ることは決してありません。 12 | 13 | * 効率的なブラックリスト:Cookie はブラウザーの外には出ず、JavaScript もプラグインも実行されず、追跡ピクセルがダウンロードされることもありません。 14 | 15 | * リストにないとブロックしてくれない(そして多くの漏れがあるであろう)ブラックリストだけに頼る必要はありません。自分で制御できるのです。 16 | 17 | * 使い勝手の良さ:uMatrix では、ウェブページが発したリクエストを、マトリクスをクリックすることで簡単に許可/ブロックすることができます。 18 | 19 | - ドメイン名(左の列) 20 | * 具体的なドメインから 21 | * 汎用的なドメインまで 選ぶことができます 22 | 23 | - リクエストの種類(先頭の行) 24 | * Cookie 25 | * CSS 関連のリソース(スタイルシートと Web フォント) 26 | * 画像 27 | * メディア 28 | * スクリプト 29 | * XHR(スクリプトにより生成されるリクエスト) 30 | * フレーム 31 | * その他 32 | 33 | ワンクリックで、特定のセル、特定のドメイン、グループ化されたドメイン、特定のリクエストの種類、そしてマトリクス全体を許可/ブロックできます。 34 | 35 | uMatrix のフィルタリングエンジンは、どのセルが許可/ブロックされているかによって、優先順位に基づくロジックでリクエストを処理します。これにより、例えば、あるページ全体をワンクリックで許可しておけば、このページに新しいリクエストが見つかるたびに許可を追加する必要がなくなります。 36 | 37 | それぞれのルールには有効範囲があります。例えば、www.facebook.com にアクセスしていない時だけ facebook.com と facebook.net をブロックすることができます。これにより、Facebook が、あなたのブラウジング習慣からあなたの人物像を作成することを防ぎます。 38 | 39 | この拡張機能の最終目標は、ユーザーが自身のプライバシーに気を配れるよう、可能な限り簡潔に、ウェブサイトを包括的あるいは部分的に許可/ブロックできるようにすることです。 40 | 41 | この拡張機能には、合計 62,000 件以上のホスト名からなるサードパーティーのホストファイルが含まれます。これらのファイルは好みに応じてオンオフすることができます。 42 | 43 | まとめると、あなたはネットをブラウジングする方法を次のように選ぶことができます。 44 | 45 | * はじめはすべてブロック、必要に応じて許可していく(初期設定) 46 | 47 | * はじめはすべて許可、必要に応じてブロックしていく 48 | 49 | どちらの方法でも、組み込みのホストファイルのおかげで、トラッカーやマルウェアサイトなどに対する基礎的な保護を得ることができます。もしくはこれらをすべて無効にすることもできます。 50 | 51 | 決めるのはあなたです。 52 | 53 | ドキュメント: https://github.com/gorhill/uMatrix/wiki 54 | 55 | ===== 56 | 57 | この拡張機能のもう一つの使い道は、知識なしでも、ブラウザーの中でウェブページが何をしているか理解することです。あなたはウェブページがどこと通信するのかをすべて見た上で決断し、ウェブページ中の特定の種類の通信を制限できます。 58 | 59 | 拡張機能アイコンに表示される数値は、ウェブページによっていくつのリクエストが試みられたかの総数(許可/ブロック合わせて)を示します。 60 | 61 | マトリクスの適切なセルをクリックして、許可/ブロック/グレーのいずれにするかを決めます。“グレー”では、マトリクス内のより優先度の高いセルからブロック/許可の状態を引き継ぎます。 62 | 63 | 赤いセル は事実上ブロックされている状態であり、リクエストは接続先に届きません。 64 | * 濃い赤:そのドメイン名とリクエスト種類の組み合わせは、明示的にブロックされています。 65 | * 淡い赤:セルが“グレー”状態のため、ブロック状態が引き継がれました。 66 | 67 | 緑のセル は事実上許可されている状態であり、リクエストは接続先に届きます。 68 | * 濃い緑:そのドメイン名とリクエスト種類の組み合わせは、明示的に許可されています。 69 | * 淡い緑:セルが“グレー”状態のため、許可が引き継がれました。 70 | 71 | マトリクスの一番左上にある「すべて」のセルはデフォルトのグローバル設定を示し、「すべてを許可」と「すべてをブロック」のどちらをデフォルトにするかを選ぶことができます。人によっては、すべてを許可した上で必要に応じてブロックすることを好むでしょう。私の個人的な設定はもちろんその逆、すべてをブロックした上で必要なものを許可します。 72 | 73 | この拡張機能は、例えば画像の読み込みをすべてブロックすることで、ブラウジングスピードを上げるのにも役立ちます。 74 | 75 | ===== 76 | 77 | バグ・問題報告: https://github.com/gorhill/uMatrix/issues 78 | 79 | ソースコード: https://github.com/gorhill/uMatrix (GPLv3) 80 | 81 | 更新履歴: https://github.com/gorhill/uMatrix/releases 82 | -------------------------------------------------------------------------------- /doc/description/description.nl_NL.txt: -------------------------------------------------------------------------------- 1 | uMatrix: een contextafhankelijke en matrix-gebaseerde firewall, met vele functies ter verbetering van uw privacy. 2 | 3 | *Voor gevorderde gebruikers.* 4 | 5 | uMatrix geeft volledige controle over welke verbindingen uw browser mag maken, welk type gegevens de browser mag downloaden, en wat erin mag worden uitgevoerd. Niemand anders beslist het: het is uw keuze. U hebt de volledige controle over uw privacy. 6 | 7 | Direct na installatie werkt uMatrix in de modus alles-blokkeren/bij-uitzondering-blokkeren, wat inhoudt dat websites die scripts van derden nodig hebben waarschijnlijk niet goed worden weergegeven. Met twee muisklikken kan uMatrix worden ingesteld om in de modus alles-toestaan/bij-uitzondering-blokkeren te werken, waarmee websites doorgaans wel goed worden weergegeven. Zie https://github.com/gorhill/httpswitchboard/wiki/How-to-use-HTTP-Switchboard:-Two-opposing-views voor meer details over dit onderwerp. 8 | 9 | * Bekijk ALLE externe verbindingen, mislukte of gepoogde, afhankelijk van of deze werden geblokkeerd of toegestaan (u beslist). 10 | 11 | * Eén muisklik voor het whitelisten/blacklisten van een of meer aanvraagklassen volgens de bestemming en het type gegevens (een geblokkeerde aanvraag zal uw browser NOOIT verlaten). 12 | 13 | * Efficiënt blacklisten: cookies verlaten uw browser niet, JavaScript wordt niet uitgevoerd, plug-ins worden niet afgespeeld, trackingpixels worden niet gedownload, etc. 14 | 15 | * U hoeft niet slechts op één bepaalde beheerde blacklist (betwistbaar met veel ontbrekende vermeldingen) te vertrouwen waarbuiten niets anders kan worden geblokkeerd: u hebt de volledige controle. 16 | 17 | * Gebruikersgemak: met uMatrix kunt u eenvoudig netwerkaanvragen die van een webpagina afkomstig zijn whitelisten/blacklisten, volgens een matrix via aanwijzen en klikken: 18 | 19 | - domeinnamen (linkerkolom) 20 | * van zeer specifieke 21 | * tot zeer algemene 22 | 23 | - type aanvragen (bovenste rij) 24 | * cookies 25 | * CSS-gerelateerde bronnen (stijlbladen en weblettertypen) 26 | * afbeeldingen 27 | * plug-ins 28 | * scripts 29 | * XHR (aanvragen door scripts) 30 | * frames 31 | * overig 32 | 33 | Met slechts één klik kunt u een enkele cel, een hele rij, een groep rijen, een hele kolom, of de hele matrix blacklisten/whitelisten. 34 | 35 | De filterengine van uMatrix gebruikt voorrangslogica voor het evalueren van wat er volgens de cellen die zijn geblacklist/gewhitelist is geblokkeerd/toegestaan. Hierdoor kunt u bijvoorbeeld met één klik een hele pagina whitelisten, zonder dat u dat herhaaldelijk moet doen bij nieuwe gegevens die op de pagina verschijnen. 36 | 37 | Alle regels worden aan een bereik gerelateerd. U kunt bijvoorbeeld ‘facebook.com’ en ‘facebook.net’ overal blokkeren, behalve wanneer u een pagina op ‘www.facebook.com’ bezoekt. Op deze manier zal Facebook geen profiel van uw surfgedrag kunnen opbouwen. 38 | 39 | Het doel van deze extensie is om het toestaan of blokkeren van websites, geheel of gedeeltelijk, zo overzichtelijk mogelijk te maken en daarmee gebruikers aan te moedigen om op hun privacy te letten. 40 | 41 | Standaard bevat de extensie hosts-bestanden van derden met meer dan 62.000 afzonderlijke hostnamen (lijsten kunnen naar keuze selectief worden in- en uitgeschakeld). 42 | 43 | Uiteindelijk kunt u kiezen hoe u op het internet wilt surfen: 44 | 45 | * Alles standaard blacklisten, en whitelisten wanneer nodig (standaardmodus). 46 | 47 | * Alles standaard whitelisten, en blacklisten wanneer nodig. 48 | 49 | In beide gevallen heb u voordeel van de vooraf geleverde blacklists, zodat u op zijn minst basisbescherming krijgt tegen trackers, malwaresites, etc. U kunt al deze vooraf geleverde blacklists ook uitschakelen. 50 | 51 | Uw keuze. 52 | 53 | Willekeurig samengestelde documentatie: https://github.com/gorhill/uMatrix/wiki 54 | 55 | ===== 56 | 57 | Deze extensie is ook bruikbaar om te begrijpen wat de webpagina in uw browser doet, vaak zonder uw medeweten. U hebt de volledige mogelijkheid om te zien en te beslissen waarmee een webpagina communiceert, en deze communicatie tot bepaalde objectklassen binnen dezelfde pagina te beperken. 58 | 59 | Het getal dat in het pictogram van de extensie verschijnt, komt overeen met het totale aantal afzonderlijke geprobeerde aanvragen (geslaagd of niet, afhankelijk van of deze werden toegestaan of geblokkeerd) door de webpagina. 60 | 61 | Klik eenvoudig op de juiste vermelding in de matrix om een onderdeel te white-, black- of graylisten. Graylisten houdt in dat de status geblokkeerd of toegestaan van een andere cel met hogere voorrang in de matrix wordt overgenomen. 62 | 63 | Rood vierkant = effectief geblacklist, m.a.w. aanvragen richting hun bedoelde eindbestemming worden voorkomen: 64 | * Donkerrood vierkant: de domeinnaam en/of het type aanvraag is specifiek geblacklist. 65 | * Vaalrood vierkant: de blacklist-status is overgenomen, omdat de vermelding is gegraylist. 66 | 67 | Groen vierkant = effectief gewhitelist, m.a.w. aanvragen mogen hun bedoelde eindbestemming bereiken: 68 | * Donkergroen vierkant: de domeinnaam en/of het type aanvraag is specifiek gewhitelist. 69 | * Vaalgroen vierkant: de whitelist-status is overgenomen, omdat de vermelding is gegraylist. 70 | 71 | De cel in de linkerbovenhoek van de matrix, de cel ‘alle’, vertegenwoordigt de algemene standaardinstelling waarmee u kunt kiezen of alles toestaan of blokkeren het standaardgedrag is. Sommige gebruikers geven de voorkeur aan alles toestaan en bij uitzondering blokkeren. Mijn persoonlijke voorkeur is natuurlijk het omgekeerde, alles blokkeren en bij uitzondering toestaan. 72 | 73 | Deze extensie is ook nuttig als u het browsen wilt versnellen, bijvoorbeeld door alle aanvragen voor afbeeldingen overal te blokkeren. 74 | 75 | ===== 76 | 77 | BUGS, PROBLEMEN: https://github.com/gorhill/uMatrix/issues 78 | 79 | BRONCODE: https://github.com/gorhill/uMatrix (GPLv3) 80 | 81 | CHANGELOG: https://github.com/gorhill/uMatrix/releases 82 | -------------------------------------------------------------------------------- /doc/description/description.tr_TR.txt: -------------------------------------------------------------------------------- 1 | uMatrix: Matris tabanlı işaret et ve tıkla güvenlik duvarıdır, birçok gizlilik arttırıcı aracıyla birlikte gelir. 2 | 3 | *İleri düzey kullanıcılar için.* 4 | 5 | uMatrix tarayıcınızın nereye bağlanabileceği, ne tür veri indirebileceği ve yürütebileceği konusunda tam denetimi size verir. Kimse sizin yerinize karar vermez: Siz seçersiniz. Gizliliğinizin tam denetimi sizdedir. 6 | 7 | uMatrix tümünü engelle/istisnalara izin ver modunda çalışır, bunun anlamı 3. taraf betiklere ihtiyaç duyan web sitelerinin muhtemelen "bozuk" olabileceğidir. İki tıklama ile uMatrix genelde siteleri bozmayacak tümüne izin ver/istisnaları engelle moduna ayarlanabilir. Bu konu hakkında daha ayrıntılı bilgi almak için https://github.com/gorhill/httpswitchboard/wiki/How-to-use-HTTP-Switchboard:-Two-opposing-views bağlantısına bakın. 8 | 9 | * Engellendiğine veya izin verildiğine (sizin seçiminiz) bağlı olarak başarısız veya denenmiş TÜM uzak bağlantıları görün. 10 | 11 | * Bir veya birden fazla istek sınıfını hedefe ve veri türüne göre tek tıklama ile beyaz/kara listeye ekleyin (engellenen istek HİÇBİR ŞEKİLDE tarayıcınızdan ayrılamaz). 12 | 13 | * Etkili kara liste: çerezler tarayıcınızdan ayrılamaz, JavaScript'ler yürütülmez, eklentiler oynatılmaz, izleyici pikseller indirilmez, vs. 14 | 15 | * Belirli kara listelere bağlı (birçok eksiği bulunan) kalmak zorunda değilsiniz: Tüm denetim sizde. 16 | 17 | * Kullanımı kolay: uMatrix işaret et ve tıkla matrisiyle bir web sitesinden kaynaklanan istekleri kolaylıkla beyaz/kara listeye almanızı sağlar: 18 | 19 | - alan adları (sol sütun) 20 | * özelden 21 | * genele 22 | 23 | - istek türleri (üst satır) 24 | * çerezler 25 | * CSS ilişkili kaynaklar (stil şablonları ve web yazı tipleri) 26 | * resimler 27 | * eklentiler 28 | * betikler 29 | * XHR (betikler tarafından yapılan istekler) 30 | * çerçeveler 31 | * diğerleri 32 | 33 | Tek hücreyi, tüm satırı, satır gruplarını, tüm sütunu veya tüm matrisi bir tek tıklama ile kara/beyaz listeye alabilirsiniz. 34 | 35 | uMatrix'in süzgeç motoru hangi hücrelerin kara/beyaz listede bulunduğuna göre öncelik mantığını kullanarak nelerin engelleneceğine veya nelere izin verileceğine karar verir. Örneğin, bu şekilde sayfada beliren yeni veri türlerine sürekli izin vermenize gerek kalmadan tüm sayfayı beyaz listeye almanıza izin verir. 36 | 37 | Tüm kurallar kapsamlıdır. Örneğin, `facebook.com` ve `facebook.net` sitelerini `www.facebook.com`dışındaki sitelerde engelleyebilirsiniz. Bu şekilde Facebook gezinti alışkanlıklarınızla ilgili profil oluşturamayacaktır. 38 | 39 | Bu eklentinin en basit olarak amacı web sitelerine izin vererek veya engelleyerek, tümden veya kısmi olarak, kullanıcıların kendi gizliliklerine dikkat etmelerini teşvik etmektir. 40 | 41 | Bu eklenti 3. taraf alan dosyalarıyla toplamda 62.000'nin üzerinde farklı alan adıyla birlikte gelir (listeler seçime bağlı olarak etkinleştirilebilir veya devre dışı bırakılabilir). 42 | 43 | Sonuçta, internette nasıl gezmek istediğinizi seçebilirsiniz: 44 | 45 | * Varsayılan olarak tümünü kara listele ve gerektiğinde beyaz listeye ekle (varsayılan mod). 46 | 47 | * Tümünü beyaz listele ve gerektiğinde kara listeye ekle. 48 | 49 | Her halükarda, önceden ayarlanmış kara listelerden faydalanarak izleyiciler, kötü niyetli siteler, vb. tehditlere karşı temel koruma alırsınız. Veya önceden tanımlanmış bu kara listeleri devre dışı bırakabilirsiniz. 50 | 51 | Sizin seçiminiz. 52 | 53 | Rastgele toplanmış belgeler: https://github.com/gorhill/uMatrix/wiki (çalışma gerektiriyor) 54 | 55 | ===== 56 | 57 | Ayrıca bu eklenti bir web sayfasının bilginiz dışında tarayıcınızda ne yapmaya çalıştığını anlamanıza yardımcı olur. Web sayfasının neyle iletişim kurduğunu görmenizi ve web sayfasında kurulan bu iletişimin belirli öğe sınıflarına kısıtlanması üzerine karar vermenizi sağlar. 58 | 59 | Eklenti simgesinde görünen sayı web sitesi tarafından girişimde bulunulmuş farklı istek sayısının toplamıdır (izin verilip verilmediğine göre başarılı veya değil). 60 | 61 | Bir bileşeni beyaz, kara veya gri listeye eklemek için matristeki uygun girdiye tıklayın. Gri listenin anlamı bir hücrenin engelleniş veya izin veriliş durumu matristeki yüksek öncellikli başka bir hücreden devralınmasıdır. 62 | 63 | Kırmızı dörtgen = etkin biçimde kara listelenmiş, yani isteklerin amaçlanan hedeflerine erişimleri önlenecektir: 64 | * Koyu kırmızı dörtgen: alan adı ve/veya istek türü özellikle kara listelenmiş. 65 | * Açık kırmızı dörtgen: kara liste durumu devralınmış çünkü girdi gri listelenmiş. 66 | 67 | Yeşil dörtgen = etkin biçimde beyaz listelenmiş, yani isteklerin amaçlanan hedeflerine erişimlerine izin verilecektir: 68 | * Koyu yeşil dörtgen: alan adı ve/veya istek türü özellikle beyaz listelenmiş. 69 | * Açık yeşil dörtgen: beyaz liste durumu devralınmış çünkü girdi gri listelenmiş. 70 | 71 | Matristeki üst sol hücre, "tümü" hücresi, varsayılan genel ayarları temsil eder. Her şeye izin vermenizde veya her şeyi engellemenizde varsayılan davranışı seçmenize olanak sağlar. Bazıları her şeye izin verirken istisnai olarak engellemeyi tercih eder. Benim kişisel tercihim ise tabiki tersidir, her şeyi engelle ve istisnai olarak izin ver. 72 | 73 | Bu eklenti ayrıca gezinti hızınızı da arttırmak istiyorsanız kullanışlıdır. Örneğin, genel olarak resim isteklerini engelleyerek. 74 | 75 | ===== 76 | 77 | HATALAR, SORUNLAR: https://github.com/gorhill/uMatrix/issues 78 | 79 | KAYNAK KODU: https://github.com/gorhill/uMatrix (GPLv3) 80 | 81 | DEĞİŞİM GÜNLÜĞÜ: https://github.com/gorhill/uMatrix/releases 82 | -------------------------------------------------------------------------------- /doc/description/description.txt: -------------------------------------------------------------------------------- 1 | uMatrix: A point-and-click matrix-based firewall, with many privacy-enhancing tools. 2 | 3 | *For advanced users.* 4 | 5 | uMatrix put you in full control of where your browser is allowed to connect, what type of data it is allowed to download, and what it is allowed to execute. Nobody else decides for you: You choose. You are in full control of your privacy. 6 | 7 | Out of the box, uMatrix works in relax block-all/allow-exceptionally mode, meaning web sites which require 3rd-party scripts are likely to be "broken". With two clicks, uMatrix can be set to work in allow-all/block-exceptionally mode, which generally will not break web sites. See https://github.com/gorhill/httpswitchboard/wiki/How-to-use-HTTP-Switchboard:-Two-opposing-views for more details on this topic. 8 | 9 | * See ALL the remote connections, failed or attempted, depending on whether they were blocked or allowed (you decide). 10 | 11 | * A single-click to whitelist/blacklist one or multiple classes of requests according to the destination and type of data (a blocked request will NEVER leave your browser). 12 | 13 | * Efficient blacklisting: cookies won't leave your browser, JavaScript won't execute, media won't play, tracking pixels won't download, etc. 14 | 15 | * You do not have to solely rely on just one particular curated blacklist (arguably with many missing entries) outside which nothing else can be blocked: You are in full control. 16 | 17 | * Ease of use: uMatrix lets you easily whitelist/blacklist net requests which originate from within a web page according to a point-and-click matrix: 18 | 19 | - domain names (left column) 20 | * from very specific 21 | * to very generic 22 | 23 | - type of requests (top row) 24 | * cookies 25 | * css (stylesheets and web fonts) 26 | * images 27 | * media 28 | * scripts 29 | * xhr (requests made by scripts) 30 | * frames 31 | * others 32 | 33 | You can blacklist/whitelist a single cell, an entire row, a group of rows, an entire column, or the whole matrix with just one click. 34 | 35 | uMatrix's filtering engine uses precedence logic to evaluate what is blocked/allowed according to which cells are blacklisted/whitelisted. For example, this allows you to whitelist a whole page with one click, without having to repeatedly whitelist whatever new data appear on the page. 36 | 37 | All rules are scoped. For example, you can block `facebook.com` and `facebook.net` everywhere except when visiting a page on `www.facebook.com`. This way Facebook won't be able to build a profile of your browsing habits. 38 | 39 | The goal of this extension is to make the allowing or blocking of web sites, wholly or partly, as straightforward as possible, so as to encourage users to care about their privacy. 40 | 41 | The extension comes with 3rd-party hosts files totaling over 62,000 distinct hostnames (lists can be selectively disabled/enabled according to your choice). 42 | 43 | Ultimately, you can choose however you browse the net: 44 | 45 | * Blacklist all by default, and whitelist as needed (default mode). 46 | 47 | * Whitelist all by default, and blacklist as needed. 48 | 49 | Either way, you still benefit from the preset blacklists so that at least you get basic protection from trackers, malware sites, etc. Or you can disable all of these preset blacklists. 50 | 51 | Your choice. 52 | 53 | Randomly assembled documentation: https://github.com/gorhill/uMatrix/wiki 54 | 55 | ===== 56 | 57 | This extension is also useful to understand what the web page in your browser is doing, often without your knowledge. You have full ability to see and decide with whom a web page communicates, and to restrict these communications to specific classes of objects within the web page. 58 | 59 | The number which appears in the extension icon correspond to the total number of distinct requests blocked by the extension. 60 | 61 | Simply click on the appropriate entry in the matrix in order to white-, black- or graylist a component. Graylisting means the blocked or allowed status will be inherited from another cell with higher precedence in the matrix. 62 | 63 | Red square = effectively blacklisted, i.e. requests are prevented from reaching their intended destination: 64 | * Dark red square: the domain name and/or type of request is specifically blacklisted. 65 | * Faded red square: the blacklist status is inherited because the entry is graylisted. 66 | 67 | Green square = effectively whitelisted, i.e. requests are allowed to reach their intended destination: 68 | * Dark green square: the domain name and/or type of request is specifically whitelisted. 69 | * Faded green square: the whitelist status is inherited because the entry is graylisted. 70 | 71 | The top-left cell in the matrix, the "all" cell, represents the default global setting, which allows you to choose whether allowing or blocking everything is the default behavior. Some prefer to allow everything while blocking exceptionally. My personal preference is of course the reverse, blocking everything and allowing exceptionally. 72 | 73 | This extension is also useful if you wish to speed up your browsing, by globally blocking all requests for images as an example. 74 | 75 | ===== 76 | 77 | BUGS, ISSUES: https://github.com/uBlockOrigin/uMatrix-issues/issues 78 | 79 | SOURCE CODE: https://github.com/gorhill/uMatrix (GPLv3) 80 | 81 | CHANGE LOG: https://github.com/gorhill/uMatrix/releases 82 | -------------------------------------------------------------------------------- /doc/description/description.zh_CN.txt: -------------------------------------------------------------------------------- 1 | µMatrix: 一个靠点击工作的矩阵防火墙,拥有许多隐私保护工具。 面向高级用户。 2 | 3 | µMatrix 让你控制你的浏览器可以连接哪里,可以请求哪些数据,以及控制允许如何执行。 没有人替你做决定:一切由你选择。 你将可以完全控制你的隐私权。 4 | 5 | Out of the box, µMatrix works in relax block-all/allow-exceptionally mode, meaning web sites which require 3rd-party scripts are likely to be "broken". With two clicks, µMatrix can be set to work in allow-all/block-exceptionally mode, which generally will not break web sites. See https://github.com/gorhill/httpswitchboard/wiki/How-to-use-HTTP-Switchboard:-Two-opposing-views for more details on this topic. 6 | 7 | Regarding the myth that "Chromium-based browsers can't reliably block javascript", see: https://github.com/gorhill/httpswitchboard/wiki/Blocking-javascript-execution-reliably-in-Chromium-based-browsers. Summary: Yes, javascript can be blocked reliably in Chromium. 8 | 9 | * 看到所有的远程连接,无论已失败还是已尝试,这都取决于它们被阻止还是被允许(都取决于您的选择)。 10 | 11 | * A single-click to whitelist/blacklist one or multiple classes of requests according to the destination and type of data (a blocked request will NEVER leave your browser). 12 | 13 | * Efficient blacklisting: cookies won't leave your browser, javascript won't execute, plugins won't play, tracking pixels won't download, etc. 14 | 15 | * You do not have to solely rely on just one particular curated blacklist (arguably with many missing entries) outside which nothing else can be blocked: You are in full control. 16 | 17 | * Ease of use: µMatrix lets you easily whitelist/blacklist net requests which originate from within a web page according to a point-and-click matrix: 18 | 19 | - 域名 (左列) 20 | * 从非常具体 21 | * 到非常普通 22 | 23 | -请求种类(顶栏) 24 | * Cookie 25 | * CSS相关资源(样式表和字体) 26 | * 图片 27 | * 插件 28 | * 脚本 29 | * XHR(由脚本发起的请求) 30 | * 框架 31 | * 其他 32 | 33 | You can blacklist/whitelist a single cell, an entire row, a group of rows, an entire column, or the whole matrix with just one click. 34 | 35 | µMatrix's filtering engine uses precedence logic to evaluate what is blocked/allowed according to which cells are blacklisted/whitelisted. For example, this allows you to whitelist a whole page with one click, without having to repeatedly whitelist whatever new data appear on the page. 36 | 37 | All rules are scoped. For example, you can block `facebook.com` and `facebook.net` everywhere except when visiting a page on `www.facebook.com`. This way Facebook won't be able to build a profile of your browsing habits. 38 | 39 | The goal of this extension is to make the allowing or blocking of web sites, wholly or partly, as straightforward as possible, so as to encourage users to care about their privacy. 40 | 41 | The extension comes with 3rd-party hosts files totaling over 58,000 distinct hostnames (lists can be selectively disabled/enabled according to your choice). 42 | 43 | Ultimately, you can choose however you browse the net: 44 | 45 | * Blacklist all by default, and whitelist as needed (default mode). 46 | 47 | * Whitelist all by default, and blacklist as needed. 48 | 49 | Either way, you still benefit from the preset blacklists so that at least you get basic protection from trackers, malware sites, etc. Or you can disable all of these preset blacklists. 50 | 51 | Your choice. 52 | 53 | 相关文档: https://github.com/gorhill/uMatrix/wiki 54 | 55 | ===== 56 | 57 | 反馈: 58 | 59 | For any question/issue you might have, use the "Send Feedback" button on the right, in order for me to be able to answer readily. I can't answer directly to reviews, but I will be more than happy to answer you directly in the feedback section. 60 | 61 | ===== 62 | 63 | 缺陷、问题、建议: 64 | 65 | https://github.com/gorhill/uMatrix/issues 66 | 67 | You are very welcomed to contribute your views on open issues and suggestions, various arguments for/against help me in deciding what is needed to improve the extension. 68 | 69 | Ease of use is the primary goal. I've seen users give up on Firefox's NoScript because it gets too much in the way according to them, so rather than blame these users for poor security habits, I prefer to blame developers and this project is a tentative to address the issues which cause some users to give up on basic security. 70 | 71 | This extension is also useful to understand what the web page in your browser is doing, often without your knowledge. You have full ability to see and decide with whom a web page communicates, and to restrict these communications to specific classes of objects within the web page. 72 | 73 | The number which appear in the extension icon correspond to the total number of distinct requests attempted (successfully or not depending on whether these were allowed or blocked) by the web page. 74 | 75 | Simply click on the appropriate entry in the matrix in order to white-, black- or graylist a component. Graylisting means the blocked or allowed status will be inherited from another cell with higher precedence in the matrix. 76 | 77 | Red square = effectively blacklisted, i.e. requests are prevented from reaching their intended destination: 78 | * Dark red square: the domain name and/or type of request is specifically blacklisted. 79 | * Faded red square: the blacklist status is inherited because the entry is graylisted. 80 | 81 | Green square = effectively whitelisted, i.e. requests are allowed to reach their intended destination: 82 | * Dark green square: the domain name and/or type of request is specifically whitelisted. 83 | * Faded green square: the whitelist status is inherited because the entry is graylisted. 84 | 85 | The top-left cell in the matrix, the "all" cell, represents the default global setting, which allows you to choose whether allowing or blocking everything is the default behavior. Some prefer to allow everything while blocking exceptionally. 我的个人倾向当然与此相反,拦截一切和放行例外。 86 | 87 | 如果需要,这个扩展也可用来加快您的上网速度,例如全局性阻止所有图片请求。 88 | 89 | ===== 90 | 91 | 源代码: https://github.com/gorhill/uMatrix (GPLv3) 92 | 93 | 变更日志: https://github.com/gorhill/uMatrix/releases 94 | -------------------------------------------------------------------------------- /doc/description/description.zh_TW.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/description/description.zh_TW.txt -------------------------------------------------------------------------------- /doc/img/chromium-about-blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/img/chromium-about-blank.png -------------------------------------------------------------------------------- /doc/img/chromium-privacy-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/img/chromium-privacy-settings.png -------------------------------------------------------------------------------- /doc/img/per-scope-switches.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/img/per-scope-switches.png -------------------------------------------------------------------------------- /doc/img/strict-https-at-work.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/img/strict-https-at-work.png -------------------------------------------------------------------------------- /doc/img/wired-walkthru-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/img/wired-walkthru-1.png -------------------------------------------------------------------------------- /doc/img/wired-walkthru-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/img/wired-walkthru-2.png -------------------------------------------------------------------------------- /doc/img/wired-walkthru-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/img/wired-walkthru-3.png -------------------------------------------------------------------------------- /doc/img/wired-walkthru-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/img/wired-walkthru-4.png -------------------------------------------------------------------------------- /doc/img/wired-walkthru-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/img/wired-walkthru-5.png -------------------------------------------------------------------------------- /doc/img/wired-walkthru-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/img/wired-walkthru-6.png -------------------------------------------------------------------------------- /doc/screenshots/chrome-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/screenshots/chrome-1.png -------------------------------------------------------------------------------- /doc/screenshots/chrome-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/screenshots/chrome-2.png -------------------------------------------------------------------------------- /doc/screenshots/chrome-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/screenshots/chrome-3.png -------------------------------------------------------------------------------- /doc/screenshots/chrome-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/screenshots/chrome-4.png -------------------------------------------------------------------------------- /doc/screenshots/chrome-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/screenshots/chrome-5.png -------------------------------------------------------------------------------- /doc/screenshots/ff-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/screenshots/ff-1.png -------------------------------------------------------------------------------- /doc/screenshots/ff-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/screenshots/ff-2.png -------------------------------------------------------------------------------- /doc/screenshots/ff-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/screenshots/ff-3.png -------------------------------------------------------------------------------- /doc/screenshots/ff-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/screenshots/ff-4.png -------------------------------------------------------------------------------- /doc/screenshots/opera-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/screenshots/opera-1.png -------------------------------------------------------------------------------- /doc/screenshots/opera-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/screenshots/opera-2.png -------------------------------------------------------------------------------- /doc/screenshots/opera-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/screenshots/opera-3.png -------------------------------------------------------------------------------- /doc/screenshots/opera-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/doc/screenshots/opera-4.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-0.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-1.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-10.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-11.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-12.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-13.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-14.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-15.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-16.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-17.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-18.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-19.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-2.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-3.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-4.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-5.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-6.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-7.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-8.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-9.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon19-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon19-off.png -------------------------------------------------------------------------------- /platform/chromium/img/browsericons/icon38-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/platform/chromium/img/browsericons/icon38-off.png -------------------------------------------------------------------------------- /platform/chromium/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "nuTensor", 4 | "short_name": "nuTensor", 5 | "version": "1.3.3.8", 6 | "description": "__MSG_extShortDesc__", 7 | "icons": { 8 | "16": "img/icon_16.png", 9 | "128": "img/icon_128.png" 10 | }, 11 | "browser_action": { 12 | "default_icon": { 13 | "19": "img/browsericons/icon19-19.png" 14 | }, 15 | "default_title": "nuTensor", 16 | "default_popup": "popup.html" 17 | }, 18 | "author": "Raymond Hill", 19 | "background": { 20 | "page": "background.html" 21 | }, 22 | "content_scripts": [ 23 | { 24 | "matches": ["http://*/*", "https://*/*"], 25 | "js": ["/js/vapi.js", "/js/vapi-client.js", "/js/contentscript-start.js"], 26 | "run_at": "document_start", 27 | "all_frames": true 28 | }, 29 | { 30 | "matches": ["http://*/*", "https://*/*"], 31 | "js": ["/js/contentscript.js"], 32 | "run_at": "document_end", 33 | "all_frames": true 34 | } 35 | ], 36 | "default_locale": "en", 37 | "homepage_url": "https://github.com/geekprojects/nuTensor", 38 | "minimum_chrome_version": "45.0", 39 | "options_ui": { 40 | "page": "dashboard.html", 41 | "open_in_tab": true 42 | }, 43 | "permissions": [ 44 | "browsingData", 45 | "cookies", 46 | "privacy", 47 | "storage", 48 | "tabs", 49 | "unlimitedStorage", 50 | "webNavigation", 51 | "webRequest", 52 | "webRequestBlocking", 53 | "" 54 | ] 55 | } 56 | -------------------------------------------------------------------------------- /platform/chromium/vapi.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | uMatrix - a browser extension to block requests. 4 | Copyright (C) 2017-present Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uBlock 20 | */ 21 | 22 | 'use strict'; 23 | 24 | /* global HTMLDocument, XMLDocument */ 25 | 26 | // For background page, auxiliary pages, and content scripts. 27 | 28 | /******************************************************************************/ 29 | 30 | if ( self.browser instanceof Object ) { 31 | self.chrome = self.browser; 32 | } else { 33 | self.browser = self.chrome; 34 | } 35 | 36 | /******************************************************************************/ 37 | 38 | // https://bugzilla.mozilla.org/show_bug.cgi?id=1408996#c9 39 | var vAPI = self.vAPI; // jshint ignore:line 40 | 41 | // https://github.com/chrisaljoudi/uBlock/issues/464 42 | // https://github.com/chrisaljoudi/uBlock/issues/1528 43 | // A XMLDocument can be a valid HTML document. 44 | 45 | // https://github.com/gorhill/uBlock/issues/1124 46 | // Looks like `contentType` is on track to be standardized: 47 | // https://dom.spec.whatwg.org/#concept-document-content-type 48 | 49 | // https://forums.lanik.us/viewtopic.php?f=64&t=31522 50 | // Skip text/plain documents. 51 | 52 | if ( 53 | ( 54 | document instanceof HTMLDocument || 55 | document instanceof XMLDocument && 56 | document.createElement('div') instanceof HTMLDivElement 57 | ) && 58 | ( 59 | /^image\/|^text\/plain/.test(document.contentType || '') === false 60 | ) && 61 | ( 62 | self.vAPI instanceof Object === false || vAPI.nuTensor !== true 63 | ) 64 | ) { 65 | vAPI = self.vAPI = { nuTensor: true }; 66 | } 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | /******************************************************************************* 76 | 77 | DO NOT: 78 | - Remove the following code 79 | - Add code beyond the following code 80 | Reason: 81 | - https://github.com/gorhill/uBlock/pull/3721 82 | - uMatrix never uses the return value from injected content scripts 83 | 84 | **/ 85 | 86 | void 0; 87 | -------------------------------------------------------------------------------- /platform/firefox/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "browser_specific_settings": { 3 | "gecko": { 4 | "id": "nuTensor@geekprojects.com", 5 | "strict_min_version": "60.0" 6 | } 7 | }, 8 | "author": "Raymond Hill", 9 | "background": { 10 | "page": "background.html" 11 | }, 12 | "browser_action": { 13 | "browser_style": false, 14 | "default_icon": { 15 | "19": "img/browsericons/icon19-off.png" 16 | }, 17 | "default_title": "nuTensor", 18 | "default_popup": "popup.html" 19 | }, 20 | "content_scripts": [ 21 | { 22 | "matches": ["http://*/*", "https://*/*"], 23 | "js": ["/js/vapi.js", "/js/vapi-client.js", "/js/contentscript-start.js"], 24 | "run_at": "document_start", 25 | "all_frames": true 26 | }, 27 | { 28 | "matches": ["http://*/*", "https://*/*"], 29 | "js": ["/js/contentscript.js"], 30 | "run_at": "document_end", 31 | "all_frames": true 32 | } 33 | ], 34 | "default_locale": "en", 35 | "description": "__MSG_extShortDesc__", 36 | "icons": { 37 | "16": "img/icon_16.png", 38 | "128": "img/icon_128.png" 39 | }, 40 | "manifest_version": 2, 41 | "name": "nuTensor", 42 | "options_ui": { 43 | "page":"dashboard.html", 44 | "open_in_tab": true 45 | }, 46 | "permissions": [ 47 | "browsingData", 48 | "cookies", 49 | "dns", 50 | "privacy", 51 | "storage", 52 | "tabs", 53 | "webNavigation", 54 | "webRequest", 55 | "webRequestBlocking", 56 | "" 57 | ], 58 | "short_name": "nuTensor", 59 | "sidebar_action": { 60 | "default_title": "__MSG_loggerPageName__", 61 | "default_panel": "logger-ui.html", 62 | "default_icon": { 63 | "16": "img/icon_16.png", 64 | "128": "img/icon_128.png" 65 | }, 66 | "open_at_install": false 67 | }, 68 | "version": "0.9.9" 69 | } 70 | -------------------------------------------------------------------------------- /platform/firefox/webext.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | uBlock Origin - a browser extension to block requests. 4 | Copyright (C) 2019-present Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uBlock 20 | */ 21 | 22 | 'use strict'; 23 | 24 | const webext = browser; // jshint ignore:line 25 | -------------------------------------------------------------------------------- /platform/opera/manifest-add.json: -------------------------------------------------------------------------------- 1 | { 2 | "sidebar_action": { 3 | "default_title": "__MSG_loggerPageName__", 4 | "default_panel": "logger-ui.html", 5 | "default_icon": { 6 | "16": "img/icon_16.png", 7 | "128": "img/icon_128.png" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | nuTensor — About 6 | 7 | 8 | 17 | 18 | 19 | 20 |
21 | 22 |

nuTensor

23 | 45 | 46 |

47 |
48 |

49 | 50 | 51 |

52 |

53 |

54 | 55 |
56 | 57 |
58 | 59 | 60 | 61 | 62 | 63 |
64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /src/asset-viewer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | uMatrix — Asset viewer 7 | 8 | 9 | 10 | 11 | 27 | 28 | 29 |
30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/background.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | nuTensor 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/cloud-ui.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |

13 | cog 14 |
15 |
16 |

17 |

18 |

19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /src/css/cloud-ui.css: -------------------------------------------------------------------------------- 1 | #cloudWidget { 2 | background: url("../img/cloud.png") hsl(216, 100%, 93%); 3 | border-radius: 3px; 4 | margin: 0.5em 0; 5 | padding: 1em 1em 0 1em; 6 | position: relative; 7 | } 8 | #cloudWidget.hide { 9 | display: none; 10 | } 11 | #cloudWidget > button { 12 | font-size: 180%; 13 | padding: 0 0.25em; 14 | position: relative; 15 | } 16 | #cloudWidget > button[disabled] { 17 | visibility: hidden; 18 | } 19 | #cloudWidget > button.error { 20 | color: red; 21 | } 22 | #cloudPullAndMerge { 23 | margin: 0 0.25em; 24 | } 25 | #cloudPullAndMerge > span:nth-of-type(2) { 26 | font-size: 50%; 27 | position: absolute; 28 | right: 0; 29 | top: 0; 30 | } 31 | #cloudWidget > span { 32 | color: gray; 33 | display: inline-block; 34 | font-size: 90%; 35 | margin: 0 1em; 36 | padding: 0; 37 | vertical-align: bottom; 38 | white-space: pre; 39 | } 40 | #cloudError { 41 | color: red; 42 | margin: 0; 43 | padding: 0.5em 0; 44 | } 45 | #cloudError > span { 46 | font-size: x-small; 47 | } 48 | #cloudWidget > #cloudCog { 49 | cursor: pointer; 50 | font-size: 110%; 51 | margin: 0; 52 | opacity: 0.5; 53 | padding: 0.2em; 54 | position: absolute; 55 | top: 0; 56 | } 57 | body[dir="ltr"] #cloudWidget > #cloudCog { 58 | right: 0; 59 | } 60 | body[dir="rtl"] #cloudWidget > #cloudCog { 61 | left: 0; 62 | } 63 | #cloudWidget > #cloudCog:hover { 64 | opacity: 1; 65 | } 66 | #cloudWidget > #cloudOptions { 67 | align-items: center; 68 | -webkit-align-items: center; 69 | background-color: rgba(0, 0, 0, 0.75); 70 | bottom: 0; 71 | display: none; 72 | justify-content: center; 73 | -webkit-justify-content: center; 74 | left: 0; 75 | position: fixed; 76 | right: 0; 77 | top: 0; 78 | z-index: 2000; 79 | } 80 | #cloudWidget > #cloudOptions.show { 81 | display: flex; 82 | display: -webkit-flex; 83 | } 84 | #cloudWidget > #cloudOptions > div { 85 | background-color: white; 86 | border-radius: 3px; 87 | padding: 1em; 88 | text-align: center; 89 | } 90 | -------------------------------------------------------------------------------- /src/css/codemirror.css: -------------------------------------------------------------------------------- 1 | .codeMirrorContainer { 2 | font-size: 12px; 3 | overflow: hidden; 4 | position: relative; 5 | } 6 | .CodeMirror { 7 | box-sizing: border-box; 8 | flex-grow: 1; 9 | height: 100%; 10 | width: 100%; 11 | } 12 | 13 | /* For when panels are used */ 14 | .codeMirrorContainer > div:not([class^="CodeMirror"]) { 15 | display: flex; 16 | flex-direction: column; 17 | height: 100%; 18 | } 19 | 20 | .cm-s-default .cm-comment { color: #777; } 21 | .cm-directive { color: #333; font-weight: bold; } 22 | .cm-staticext { color: #008; } 23 | .cm-staticnetBlock { color: #800; } 24 | .cm-staticnetAllow { color: #004f00; } 25 | .cm-staticOpt { background-color: #ddd; font-weight: bold; } 26 | 27 | .cm-search-widget { 28 | align-items: center; 29 | background-color: #eee; 30 | cursor: default; 31 | direction: ltr; 32 | display: flex; 33 | flex-shrink: 0; 34 | font-size: 110%; 35 | justify-content: center; 36 | padding: 4px 8px; 37 | /* position: absolute; */ 38 | right: 2em; 39 | top: 0; 40 | user-select: none; 41 | -moz-user-select: none; 42 | -webkit-user-select: none; 43 | z-index: 1000; 44 | } 45 | .cm-search-widget .fa-icon { 46 | fill: #888; 47 | font-size: 140%; 48 | } 49 | .cm-search-widget .fa-icon:not(.fa-icon-ro):hover { 50 | fill: #000; 51 | } 52 | .cm-search-widget-input { 53 | border: 1px solid gray; 54 | border-radius: 3px; 55 | display: inline-flex; 56 | min-width: 16em; 57 | } 58 | .cm-search-widget-input > input { 59 | border: 0; 60 | flex-grow: 1; 61 | } 62 | .cm-search-widget-input > .cm-search-widget-count { 63 | align-items: center; 64 | color: #888; 65 | display: none; 66 | flex-grow: 0; 67 | font-size: 80%; 68 | padding: 0 0.4em; 69 | pointer-events: none; 70 | } 71 | .cm-search-widget[data-query] .cm-search-widget-count { 72 | display: inline-flex; 73 | } 74 | .cm-search-widget .cm-search-widget-button:hover { 75 | color: #000; 76 | } 77 | .cm-search-widget .sourceURL { 78 | padding-left: 0.5em; 79 | padding-right: 0.5em; 80 | position: absolute; 81 | left: 0; 82 | } 83 | .cm-search-widget .sourceURL[href=""] { 84 | display: none; 85 | } 86 | 87 | .CodeMirror-merge-l-deleted { 88 | background-image: none; 89 | font-weight: bold; 90 | } 91 | .CodeMirror-merge-l-inserted { 92 | background-image: none; 93 | font-weight: bold; 94 | } 95 | -------------------------------------------------------------------------------- /src/css/common.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'httpsb'; 3 | font-style: normal; 4 | font-weight: normal; 5 | src: local('httpsb'), url(fonts/Roboto_Condensed/RobotoCondensed-Regular.ttf) format('truetype'); 6 | } 7 | @font-face { 8 | font-family: 'httpsb'; 9 | font-style: normal; 10 | font-weight: 100; 11 | src: local('httpsb'), url(fonts/Roboto_Condensed/RobotoCondensed-Light.ttf) format('truetype'); 12 | } 13 | 14 | body { 15 | font: 14px sans-serif; 16 | } 17 | body[dir="ltr"] { 18 | direction: ltr; 19 | } 20 | body[dir="rtl"] { 21 | direction: rtl; 22 | } 23 | 24 | /* http://stackoverflow.com/questions/2011142/how-to-change-the-style-of-title-attribute-inside-the-anchor-tag?answertab=votes */ 25 | *[data-i18n-tip] { 26 | position: relative; 27 | cursor: pointer; 28 | } 29 | *[data-i18n-tip]::after { 30 | content: ""; 31 | opacity: 0; 32 | } 33 | *[data-i18n-tip]:hover::after { 34 | background-color: #fffffa; 35 | border: 1px solid gray; 36 | border-radius: 3px; 37 | box-shadow: 1px 1px 3px gray; 38 | color: black; 39 | content: attr(data-tip); 40 | font: 12px sans-serif; 41 | left: 10vw; 42 | line-height: 140%; 43 | min-width: 25vw; 44 | opacity: 1; 45 | padding: 4px 6px; 46 | pointer-events: none; 47 | position: absolute; 48 | right: 10vw; 49 | text-align: start; 50 | top: 110%; 51 | -webkit-transition: opacity 0.15s 0.5s; 52 | transition: opacity 0.15s 0.5s; 53 | white-space: pre-line; 54 | z-index: 20; 55 | } 56 | body .tip-anchor-center[data-i18n-tip]:hover::after { 57 | left: -10vw; 58 | right: 10vw; 59 | } 60 | body[dir="ltr"] .tip-anchor-left[data-i18n-tip]:hover::after, 61 | body[dir="rtl"] .tip-anchor-right[data-i18n-tip]:hover::after { 62 | left: 0; 63 | right: unset; 64 | } 65 | body[dir="ltr"] .tip-anchor-right[data-i18n-tip]:hover::after, 66 | body[dir="rtl"] .tip-anchor-left[data-i18n-tip]:hover::after { 67 | left: unset; 68 | right: 0; 69 | } 70 | body.noTooltips *[data-i18n-tip]::after { 71 | display: none; 72 | } 73 | 74 | button.custom { 75 | padding: 0.6em 1em; 76 | border: 1px solid transparent; 77 | border-color: #ccc #ccc #bbb #bbb; 78 | border-radius: 3px; 79 | background-color: hsl(216, 0%, 75%); 80 | background-image: linear-gradient(#f2f2f2, #dddddd); 81 | background-repeat: repeat-x; 82 | color: #000; 83 | opacity: 0.8; 84 | } 85 | button.custom:hover { 86 | opacity: 1.0; 87 | } 88 | button.custom.important { 89 | padding: 0.6em 1em; 90 | border: 1px solid transparent; 91 | border-color: #ffcc7f #ffcc7f hsl(36, 100%, 73%); 92 | border-radius: 3px; 93 | background-color: hsl(36, 100%, 75%); 94 | background-image: linear-gradient(#ffdca8, #ffcc7f); 95 | background-repeat: repeat-x; 96 | color: #222; 97 | opacity: 0.8; 98 | } 99 | button.custom.important:hover { 100 | opacity: 1.0; 101 | } 102 | button.custom.disabled, 103 | button.custom[disabled] { 104 | border-color: #ddd #ddd hsl(36, 0%, 85%); 105 | background-color: hsl(36, 0%, 72%); 106 | background-image: linear-gradient(#f2f2f2, #dddddd); 107 | color: #666; 108 | opacity: 0.6; 109 | pointer-events: none; 110 | } 111 | code { 112 | font-size: 90%; 113 | } 114 | 115 | .px-icon { 116 | align-items: center; 117 | background-color: transparent; 118 | border: 0; 119 | display: inline-flex; 120 | filter: grayscale(100%); 121 | justify-content: center; 122 | margin: 0; 123 | padding: 0.1em; 124 | position: relative; 125 | } 126 | .px-icon > * { 127 | pointer-events: none; 128 | } 129 | .px-icon.disabled, 130 | .disabled > .px-icon, 131 | .px-icon[disabled], 132 | [disabled] > .px-icon { 133 | color: #000; 134 | fill: #000; 135 | opacity: 0.25; 136 | stroke: #888; 137 | pointer-events: none; 138 | } 139 | .px-icon > img { 140 | height: 1em; 141 | width: 1em; 142 | } 143 | .px-icon.active { 144 | filter: none; 145 | } 146 | -------------------------------------------------------------------------------- /src/css/dashboard-common.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #fff; 3 | box-sizing: border-box; 4 | color: #000; 5 | margin: 0; 6 | padding: 0; 7 | font: 14px/1.4 sans-serif; 8 | } 9 | body > *:first-child { 10 | margin-top: 0; 11 | } 12 | div.body { 13 | padding: 0 0.5em 0.5em 0.5em; 14 | } 15 | html.ltr h2 + * { 16 | margin: 0 0 0 1em; 17 | } 18 | html.rtl h2 + * { 19 | margin: 0 1em 0 0; 20 | } 21 | a { 22 | text-decoration: none; 23 | } 24 | button { 25 | align-items: center; 26 | display: inline-flex; 27 | padding: 0.3em 0.5em; 28 | } 29 | input[disabled] + label { 30 | color: gray; 31 | } 32 | .para { 33 | width: 40em; 34 | } 35 | 36 | .fa-icon.info { 37 | opacity: 0.25; 38 | vertical-align: middle; 39 | } 40 | .fa-icon.info:hover { 41 | opacity: 1; 42 | } 43 | .fa-icon.info.important { 44 | color: red; 45 | fill: red; 46 | } 47 | 48 | .whatisthis { 49 | border: 0; 50 | cursor: pointer; 51 | margin: 0 0 0 0.2em; 52 | opacity: 0.25; 53 | vertical-align: middle; 54 | } 55 | .whatisthis:hover { 56 | opacity: 1.0; 57 | } 58 | .whatisthis-expandable { 59 | background-color: #F8F8F8; 60 | border: 1px dotted #aaa; 61 | display: none; 62 | font-size: smaller; 63 | margin: 0.5em 0 1em 1.25em; 64 | padding: 0.5em; 65 | white-space: pre-line; 66 | } 67 | .whatisthis-expandable > p { 68 | margin-top: 1em; 69 | margin-bottom: 0; 70 | } 71 | .whatisthis-expandable > p:first-child { 72 | margin-top: 0; 73 | } 74 | .whatisthis-expandable.whatisthis-expanded { 75 | display: block; 76 | } 77 | .warn { 78 | margin: 0; 79 | padding: 5px; 80 | background-color: #FEDAE0; 81 | } 82 | -------------------------------------------------------------------------------- /src/css/dashboard.css: -------------------------------------------------------------------------------- 1 | body { 2 | border: 0; 3 | display: flex; 4 | flex-direction: column; 5 | font: 15px sans-serif; 6 | height: 100vh; 7 | margin: 0; 8 | overflow: hidden; 9 | padding: 0; 10 | width: 100vw; 11 | } 12 | #dashboard-nav { 13 | border: 0; 14 | margin: 0; 15 | padding: 0; 16 | width: 100vw; 17 | z-index: 10; 18 | } 19 | #dashboard-nav-widgets { 20 | margin: 0; 21 | border-bottom: 1px solid #ccc; 22 | padding: 4px 0 0 0; 23 | white-space: nowrap; 24 | background-color: white; 25 | } 26 | #dashboard-nav-widgets > span { 27 | padding: 0 0.5em; 28 | font-size: larger; 29 | vertical-align: bottom; 30 | } 31 | #dashboard-nav-widgets > span > img { 32 | width: 1em; 33 | } 34 | .tabButton { 35 | margin: 0; 36 | border: 1px solid #ccc; 37 | border-top-left-radius: 3px; 38 | border-top-right-radius: 3px; 39 | padding: 4px; 40 | display: inline-block; 41 | position: relative; 42 | top: 1px; 43 | color: black; 44 | background-color: #eee; 45 | font: inherit; 46 | cursor: pointer; 47 | text-decoration: none; 48 | } 49 | .tabButton:focus { 50 | outline: 0; 51 | } 52 | .tabButton:active,.tabButton:visited { 53 | color: inherited; 54 | } 55 | .tabButton.selected { 56 | border-bottom: 1px solid white; 57 | background-color: white; 58 | } 59 | iframe { 60 | background-color: transparent; 61 | border: 0; 62 | flex-grow: 1; 63 | margin: 0; 64 | overflow: auto; 65 | padding: 0; 66 | width: 100%; 67 | } 68 | -------------------------------------------------------------------------------- /src/css/fa-icons.css: -------------------------------------------------------------------------------- 1 | .fa-icon { 2 | align-items: center; 3 | background-color: transparent; 4 | border: 0; 5 | display: inline-flex; 6 | justify-content: center; 7 | margin: 0; 8 | padding: 0.1em; 9 | position: relative; 10 | user-select: none; 11 | -webkit-user-select: none; 12 | } 13 | .fa-icon > * { 14 | pointer-events: none; 15 | } 16 | .fa-icon.disabled, 17 | .disabled > .fa-icon, 18 | .fa-icon[disabled], 19 | [disabled] > .fa-icon { 20 | color: #000; 21 | fill: #000; 22 | opacity: 0.25; 23 | stroke: #888; 24 | pointer-events: none; 25 | } 26 | .fa-icon > .fa-icon-badge, 27 | .fa-icon.disabled > .fa-icon-badge { 28 | display: none; 29 | } 30 | .fa-icon.fa-icon-badged > .fa-icon-badge { 31 | background-color: rgba(255, 255, 255, 0.7); 32 | border-radius: 3px; 33 | bottom: 1px; 34 | display: inline-block; 35 | font-family: sans-serif; 36 | font-size: 40%; 37 | position: absolute; 38 | right: 1px; 39 | } 40 | .fa-icon.disabled > .fa-icon-badge { 41 | display: none; 42 | } 43 | .fa-icon.fa-icon-vflipped { 44 | transform: scale(1, -1); 45 | } 46 | 47 | .fa-icon > svg { 48 | height: 1em; 49 | width: 1em; 50 | } 51 | .fa-icon > .fa-icon_cloud-download, 52 | .fa-icon > .fa-icon_cloud-upload, 53 | .fa-icon > .fa-icon_eraser { 54 | width: calc(1em * 1920 / 1792); 55 | } 56 | .fa-icon > .fa-icon_exclamation-triangle { 57 | width: calc(1em * 1794 / 1792); 58 | } 59 | .fa-icon > .fa-icon_list-alt, 60 | .fa-icon > .fa-icon_reply, 61 | .fa-icon > .fa-icon_reply-all, 62 | .fa-icon > .fa-icon_th { 63 | width: calc(1em * 1792 / 1792); 64 | } 65 | .fa-icon > .fa-icon_spinner { 66 | width: calc(1em * 1728 / 1792); 67 | } 68 | .fa-icon > .fa-icon_download, 69 | .fa-icon > .fa-icon_puzzle-piece, 70 | .fa-icon > .fa-icon_search-minus, 71 | .fa-icon > .fa-icon_search-plus, 72 | .fa-icon > .fa-icon_unlink { 73 | width: calc(1em * 1664 / 1792); 74 | } 75 | .fa-icon > .fa-icon_home { 76 | width: calc(1em * 1612 / 1792); 77 | } 78 | .fa-icon > .fa-icon_clock, 79 | .fa-icon > .fa-icon_cog, 80 | .fa-icon > .fa-icon_info-circle, 81 | .fa-icon > .fa-icon_power-off, 82 | .fa-icon > .fa-icon_question-circle, 83 | .fa-icon > .fa-icon_refresh { 84 | width: calc(1em * 1536 / 1792); 85 | } 86 | .fa-icon > .fa-icon_arrow-left { 87 | width: calc(1em * 1472 / 1792); 88 | } 89 | .fa-icon > .fa-icon_filter { 90 | width: calc(1em * 1410 / 1792); 91 | } 92 | .fa-icon > .fa-icon_plus, 93 | .fa-icon > .fa-icon_trash-o { 94 | width: calc(1em * 1408 / 1792); 95 | } 96 | .fa-icon > .fa-icon_times { 97 | width: calc(1em * 1188 / 1792); 98 | } 99 | .fa-icon > .fa-icon_lock, 100 | .fa-icon > .fa-icon_unlock { 101 | width: calc(1em * 1152 / 1792); 102 | } 103 | .fa-icon > .fa-icon_angle-up, 104 | .fa-icon > .fa-icon_double-angle-up { 105 | width: calc(1em * 998 / 1792); 106 | } 107 | .fa-icon > .fa-icon_ellipsis-v { 108 | width: calc(1em * 384 / 1792); 109 | } 110 | -------------------------------------------------------------------------------- /src/css/fonts/Roboto_Condensed/RobotoCondensed-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/src/css/fonts/Roboto_Condensed/RobotoCondensed-Light.ttf -------------------------------------------------------------------------------- /src/css/fonts/Roboto_Condensed/RobotoCondensed-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/src/css/fonts/Roboto_Condensed/RobotoCondensed-Regular.ttf -------------------------------------------------------------------------------- /src/css/hosts-files.css: -------------------------------------------------------------------------------- 1 | @keyframes spin { 2 | 0% { transform: rotate(0); } 3 | 100% { transform: rotate(360deg); } 4 | } 5 | ul { 6 | padding: 0; 7 | list-style-type: none; 8 | } 9 | ul#options { 10 | margin-top: 0; 11 | } 12 | ul#options li { 13 | margin-bottom: 0.5em; 14 | } 15 | .assets { 16 | border: 1px solid #ccc; 17 | margin: 0.5em 0 0 0; 18 | padding: 0; 19 | } 20 | .assets > div:first-of-type { 21 | background-color: #eee; 22 | margin: 0; 23 | padding: 0.25em 0.5em; 24 | } 25 | .assets > div + div { 26 | padding: 0.5em 1em; 27 | } 28 | ul#lists { 29 | margin: 0.5em 0 0 0; 30 | padding: 0; 31 | } 32 | li.listEntry { 33 | align-items: baseline; 34 | display: flex; 35 | margin: 0 auto 0 auto; 36 | padding: 0.2em 0; 37 | } 38 | body[dir="ltr"] li.listEntry { 39 | margin-left: 1em; 40 | margin-right: 0em; 41 | } 42 | body[dir="rtl"] li.listEntry { 43 | margin-left: 0em; 44 | margin-right: 1em; 45 | } 46 | li.listEntry > * { 47 | margin-right: 0.5em; 48 | text-indent: 0; 49 | unicode-bidi: embed; 50 | } 51 | li.listEntry .content { 52 | display: inline-block; 53 | overflow: hidden; 54 | text-overflow: ellipsis; 55 | } 56 | li.listEntry.toRemove > input[type="checkbox"] { 57 | visibility: hidden; 58 | } 59 | li.listEntry.toRemove .content { 60 | text-decoration: line-through; 61 | } 62 | li.listEntry > .fa-icon { 63 | align-self: flex-end; 64 | color: #444; 65 | display: none; 66 | fill: #444; 67 | opacity: 0.5; 68 | padding: 0.2em; 69 | } 70 | li.listEntry > .status { 71 | display: none; 72 | } 73 | li.listEntry .fa-icon.status { 74 | cursor: default; 75 | } 76 | li.listEntry > .fa-icon:hover { 77 | opacity: 1; 78 | } 79 | li.listEntry.external .remove { 80 | color: darkred; 81 | fill: darkred; 82 | } 83 | li.listEntry.external .remove { 84 | display: inline-flex; 85 | } 86 | li.listEntry > a.fa-icon:not([href=""]) { 87 | display: inline-flex; 88 | } 89 | li.listEntry > a.mustread:hover { 90 | color: mediumblue; 91 | fill: mediumblue; 92 | } 93 | li.listEntry > .counts { 94 | font-size: smaller; 95 | } 96 | li.listEntry > input[type="checkbox"]:checked ~ .counts { 97 | display: inline; 98 | } 99 | li.listEntry .unsecure { 100 | color: darkred; 101 | fill: darkred; 102 | } 103 | li.listEntry.unsecure input[type="checkbox"]:checked ~ .unsecure { 104 | display: inline-flex; 105 | } 106 | li.listEntry .fa-icon.remove, 107 | li.listEntry .fa-icon.cache { 108 | cursor: pointer; 109 | } 110 | li.listEntry.cached:not(.obsolete) input[type="checkbox"]:checked ~ .cache { 111 | display: inline-flex; 112 | } 113 | li.listEntry .obsolete { 114 | color: hsl(36, 100%, 40%); 115 | fill: hsl(36, 100%, 40%); 116 | } 117 | body:not(.updating) li.listEntry.obsolete input[type="checkbox"]:checked ~ .obsolete { 118 | display: inline-flex; 119 | } 120 | li.listEntry .updating { 121 | animation: spin 1s steps(8) infinite; 122 | transform-origin: 50%; 123 | } 124 | body.updating li.listEntry.obsolete input[type="checkbox"]:checked ~ .updating { 125 | display: inline-flex; 126 | } 127 | li.listEntry .failed { 128 | color: darkred; 129 | fill: darkred; 130 | } 131 | li.listEntry.failed input[type="checkbox"]:checked ~ .failed { 132 | display: inline-flex; 133 | } 134 | .dim { 135 | opacity: 0.5; 136 | } 137 | li.listEntry.notAnAsset { 138 | flex-wrap: wrap; 139 | } 140 | li.listEntry.notAnAsset > input[type="checkbox"] ~ textarea { 141 | display: none; 142 | margin-left: 1.6em; 143 | } 144 | li.listEntry.notAnAsset > input[type="checkbox"]:checked ~ textarea { 145 | display: block; 146 | } 147 | li.listEntry.notAnAsset > textarea { 148 | border: 1px solid #ddd; 149 | box-sizing: border-box; 150 | display: block; 151 | font-size: smaller; 152 | width: calc(100% - 4em); 153 | height: 6em; 154 | resize: vertical; 155 | white-space: pre; 156 | } 157 | #recipes li.listEntry.toInline { 158 | display: none; 159 | } 160 | body.contributor #recipes li.listEntry.toInline { 161 | display: block; 162 | } 163 | #recipes li.listEntry.toInline > textarea { 164 | height: 18em; 165 | } 166 | -------------------------------------------------------------------------------- /src/css/main-blocked.css: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | uMatrix - a browser extension to black/white list requests. 4 | Copyright (C) 2018-present Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uMatrix 20 | */ 21 | 22 | body { 23 | font-family: sans-serif; 24 | font-size: large; 25 | text-align: center; 26 | } 27 | body > div { 28 | margin: 1.5em 0; 29 | } 30 | body > div > p { 31 | margin: 4px 0; 32 | } 33 | body > div > p:first-child { 34 | margin: 1.5em 0 0 0; 35 | } 36 | .code { 37 | background-color: rgba(0, 0, 0, 0.1); 38 | display: inline-block; 39 | font-family: monospace; 40 | font-size: large; 41 | line-height: 1.2; 42 | padding: 2px 4px; 43 | word-break: break-all; 44 | } 45 | button { 46 | cursor: pointer; 47 | margin: 0 1em 0.25em 1em; 48 | padding: 0.25em 0.5em; 49 | font-size: inherit; 50 | } 51 | #theURL { 52 | margin: 0.25em 0; 53 | padding: 0; 54 | } 55 | #theURL > * { 56 | margin: 0; 57 | } 58 | #theURL > p { 59 | position: relative; 60 | z-index: 10; 61 | } 62 | #parsed { 63 | background-color: #f8f8f8; 64 | border: 1px solid rgba(0, 0, 0, 0.1); 65 | border-top: none; 66 | color: gray; 67 | font-size: small; 68 | overflow-x: hidden; 69 | padding: 4px; 70 | text-align: initial; 71 | text-overflow: ellipsis; 72 | } 73 | #theURL.collapsed > #parsed { 74 | display: none; 75 | } 76 | #theURL .fa-icon { 77 | bottom: -0.5em; 78 | cursor: pointer; 79 | display: none; 80 | opacity: 0.25; 81 | position: absolute; 82 | right: 0; 83 | } 84 | #theURL .fa-icon:hover { 85 | opacity: 1; 86 | } 87 | #theURL.hasParams.collapsed .fa-icon.expand { 88 | display: inline-flex; 89 | } 90 | #theURL.hasParams:not(.collapsed) .fa-icon.collapse { 91 | display: inline-flex; 92 | } 93 | 94 | #parsed ul, #parsed li { 95 | list-style-type: none; 96 | } 97 | #parsed li { 98 | white-space: nowrap; 99 | } 100 | #parsed span { 101 | display: inline-block; 102 | } 103 | #parsed span:first-of-type { 104 | font-weight: bold; 105 | } 106 | #warningSign { 107 | margin: 1e, 0; 108 | opacity: 1; 109 | pointer-events: none; 110 | width: 100%; 111 | } 112 | #warningSign > span { 113 | color: #f2a500; 114 | fill: #f2a500; 115 | font-size: 10em; 116 | } 117 | -------------------------------------------------------------------------------- /src/css/raw-settings.css: -------------------------------------------------------------------------------- 1 | html { 2 | height: 100vh; 3 | overflow: hidden; 4 | } 5 | body { 6 | overflow: hidden; 7 | } 8 | #rawSettings { 9 | border-top: 1px solid #ddd; 10 | height: 75vh; 11 | text-align: left; 12 | width: 100%; 13 | } 14 | .CodeMirror-wrap pre { 15 | word-break: break-all; 16 | } 17 | -------------------------------------------------------------------------------- /src/css/scope-selector.css: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | uMatrix - a browser extension to black/white list requests. 4 | Copyright (C) 2018-present Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uMatrix 20 | */ 21 | 22 | .scope { 23 | background-color: #ccc; 24 | border: 1px solid #ccc; 25 | box-sizing: content-box; 26 | -moz-box-sizing: content-box; 27 | display: inline-flex; 28 | color: white; 29 | margin: 0; 30 | padding: 1px; 31 | cursor: pointer; 32 | } 33 | .scope > span { 34 | align-items: center; 35 | display: inline-flex; 36 | } 37 | .scope > span > span { 38 | pointer-events: none; 39 | white-space: nowrap; 40 | } 41 | #specificScope { 42 | direction: ltr; 43 | justify-content: flex-end; 44 | width: 16em; 45 | } 46 | #specificScope.on { 47 | background-color: #24c; 48 | border-color: #24c; 49 | } 50 | #specificScope > span { 51 | background-color: #ccc; 52 | justify-content: flex-end; 53 | } 54 | #specificScope > span.on { 55 | background-color: #24c; 56 | } 57 | #specificScope > span:first-of-type:not(.on):hover, 58 | #specificScope > span:first-of-type:not(.on):hover ~ span:not(.on), 59 | #specificScope > span:not(.on) + span:not(.on):hover, 60 | #specificScope > span:not(.on) + span:not(.on):hover ~ span:not(.on) { 61 | background-color: #999; 62 | } 63 | #specificScope > span:first-of-type:not(.on):hover ~ span, 64 | #specificScope > span:not(.on) + span:not(.on):hover ~ span, 65 | #specificScope > span.on + span:hover, 66 | #specificScope > span.on + span:hover ~ span { 67 | background-color: #139; 68 | } 69 | #specificScope > span:first-of-type { 70 | flex: 1; 71 | } 72 | #globalScope { 73 | justify-content: center; 74 | margin-left: 1px; 75 | width: 1.6em; 76 | } 77 | #globalScope.on { 78 | background-color: #000; 79 | border-color: #000; 80 | } 81 | #globalScope:not(.on):hover { 82 | background-color: #999; 83 | border-color: #999; 84 | } 85 | -------------------------------------------------------------------------------- /src/css/user-rules.css: -------------------------------------------------------------------------------- 1 | html { 2 | height: 100vh; 3 | overflow: hidden; 4 | } 5 | #diff { 6 | border: 0; 7 | margin: 0; 8 | padding: 0; 9 | white-space: nowrap; 10 | } 11 | #diff .tools > * { 12 | margin-bottom: 0.5em; 13 | } 14 | #diff .ruleActions { 15 | border: 0; 16 | box-sizing: border-box; 17 | display: inline-block; 18 | padding: 0; 19 | text-align: center; 20 | vertical-align: top; 21 | width: 50%; 22 | } 23 | #diff .ruleActions > h3 { 24 | font-weight: normal; 25 | margin: 0 0 0.5em 0; 26 | } 27 | #diff .ruleActions > div { 28 | display: flex; 29 | justify-content: center; 30 | } 31 | #diff .ruleActions > div > button { 32 | margin-right: 1em; 33 | } 34 | #ruleFilter { 35 | align-items: center; 36 | direction: ltr; 37 | display: flex; 38 | justify-content: center; 39 | } 40 | #ruleFilter .fa-icon { 41 | color: #888; 42 | fill: #888; 43 | } 44 | 45 | body[dir="ltr"] #revertButton > span:nth-of-type(2), 46 | body[dir="rtl"] #commitButton > span:nth-of-type(1) { 47 | transform: scale(-1, 1); 48 | } 49 | #revertButton, 50 | #commitButton, 51 | #editSaveButton, 52 | #diff.editing #exportButton, 53 | #diff.editing #importButton { 54 | opacity: 0.25; 55 | pointer-events: none; 56 | } 57 | #diff.dirty:not(.editing) #revertButton, 58 | #diff.dirty:not(.editing) #commitButton, 59 | #diff.editing #editSaveButton { 60 | opacity: 1; 61 | pointer-events: auto; 62 | } 63 | 64 | .codeMirrorContainer { 65 | box-sizing: border-box; 66 | padding: 0; 67 | } 68 | .CodeMirror-merge, .CodeMirror-merge-pane, .CodeMirror-merge .CodeMirror { 69 | box-sizing: border-box; 70 | height: 100%; 71 | } 72 | #diff.editing .CodeMirror-merge-copy, 73 | #diff.editing .CodeMirror-merge-copy-reverse { 74 | display: none; 75 | } 76 | #diff.editing .CodeMirror-merge-left .CodeMirror { 77 | color: #888; 78 | } 79 | #diff.editing .CodeMirror-merge-editor .CodeMirror { 80 | background-color: #ffe; 81 | } 82 | body[dir="rtl"] .CodeMirror-merge-pane-rightmost { 83 | right: unset; 84 | left: 0; 85 | } 86 | -------------------------------------------------------------------------------- /src/dashboard.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 17 | 18 | 19 | 20 | 21 |
22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/hosts-files.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | nuTensor — Hosts files 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |

16 | 17 | 18 | 19 |

20 |
    21 |
  • 22 |
23 |
24 |
25 |
26 |

 info-circle

27 |

28 |
    29 |
  • 31 |
32 |
33 |
34 | 35 |
36 |
37 |
38 |

 info-circle

39 |
    40 |
  • 42 |
  • 44 |
45 |
46 |
47 | 48 | 65 | 66 |
67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /src/img/cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/src/img/cloud.png -------------------------------------------------------------------------------- /src/img/fontawesome/LICENSE.txt: -------------------------------------------------------------------------------- 1 | # [Font Awesome v4.7.0](http://fontawesome.io) 2 | ### The iconic font and CSS framework 3 | 4 | Font Awesome is a full suite of 675 pictographic icons for easy scalable vector graphics on websites, 5 | created and maintained by [Dave Gandy](https://twitter.com/davegandy). 6 | Stay up to date with the latest release and announcements on Twitter: 7 | [@fontawesome](http://twitter.com/fontawesome). 8 | 9 | Get started at http://fontawesome.io! 10 | 11 | ## License 12 | - The Font Awesome font is licensed under the SIL OFL 1.1: 13 | - http://scripts.sil.org/OFL 14 | - Font Awesome CSS, LESS, and Sass files are licensed under the MIT License: 15 | - https://opensource.org/licenses/mit-license.html 16 | - The Font Awesome documentation is licensed under the CC BY 3.0 License: 17 | - http://creativecommons.org/licenses/by/3.0/ 18 | - Attribution is no longer required as of Font Awesome 3.0, but much appreciated: 19 | - `Font Awesome by Dave Gandy - http://fontawesome.io` 20 | - Full details: http://fontawesome.io/license/ 21 | 22 | ## Author 23 | - Email: dave@fontawesome.io 24 | - Twitter: http://twitter.com/davegandy 25 | - GitHub: https://github.com/davegandy 26 | -------------------------------------------------------------------------------- /src/img/icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/src/img/icon_128.png -------------------------------------------------------------------------------- /src/img/icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/src/img/icon_16.png -------------------------------------------------------------------------------- /src/img/icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/src/img/icon_64.png -------------------------------------------------------------------------------- /src/img/matrix-group-hide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/src/img/matrix-group-hide.png -------------------------------------------------------------------------------- /src/img/matrix-group-hline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/src/img/matrix-group-hline.png -------------------------------------------------------------------------------- /src/img/matrix-group-show.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/src/img/matrix-group-show.png -------------------------------------------------------------------------------- /src/img/permanent-black-small-cb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/src/img/permanent-black-small-cb.png -------------------------------------------------------------------------------- /src/img/permanent-black-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/src/img/permanent-black-small.png -------------------------------------------------------------------------------- /src/img/permanent-white-small-cb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/src/img/permanent-white-small-cb.png -------------------------------------------------------------------------------- /src/img/permanent-white-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/src/img/permanent-white-small.png -------------------------------------------------------------------------------- /src/js/about.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | uMatrix - a Chromium browser extension to black/white list requests. 4 | Copyright (C) 2014-present Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uMatrix 20 | */ 21 | 22 | /* global uDom */ 23 | 24 | 'use strict'; 25 | 26 | /******************************************************************************/ 27 | 28 | { 29 | // >>>>> start of local scope 30 | 31 | /******************************************************************************/ 32 | 33 | const backupUserDataToFile = function() { 34 | vAPI.messaging.send('dashboard', { 35 | what: 'getAllUserData', 36 | }).then(userData => { 37 | vAPI.download({ 38 | url: 'data:text/plain,' + encodeURIComponent( 39 | JSON.stringify(userData, null, 2) 40 | ), 41 | filename: 42 | uDom.nodeFromSelector('[data-i18n="aboutBackupFilename"]') 43 | .textContent 44 | }); 45 | }); 46 | }; 47 | 48 | /******************************************************************************/ 49 | 50 | const restoreUserDataFromFile = function() { 51 | const validateBackup = function(s) { 52 | let userData; 53 | try { 54 | userData = JSON.parse(s); 55 | } 56 | catch (ex) { 57 | } 58 | if ( userData === undefined ) { return; } 59 | if ( 60 | typeof userData !== 'object' || 61 | typeof userData.app !== 'string' || 62 | typeof userData.version !== 'string' || 63 | typeof userData.when !== 'number' || 64 | typeof userData.settings !== 'object' || 65 | typeof userData.rules !== 'string' && 66 | Array.isArray(userData.rules) === false 67 | ) { 68 | return; 69 | } 70 | return userData; 71 | }; 72 | 73 | const fileReaderOnLoadHandler = function() { 74 | const userData = validateBackup(this.result); 75 | if ( userData instanceof Object === false ) { 76 | window.alert(uDom('[data-i18n="aboutRestoreError"]').text()); 77 | return; 78 | } 79 | const time = new Date(userData.when); 80 | const msg = uDom.nodeFromSelector('[data-i18n="aboutRestoreConfirm"]') 81 | .textContent 82 | .replace('{{time}}', time.toLocaleString()); 83 | const proceed = window.confirm(msg); 84 | if ( proceed ) { 85 | vAPI.messaging.send('dashboard', { 86 | what: 'restoreAllUserData', 87 | userData 88 | }); 89 | } 90 | }; 91 | 92 | const file = this.files[0]; 93 | if ( file === undefined || file.name === '' ) { return; } 94 | if ( file.type.indexOf('text') !== 0 ) { return; } 95 | const fr = new FileReader(); 96 | fr.onload = fileReaderOnLoadHandler; 97 | fr.readAsText(file); 98 | }; 99 | 100 | /******************************************************************************/ 101 | 102 | const startRestoreFilePicker = function() { 103 | const input = document.getElementById('restoreFilePicker'); 104 | // Reset to empty string, this will ensure an change event is properly 105 | // triggered if the user pick a file, even if it is the same as the last 106 | // one picked. 107 | input.value = ''; 108 | input.click(); 109 | }; 110 | 111 | /******************************************************************************/ 112 | 113 | const resetUserData = function() { 114 | const msg = uDom.nodeFromSelector('[data-i18n="aboutResetConfirm"]') 115 | .textContent; 116 | const proceed = window.confirm(msg); 117 | if ( proceed !== true ) { return; } 118 | vAPI.messaging.send('dashboard', { 119 | what: 'resetAllUserData', 120 | }); 121 | }; 122 | 123 | /******************************************************************************/ 124 | 125 | vAPI.messaging.send('dashboard', { 126 | what: 'getSomeStats', 127 | }).then(details => { 128 | document.getElementById('aboutVersion').textContent = details.version; 129 | const template = uDom('[data-i18n="aboutStorageUsed"]').text(); 130 | let storageUsed = '?'; 131 | if ( typeof details.storageUsed === 'number' ) { 132 | storageUsed = details.storageUsed.toLocaleString(); 133 | } 134 | document.getElementById('aboutStorageUsed').textContent = 135 | template.replace('{{storageUsed}}', storageUsed); 136 | }); 137 | 138 | /******************************************************************************/ 139 | 140 | uDom('#backupUserDataButton').on('click', backupUserDataToFile); 141 | uDom('#restoreUserDataButton').on('click', startRestoreFilePicker); 142 | uDom('#restoreFilePicker').on('change', restoreUserDataFromFile); 143 | uDom('#resetUserDataButton').on('click', resetUserData); 144 | 145 | /******************************************************************************/ 146 | 147 | // <<<<< end of local scope 148 | } 149 | -------------------------------------------------------------------------------- /src/js/asset-viewer.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | uBlock Origin - a browser extension to block requests. 4 | Copyright (C) 2014-present Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uBlock 20 | */ 21 | 22 | /* global CodeMirror, uBlockDashboard */ 23 | 24 | 'use strict'; 25 | 26 | /******************************************************************************/ 27 | 28 | (async ( ) => { 29 | const params = new URL(document.location).searchParams; 30 | const assetKey = params.get('url'); 31 | if ( assetKey === null ) { return; } 32 | 33 | const cmEditor = new CodeMirror( 34 | document.getElementById('content'), 35 | { 36 | autofocus: true, 37 | lineNumbers: true, 38 | lineWrapping: true, 39 | readOnly: true, 40 | styleActiveLine: true, 41 | } 42 | ); 43 | 44 | uBlockDashboard.patchCodeMirrorEditor(cmEditor); 45 | 46 | const details = await vAPI.messaging.send('default', { 47 | what : 'getAssetContent', 48 | url: assetKey, 49 | }); 50 | cmEditor.setValue(details && details.content || ''); 51 | if ( details.sourceURL ) { 52 | const a = document.querySelector('.cm-search-widget .sourceURL'); 53 | a.setAttribute('href', details.sourceURL); 54 | a.setAttribute('title', details.sourceURL); 55 | } 56 | })(); 57 | -------------------------------------------------------------------------------- /src/js/browsercache.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | uMatrix - a browser extension to black/white list requests. 4 | Copyright (C) 2015-present Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uMatrix 20 | */ 21 | 22 | 'use strict'; 23 | 24 | /******************************************************************************/ 25 | 26 | { 27 | // >>>>> start of local scope 28 | 29 | /******************************************************************************/ 30 | 31 | // Browser data jobs 32 | 33 | const clearCache = function() { 34 | vAPI.setTimeout(clearCache, 15 * 60 * 1000); 35 | 36 | const µm = µMatrix; 37 | if ( µm.userSettings.clearBrowserCache !== true ) { return; } 38 | 39 | µm.clearBrowserCacheCycle -= 15; 40 | if ( µm.clearBrowserCacheCycle > 0 ) { return; } 41 | 42 | vAPI.browserData.clearCache(); 43 | 44 | µm.clearBrowserCacheCycle = µm.userSettings.clearBrowserCacheAfter; 45 | µm.browserCacheClearedCounter++; 46 | 47 | // TODO: i18n 48 | µm.logger.writeOne({ 49 | realm: 'message', 50 | text: vAPI.i18n('loggerEntryBrowserCacheCleared'), 51 | }); 52 | }; 53 | 54 | vAPI.setTimeout(clearCache, 15 * 60 * 1000); 55 | 56 | /******************************************************************************/ 57 | 58 | // <<<<< end of local scope 59 | } 60 | 61 | /******************************************************************************/ 62 | -------------------------------------------------------------------------------- /src/js/codemirror/mode/raw-settings.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | uBlock Origin - a browser extension to block requests. 4 | Copyright (C) 2019-present Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uBlock 20 | */ 21 | 22 | /* global CodeMirror */ 23 | 24 | 'use strict'; 25 | 26 | CodeMirror.defineMode('raw-settings', function() { 27 | return { 28 | token: function(stream) { 29 | if ( stream.sol() ) { 30 | stream.match(/\s*\S+/); 31 | return 'keyword'; 32 | } 33 | stream.skipToEnd(); 34 | return null; 35 | } 36 | }; 37 | }); 38 | -------------------------------------------------------------------------------- /src/js/console.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | uMatrix - a browser extension to block requests. 4 | Copyright (C) 2019-present Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uBlock 20 | */ 21 | 22 | 'use strict'; 23 | 24 | self.log = (function() { 25 | const noopFunc = function() {}; 26 | const info = function(s) { console.log(`[uMatrix] ${s}`); }; 27 | return { 28 | get verbosity( ) { return; }, 29 | set verbosity(level) { 30 | this.info = console.info = level === 'info' ? info : noopFunc; 31 | }, 32 | info: noopFunc, 33 | }; 34 | })(); 35 | -------------------------------------------------------------------------------- /src/js/contentscript-no-inline-script.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | uMatrix - a Chromium browser extension to black/white list requests. 4 | Copyright (C) 2018 Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uMatrix 20 | */ 21 | 22 | 'use strict'; 23 | 24 | // The idea of using to enforce CSP directive has been 25 | // borrowed from NoScript: 26 | // https://github.com/hackademix/noscript/commit/6e80d3f130773fc9a9123c5c4c2e97d63e90fa2a 27 | 28 | (function() { 29 | const html = document.documentElement; 30 | if ( html instanceof HTMLElement === false ) { return; } 31 | 32 | let meta; 33 | try { 34 | meta = document.createElement('meta'); 35 | } catch(ex) { 36 | } 37 | if ( meta === undefined ) { return; } 38 | meta.setAttribute('http-equiv', 'content-security-policy'); 39 | meta.setAttribute('content', "script-src 'unsafe-eval' blob: *"); 40 | 41 | // https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-content-security-policy 42 | // 43 | // Only a head element can be parent: 44 | // > If the meta element is not a child of a head element, return. 45 | // 46 | // The CSP directive is enforced as soon as the meta tag is inserted: 47 | // > Enforce the policy policy. 48 | const head = document.head; 49 | let parent = head; 50 | if ( parent === null ) { 51 | parent = document.createElement('head'); 52 | html.appendChild(parent); 53 | } 54 | parent.appendChild(meta); 55 | 56 | // Restore DOM to its original state. 57 | if ( head === null ) { 58 | html.removeChild(parent); 59 | } else { 60 | parent.removeChild(meta); 61 | } 62 | })(); 63 | -------------------------------------------------------------------------------- /src/js/contentscript-no-workers.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | uMatrix - a Chromium browser extension to black/white list requests. 4 | Copyright (C) 2018 Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uMatrix 20 | */ 21 | 22 | 'use strict'; 23 | 24 | // The idea of using to enforce CSP directive has been 25 | // borrowed from NoScript: 26 | // https://github.com/hackademix/noscript/commit/6e80d3f130773fc9a9123c5c4c2e97d63e90fa2a 27 | 28 | (( ) => { 29 | const html = document.documentElement; 30 | if ( html instanceof HTMLElement === false ) { return; } 31 | 32 | let meta; 33 | try { 34 | meta = document.createElement('meta'); 35 | } catch(ex) { 36 | } 37 | if ( meta === undefined ) { return; } 38 | meta.setAttribute('http-equiv', 'content-security-policy'); 39 | meta.setAttribute('content', "worker-src 'none'"); 40 | 41 | // https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-content-security-policy 42 | // 43 | // Only a head element can be parent: 44 | // > If the meta element is not a child of a head element, return. 45 | // 46 | // The CSP directive is enforced as soon as the meta tag is inserted: 47 | // > Enforce the policy policy. 48 | const head = document.head; 49 | let parent = head; 50 | if ( parent === null ) { 51 | parent = document.createElement('head'); 52 | html.appendChild(parent); 53 | } 54 | parent.appendChild(meta); 55 | 56 | // Restore DOM to its original state. 57 | if ( head === null ) { 58 | html.removeChild(parent); 59 | } else { 60 | parent.removeChild(meta); 61 | } 62 | })(); 63 | -------------------------------------------------------------------------------- /src/js/contentscript-start.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | uMatrix - a browser extension to black/white list requests. 4 | Copyright (C) 2017-present Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uMatrix 20 | */ 21 | 22 | 'use strict'; 23 | 24 | /******************************************************************************/ 25 | /******************************************************************************/ 26 | 27 | // Injected into content pages 28 | 29 | (( ) => { 30 | 31 | if ( typeof vAPI !== 'object' ) { return; } 32 | 33 | vAPI.selfWorkerSrcReported = vAPI.selfWorkerSrcReported || false; 34 | 35 | const reGoodWorkerSrc = /(?:child|worker)-src[^;,]+?'none'/; 36 | 37 | const handler = function(ev) { 38 | if ( 39 | ev.isTrusted !== true || 40 | ev.originalPolicy.includes('report-uri about:blank') === false 41 | ) { 42 | return false; 43 | } 44 | 45 | // Firefox and Chromium differs in how they fill the 46 | // 'effectiveDirective' property. 47 | if ( 48 | ev.effectiveDirective.startsWith('worker-src') === false && 49 | ev.effectiveDirective.startsWith('child-src') === false 50 | ) { 51 | return false; 52 | } 53 | 54 | // Further validate that the policy violation is relevant to uMatrix: 55 | // the event still could have been fired as a result of a CSP header 56 | // not injected by uMatrix. 57 | if ( reGoodWorkerSrc.test(ev.originalPolicy) === false ) { 58 | return false; 59 | } 60 | 61 | // We do not want to report internal resources more than once. 62 | // However, we do want to report external resources each time. 63 | // TODO: this could eventually lead to duplicated reports for external 64 | // resources if another extension uses the same approach as 65 | // uMatrix. Think about what could be done to avoid duplicate 66 | // reports. 67 | if ( ev.blockedURI.includes('://') === false ) { 68 | if ( vAPI.selfWorkerSrcReported ) { return true; } 69 | vAPI.selfWorkerSrcReported = true; 70 | } 71 | 72 | vAPI.messaging.send('contentscript.js', { 73 | what: 'securityPolicyViolation', 74 | directive: 'worker-src', 75 | blockedURI: ev.blockedURI, 76 | documentURI: ev.documentURI, 77 | blocked: ev.disposition === 'enforce', 78 | }); 79 | 80 | return true; 81 | }; 82 | 83 | document.addEventListener('securitypolicyviolation', ev => { 84 | if ( !handler(ev) ) { return; } 85 | ev.stopPropagation(); 86 | ev.preventDefault(); 87 | }, true); 88 | 89 | })(); 90 | -------------------------------------------------------------------------------- /src/js/dashboard-common.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | µMatrix - a Chromium browser extension to black/white list requests. 4 | Copyright (C) 2014 Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uMatrix 20 | */ 21 | 22 | /* global CodeMirror, uDom */ 23 | 24 | 'use strict'; 25 | 26 | /******************************************************************************/ 27 | 28 | { 29 | // >>>>> start of local scope 30 | 31 | /******************************************************************************/ 32 | 33 | self.uBlockDashboard = self.uBlockDashboard || {}; 34 | 35 | /******************************************************************************/ 36 | 37 | { 38 | let grabFocusTimer; 39 | let grabFocusTarget; 40 | 41 | const grabFocus = function() { 42 | grabFocusTarget.focus(); 43 | grabFocusTimer = grabFocusTarget = undefined; 44 | }; 45 | const grabFocusAsync = function(cm) { 46 | grabFocusTarget = cm; 47 | if ( grabFocusTimer === undefined ) { 48 | grabFocusTimer = vAPI.setTimeout(grabFocus, 1); 49 | } 50 | }; 51 | 52 | // https://github.com/gorhill/uBlock/issues/3646 53 | const patchSelectAll = function(cm, details) { 54 | var vp = cm.getViewport(); 55 | if ( details.ranges.length !== 1 ) { return; } 56 | var range = details.ranges[0], 57 | lineFrom = range.anchor.line, 58 | lineTo = range.head.line; 59 | if ( lineTo === lineFrom ) { return; } 60 | if ( range.head.ch !== 0 ) { lineTo += 1; } 61 | if ( lineFrom !== vp.from || lineTo !== vp.to ) { return; } 62 | details.update([ 63 | { 64 | anchor: { line: 0, ch: 0 }, 65 | head: { line: cm.lineCount(), ch: 0 } 66 | } 67 | ]); 68 | grabFocusAsync(cm); 69 | }; 70 | 71 | let lastGutterClick = 0; 72 | let lastGutterLine = 0; 73 | 74 | const onGutterClicked = function(cm, line) { 75 | const delta = Date.now() - lastGutterClick; 76 | if ( delta >= 500 || line !== lastGutterLine ) { 77 | cm.setSelection( 78 | { line: line, ch: 0 }, 79 | { line: line + 1, ch: 0 } 80 | ); 81 | lastGutterClick = Date.now(); 82 | lastGutterLine = line; 83 | } else { 84 | cm.setSelection( 85 | { line: 0, ch: 0 }, 86 | { line: cm.lineCount(), ch: 0 }, 87 | { scroll: false } 88 | ); 89 | lastGutterClick = 0; 90 | } 91 | grabFocusAsync(cm); 92 | }; 93 | 94 | let resizeTimer, 95 | resizeObserver; 96 | const resize = function(cm) { 97 | resizeTimer = undefined; 98 | const child = document.querySelector('.codeMirrorFillVertical'); 99 | if ( child === null ) { return; } 100 | const prect = document.documentElement.getBoundingClientRect(); 101 | const crect = child.getBoundingClientRect(); 102 | const cssHeight = Math.floor(Math.max(prect.bottom - crect.top, 80)) + 'px'; 103 | if ( child.style.height === cssHeight ) { return; } 104 | child.style.height = cssHeight; 105 | // https://github.com/gorhill/uBlock/issues/3694 106 | // Need to call cm.refresh() when resizing occurs. However the 107 | // cursor position may end up outside the viewport, hence we also 108 | // call cm.scrollIntoView() to address this. 109 | // Reference: https://codemirror.net/doc/manual.html#api_sizing 110 | if ( cm instanceof CodeMirror ) { 111 | cm.refresh(); 112 | cm.scrollIntoView(null); 113 | } 114 | }; 115 | const resizeAsync = function(cm, delay) { 116 | if ( resizeTimer !== undefined ) { return; } 117 | resizeTimer = vAPI.setTimeout( 118 | resize.bind(null, cm), 119 | typeof delay === 'number' ? delay : 66 120 | ); 121 | }; 122 | 123 | self.uBlockDashboard.patchCodeMirrorEditor = function(cm) { 124 | if ( document.querySelector('.codeMirrorFillVertical') !== null ) { 125 | const boundResizeAsync = resizeAsync.bind(null, cm); 126 | window.addEventListener('resize', boundResizeAsync); 127 | resizeObserver = new MutationObserver(boundResizeAsync); 128 | resizeObserver.observe(document.querySelector('.body'), { 129 | childList: true, 130 | subtree: true 131 | }); 132 | resizeAsync(cm, 1); 133 | } 134 | if ( cm.options.inputStyle === 'contenteditable' ) { 135 | cm.on('beforeSelectionChange', patchSelectAll); 136 | } 137 | cm.on('gutterClick', onGutterClicked); 138 | }; 139 | } 140 | 141 | uDom('a').attr('target', '_blank'); 142 | uDom('a[href*="dashboard.html"]').attr('target', '_parent'); 143 | uDom('.whatisthis').on('click', ev => { 144 | ev.target 145 | .parentElement 146 | .querySelector('.whatisthis-expandable') 147 | .classList.toggle('whatisthis-expanded'); 148 | }); 149 | 150 | // <<<<< end of local scope 151 | } 152 | -------------------------------------------------------------------------------- /src/js/dashboard.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | uMatrix - a browser extension to black/white list requests. 4 | Copyright (C) 2014-2018 Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uMatrix 20 | */ 21 | 22 | /* global uDom */ 23 | 24 | 'use strict'; 25 | 26 | { 27 | // >>>>> start of local scope 28 | 29 | /******************************************************************************/ 30 | 31 | const loadDashboardPanel = function(hash) { 32 | const button = uDom(hash); 33 | const url = button.attr('data-dashboard-panel-url'); 34 | uDom('iframe').attr('src', url); 35 | uDom('.tabButton').forEach(function(button){ 36 | button.toggleClass( 37 | 'selected', 38 | button.attr('data-dashboard-panel-url') === url 39 | ); 40 | }); 41 | }; 42 | 43 | const onTabClickHandler = function() { 44 | loadDashboardPanel(window.location.hash); 45 | }; 46 | 47 | uDom.onLoad(function() { 48 | window.addEventListener('hashchange', onTabClickHandler); 49 | let hash = window.location.hash; 50 | if ( hash.length < 2 ) { 51 | hash = '#settings'; 52 | } 53 | loadDashboardPanel(hash); 54 | }); 55 | 56 | /******************************************************************************/ 57 | 58 | // <<<<< end of local scope 59 | } 60 | -------------------------------------------------------------------------------- /src/js/fa-icons.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | uMatrix - a browser extension to black/white list requests. 4 | Copyright (C) 2018-present Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uMatrix 20 | */ 21 | 22 | 'use strict'; 23 | 24 | /******************************************************************************/ 25 | 26 | const faIconsInit = function(root) { 27 | const icons = (root || document).querySelectorAll('.fa-icon'); 28 | for ( const icon of icons ) { 29 | if ( 30 | icon.firstChild === null || 31 | icon.firstChild.nodeType !== 3 32 | ) { 33 | continue; 34 | } 35 | const name = icon.firstChild.nodeValue; 36 | const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); 37 | svg.classList.add('fa-icon_' + name); 38 | const use = document.createElementNS('http://www.w3.org/2000/svg', 'use'); 39 | const href = '/img/fontawesome/fontawesome-defs.svg#' + name; 40 | use.setAttribute('href', href); 41 | use.setAttribute('xlink:href', href); 42 | svg.appendChild(use); 43 | icon.replaceChild(svg, icon.firstChild); 44 | if ( icon.classList.contains('fa-icon-badged') ) { 45 | const badge = document.createElement('span'); 46 | badge.className = 'fa-icon-badge'; 47 | icon.insertBefore(badge, icon.firstChild.nextSibling); 48 | } 49 | } 50 | }; 51 | 52 | faIconsInit(); 53 | -------------------------------------------------------------------------------- /src/js/httpsb.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | uMatrix - a Chromium browser extension to black/white list requests. 4 | Copyright (C) 2014-2016 Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uMatrix 20 | */ 21 | 22 | 'use strict'; 23 | 24 | /******************************************************************************/ 25 | 26 | { 27 | const µm = µMatrix; 28 | µm.pMatrix = new µm.Matrix(); 29 | µm.pMatrix.setSwitch('matrix-off', 'about-scheme', 1); 30 | µm.pMatrix.setSwitch('matrix-off', 'chrome-extension-scheme', 1); 31 | µm.pMatrix.setSwitch('matrix-off', 'chrome-scheme', 1); 32 | µm.pMatrix.setSwitch('matrix-off', 'moz-extension-scheme', 1); 33 | µm.pMatrix.setSwitch('matrix-off', 'opera-scheme', 1); 34 | µm.pMatrix.setSwitch('matrix-off', 'vivaldi-scheme', 1); 35 | // https://discourse.mozilla.org/t/support-umatrix/5131/157 36 | µm.pMatrix.setSwitch('matrix-off', 'wyciwyg-scheme', 1); 37 | µm.pMatrix.setSwitch('matrix-off', 'behind-the-scene', 1); 38 | µm.pMatrix.setSwitch('referrer-spoof', 'behind-the-scene', 2); 39 | µm.pMatrix.setSwitch('https-strict', 'behind-the-scene', 2); 40 | // Global rules 41 | µm.pMatrix.setSwitch('referrer-spoof', '*', 1); 42 | µm.pMatrix.setSwitch('noscript-spoof', '*', 1); 43 | µm.pMatrix.setSwitch('cname-reveal', '*', 1); 44 | µm.pMatrix.setCell('*', '*', '*', µm.Matrix.Red); 45 | µm.pMatrix.setCell('*', '*', 'css', µm.Matrix.Green); 46 | µm.pMatrix.setCell('*', '*', 'image', µm.Matrix.Green); 47 | µm.pMatrix.setCell('*', '*', 'frame', µm.Matrix.Red); 48 | // 1st-party rules 49 | µm.pMatrix.setCell('*', '1st-party', '*', µm.Matrix.Green); 50 | µm.pMatrix.setCell('*', '1st-party', 'frame', µm.Matrix.Green); 51 | 52 | µm.tMatrix = new µm.Matrix(); 53 | µm.tMatrix.assign(µm.pMatrix); 54 | } 55 | 56 | /******************************************************************************/ 57 | 58 | µMatrix.hostnameFromURL = function(url) { 59 | var hn = this.URI.hostnameFromURI(url); 60 | return hn === '' ? '*' : hn; 61 | }; 62 | 63 | /******************************************************************************/ 64 | 65 | µMatrix.mustBlock = function(srcHostname, desHostname, type) { 66 | return this.tMatrix.mustBlock(srcHostname, desHostname, type); 67 | }; 68 | 69 | µMatrix.mustAllow = function(srcHostname, desHostname, type) { 70 | return this.mustBlock(srcHostname, desHostname, type) === false; 71 | }; 72 | 73 | /******************************************************************************/ 74 | 75 | µMatrix.formatCount = function(count) { 76 | if ( typeof count !== 'number' ) { 77 | return ''; 78 | } 79 | var s = count.toFixed(0); 80 | if ( count >= 1000 ) { 81 | if ( count < 10000 ) { 82 | s = '>' + s.slice(0,1) + 'K'; 83 | } else if ( count < 100000 ) { 84 | s = s.slice(0,2) + 'K'; 85 | } else if ( count < 1000000 ) { 86 | s = s.slice(0,3) + 'K'; 87 | } else if ( count < 10000000 ) { 88 | s = s.slice(0,1) + 'M'; 89 | } else { 90 | s = s.slice(0,-6) + 'M'; 91 | } 92 | } 93 | return s; 94 | }; 95 | 96 | -------------------------------------------------------------------------------- /src/js/logger.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | uBlock Origin - a browser extension to block requests. 4 | Copyright (C) 2015-present Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uBlock 20 | */ 21 | 22 | 'use strict'; 23 | 24 | /******************************************************************************/ 25 | /******************************************************************************/ 26 | 27 | µMatrix.logger = (function() { 28 | 29 | let buffer = null; 30 | let lastReadTime = 0; 31 | let writePtr = 0; 32 | 33 | // After 60 seconds without being read, a buffer will be considered 34 | // unused, and thus removed from memory. 35 | const logBufferObsoleteAfter = 30 * 1000; 36 | 37 | const janitor = ( ) => { 38 | if ( 39 | buffer !== null && 40 | lastReadTime < (Date.now() - logBufferObsoleteAfter) 41 | ) { 42 | api.enabled = false; 43 | buffer = null; 44 | writePtr = 0; 45 | api.ownerId = undefined; 46 | vAPI.messaging.broadcast({ what: 'loggerDisabled' }); 47 | } 48 | if ( buffer !== null ) { 49 | vAPI.setTimeout(janitor, logBufferObsoleteAfter); 50 | } 51 | }; 52 | 53 | const boxEntry = function(details) { 54 | if ( details.tstamp === undefined ) { 55 | details.tstamp = Date.now(); 56 | } 57 | return JSON.stringify(details); 58 | }; 59 | 60 | const api = { 61 | enabled: false, 62 | ownerId: undefined, 63 | writeOne: function(details) { 64 | if ( buffer === null ) { return; } 65 | if ( writePtr === buffer.length ) { 66 | buffer.push(boxEntry(details)); 67 | } else { 68 | buffer[writePtr] = boxEntry(details); 69 | } 70 | writePtr += 1; 71 | }, 72 | readAll: function(ownerId) { 73 | this.ownerId = ownerId; 74 | if ( buffer === null ) { 75 | this.enabled = true; 76 | buffer = []; 77 | vAPI.setTimeout(janitor, logBufferObsoleteAfter); 78 | } 79 | const out = buffer.slice(0, writePtr); 80 | writePtr = 0; 81 | lastReadTime = Date.now(); 82 | return out; 83 | }, 84 | }; 85 | 86 | return api; 87 | 88 | })(); 89 | 90 | /******************************************************************************/ 91 | -------------------------------------------------------------------------------- /src/js/raw-settings.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | uMatrix - a browser extension to black/white list requests. 4 | Copyright (C) 2018-present Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uBlock 20 | */ 21 | 22 | /* global CodeMirror, uDom, uBlockDashboard */ 23 | 24 | 'use strict'; 25 | 26 | /******************************************************************************/ 27 | 28 | { 29 | // >>>>> start of local scope 30 | 31 | /******************************************************************************/ 32 | 33 | const cmEditor = new CodeMirror( 34 | document.getElementById('rawSettings'), 35 | { 36 | autofocus: true, 37 | lineNumbers: true, 38 | lineWrapping: true, 39 | styleActiveLine: true 40 | } 41 | ); 42 | 43 | uBlockDashboard.patchCodeMirrorEditor(cmEditor); 44 | 45 | let cachedData = ''; 46 | 47 | /******************************************************************************/ 48 | 49 | const hashFromRawSettings = function(raw) { 50 | return raw.trim().replace(/\s+/g, '|'); 51 | }; 52 | 53 | /******************************************************************************/ 54 | 55 | // This is to give a visual hint that the content of user blacklist has changed. 56 | 57 | const rawSettingsChanged = (( ) => { 58 | let timer; 59 | 60 | const handler = function() { 61 | timer = undefined; 62 | const changed = 63 | hashFromRawSettings(cmEditor.getValue()) !== cachedData; 64 | uDom.nodeFromId('rawSettingsApply').disabled = changed === false; 65 | CodeMirror.commands.save = changed ? applyChanges : function(){}; 66 | }; 67 | 68 | return function() { 69 | if ( timer !== undefined ) { 70 | clearTimeout(timer); 71 | } 72 | timer = vAPI.setTimeout(handler, 100); 73 | }; 74 | })(); 75 | 76 | cmEditor.on('changes', rawSettingsChanged); 77 | 78 | /******************************************************************************/ 79 | 80 | const renderRawSettings = async function(first) { 81 | const raw = await vAPI.messaging.send('dashboard', { 82 | what: 'readRawSettings' 83 | }); 84 | cachedData = hashFromRawSettings(raw); 85 | const lines = raw.split('\n'); 86 | const n = lines.length; 87 | let max = 0; 88 | for ( let i = 0; i < n; i++ ) { 89 | const pos = lines[i].indexOf(' '); 90 | if ( pos > max ) { max = pos; } 91 | } 92 | const pretty = []; 93 | for ( let i = 0; i < n; i++ ) { 94 | const pos = lines[i].indexOf(' '); 95 | pretty.push(' '.repeat(max - pos) + lines[i]); 96 | } 97 | pretty.push(''); 98 | cmEditor.setValue(pretty.join('\n')); 99 | if ( first ) { 100 | cmEditor.clearHistory(); 101 | } 102 | rawSettingsChanged(); 103 | cmEditor.focus(); 104 | }; 105 | 106 | /******************************************************************************/ 107 | 108 | const applyChanges = async function() { 109 | await vAPI.messaging.send('dashboard', { 110 | what: 'writeRawSettings', 111 | content: cmEditor.getValue(), 112 | }); 113 | renderRawSettings(); 114 | }; 115 | 116 | /******************************************************************************/ 117 | 118 | // Handle user interaction 119 | uDom('#rawSettings').on('input', rawSettingsChanged); 120 | uDom('#rawSettingsApply').on('click', applyChanges); 121 | 122 | renderRawSettings(true); 123 | 124 | /******************************************************************************/ 125 | 126 | // <<<<< end of local scope 127 | } 128 | -------------------------------------------------------------------------------- /src/js/scope-selector.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | uMatrix - a browser extension to black/white list requests. 4 | Copyright (C) 2018-present Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uMatrix 20 | */ 21 | 22 | /* exported uMatrixScopeWidget */ 23 | /* global punycode */ 24 | 25 | 'use strict'; 26 | 27 | /******************************************************************************/ 28 | /******************************************************************************/ 29 | 30 | let uMatrixScopeWidget = (function() { 31 | 32 | // Start of private namespace 33 | // >>>>>>>> 34 | 35 | /******************************************************************************/ 36 | 37 | let currentScope = ''; 38 | let listening = false; 39 | 40 | let fireChangeEvent = function() { 41 | document.body.setAttribute('data-scope', currentScope); 42 | let ev = new CustomEvent( 43 | 'uMatrixScopeWidgetChange', 44 | { 45 | detail: { scope: currentScope } 46 | } 47 | ); 48 | window.dispatchEvent(ev); 49 | }; 50 | 51 | let init = function(domain, hostname, scope, container) { 52 | if ( typeof domain !== 'string' ) { return; } 53 | 54 | currentScope = ''; 55 | 56 | // Reset widget 57 | if ( !container ) { 58 | container = document; 59 | } 60 | let specificScope = container.querySelector('#specificScope'); 61 | while ( specificScope.firstChild !== null ) { 62 | specificScope.removeChild(specificScope.firstChild); 63 | } 64 | 65 | // Fill in the scope menu entries 66 | let pos = domain.indexOf('.'); 67 | let tld, labels; 68 | if ( pos === -1 ) { 69 | tld = ''; 70 | labels = hostname; 71 | } else { 72 | tld = domain.slice(pos + 1); 73 | labels = hostname.slice(0, -tld.length); 74 | } 75 | let beg = 0; 76 | while ( beg < labels.length ) { 77 | pos = labels.indexOf('.', beg); 78 | if ( pos === -1 ) { 79 | pos = labels.length; 80 | } else { 81 | pos += 1; 82 | } 83 | let label = document.createElement('span'); 84 | label.appendChild( 85 | document.createTextNode(punycode.toUnicode(labels.slice(beg, pos))) 86 | ); 87 | let span = document.createElement('span'); 88 | span.setAttribute('data-scope', labels.slice(beg) + tld); 89 | span.appendChild(label); 90 | specificScope.appendChild(span); 91 | beg = pos; 92 | } 93 | if ( tld !== '' ) { 94 | let label = document.createElement('span'); 95 | label.appendChild(document.createTextNode(punycode.toUnicode(tld))); 96 | let span = document.createElement('span'); 97 | span.setAttribute('data-scope', tld); 98 | span.appendChild(label); 99 | specificScope.appendChild(span); 100 | } 101 | 102 | if ( listening === false ) { 103 | container.querySelector('#specificScope').addEventListener( 104 | 'click', 105 | ev => { update(ev.target.getAttribute('data-scope')); } 106 | ); 107 | container.querySelector('#globalScope').addEventListener( 108 | 'click', 109 | ( ) => { update('*'); } 110 | ); 111 | listening = true; 112 | } 113 | 114 | update(scope || hostname, container); 115 | }; 116 | 117 | let getScope = function() { 118 | return currentScope; 119 | }; 120 | 121 | let update = function(scope, container) { 122 | if ( scope === currentScope ) { return; } 123 | currentScope = scope; 124 | if ( !container ) { 125 | container = document; 126 | } 127 | let specificScope = container.querySelector('#specificScope'), 128 | isGlobal = scope === '*'; 129 | specificScope.classList.toggle('on', !isGlobal); 130 | container.querySelector('#globalScope').classList.toggle('on', isGlobal); 131 | for ( let node of specificScope.children ) { 132 | node.classList.toggle( 133 | 'on', 134 | !isGlobal && 135 | scope.endsWith(node.getAttribute('data-scope')) 136 | ); 137 | } 138 | fireChangeEvent(); 139 | }; 140 | 141 | return { init, getScope, update }; 142 | 143 | /******************************************************************************/ 144 | 145 | // <<<<<<<< 146 | // End of private namespace 147 | 148 | })(); 149 | 150 | /******************************************************************************/ 151 | /******************************************************************************/ 152 | 153 | -------------------------------------------------------------------------------- /src/js/start.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | uMatrix - a browser extension to black/white list requests. 4 | Copyright (C) 2014-present Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uMatrix 20 | */ 21 | 22 | 'use strict'; 23 | 24 | /******************************************************************************/ 25 | 26 | (async ( ) => { 27 | const µm = µMatrix; 28 | 29 | await Promise.all([ 30 | µm.loadRawSettings(), 31 | µm.loadUserSettings(), 32 | ]); 33 | log.info(`User settings ready ${Date.now()-vAPI.T0} ms after launch`); 34 | 35 | const cacheBackend = await µm.cacheStorage.select( 36 | µm.rawSettings.cacheStorageAPI 37 | ); 38 | log.info(`Backend storage for cache will be ${cacheBackend}`); 39 | 40 | const shouldWASM = 41 | vAPI.canWASM === true && 42 | µm.rawSettings.disableWebAssembly !== true; 43 | if ( shouldWASM ) { 44 | await Promise.all([ 45 | µm.HNTrieContainer.enableWASM(), 46 | self.publicSuffixList.enableWASM(), 47 | ]); 48 | log.info(`WASM modules ready ${Date.now()-vAPI.T0} ms after launch`); 49 | } 50 | 51 | await µm.loadPublicSuffixList(), 52 | log.info(`PSL ready ${Date.now()-vAPI.T0} ms after launch`); 53 | 54 | { 55 | let trieDetails; 56 | try { 57 | trieDetails = JSON.parse( 58 | vAPI.localStorage.getItem('ubiquitousBlacklist.trieDetails') 59 | ); 60 | } catch(ex) { 61 | } 62 | µm.ubiquitousBlacklist = new µm.HNTrieContainer(trieDetails); 63 | if ( shouldWASM ) { 64 | µm.ubiquitousBlacklist.initWASM(); 65 | } 66 | } 67 | log.info(`Ubiquitous block rules container ready ${Date.now()-vAPI.T0} ms after launch`); 68 | 69 | await Promise.all([ 70 | µm.loadMatrix(), 71 | µm.loadHostsFiles(), 72 | ]); 73 | log.info(`All rules ready ${Date.now()-vAPI.T0} ms after launch`); 74 | 75 | { 76 | const pageStore = 77 | µm.pageStoreFactory(µm.tabContextManager.mustLookup(vAPI.noTabId)); 78 | pageStore.title = vAPI.i18n('statsPageDetailedBehindTheScenePage'); 79 | µm.pageStores.set(vAPI.noTabId, pageStore); 80 | } 81 | 82 | const tabs = await vAPI.tabs.query({ url: '' }); 83 | if ( Array.isArray(tabs) ) { 84 | for ( const tab of tabs ) { 85 | µm.tabContextManager.push(tab.id, tab.url, 'newURL'); 86 | µm.bindTabToPageStats(tab.id); 87 | µm.setPageStoreTitle(tab.id, tab.title); 88 | } 89 | } 90 | log.info(`Tab stores ready ${Date.now()-vAPI.T0} ms after launch`); 91 | 92 | µm.webRequest.start(); 93 | 94 | µm.loadRecipes(); 95 | 96 | // https://github.com/uBlockOrigin/uMatrix-issues/issues/63 97 | // Ensure user settings are fully loaded before launching the 98 | // asset updater. 99 | µm.assets.addObserver(µm.assetObserver.bind(µm)); 100 | µm.scheduleAssetUpdater(µm.userSettings.autoUpdate ? 7 * 60 * 1000 : 0); 101 | })(); 102 | 103 | /******************************************************************************/ 104 | -------------------------------------------------------------------------------- /src/js/usersettings.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | uMatrix - a Chromium browser extension to black/white list requests. 4 | Copyright (C) 2014-2018 Raymond Hill 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see {http://www.gnu.org/licenses/}. 18 | 19 | Home: https://github.com/gorhill/uMatrix 20 | */ 21 | 22 | 'use strict'; 23 | 24 | /******************************************************************************/ 25 | 26 | µMatrix.changeUserSettings = function(name, value) { 27 | if ( typeof name !== 'string' || name === '' ) { 28 | return; 29 | } 30 | 31 | // Do not allow an unknown user setting to be created 32 | if ( this.userSettings[name] === undefined ) { 33 | return; 34 | } 35 | 36 | if ( value === undefined ) { 37 | return this.userSettings[name]; 38 | } 39 | 40 | // Pre-change 41 | switch ( name ) { 42 | 43 | default: 44 | break; 45 | } 46 | 47 | // Change 48 | this.userSettings[name] = value; 49 | 50 | // Post-change 51 | switch ( name ) { 52 | case 'autoUpdate': 53 | this.scheduleAssetUpdater(value === true ? 120000 : 0); 54 | break; 55 | default: 56 | break; 57 | } 58 | 59 | this.saveUserSettings(); 60 | }; 61 | -------------------------------------------------------------------------------- /src/js/wasm/README.md: -------------------------------------------------------------------------------- 1 | ### For code reviewers 2 | 3 | All `wasm` files in that directory where created by compiling the 4 | corresponding `wat` file using the command (using `hntrie.wat`/`hntrie.wasm` 5 | as example): 6 | 7 | wat2wasm hntrie.wat -o hntrie.wasm 8 | 9 | Assuming: 10 | 11 | - The command is executed from within the present directory. 12 | 13 | ### `wat2wasm` tool 14 | 15 | The `wat2wasm` tool can be downloaded from an official WebAssembly project: 16 | . 17 | 18 | ### `wat2wasm` tool online 19 | 20 | You can also use the following online `wat2wasm` tool: 21 | . 22 | 23 | Just paste the whole content of the `wat` file to compile into the WAT pane. 24 | Click "Download" button to retrieve the resulting `wasm` file. -------------------------------------------------------------------------------- /src/js/wasm/hntrie.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/src/js/wasm/hntrie.wasm -------------------------------------------------------------------------------- /src/lib/codemirror/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (C) 2017 by Marijn Haverbeke and others 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/lib/codemirror/README.md: -------------------------------------------------------------------------------- 1 | # CodeMirror 2 | 3 | [![Build Status](https://travis-ci.org/codemirror/CodeMirror.svg)](https://travis-ci.org/codemirror/CodeMirror) 4 | [![NPM version](https://img.shields.io/npm/v/codemirror.svg)](https://www.npmjs.org/package/codemirror) 5 | [![Join the chat at https://gitter.im/codemirror/CodeMirror](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/codemirror/CodeMirror) 6 | [Funding status: ![maintainer happiness](https://marijnhaverbeke.nl/fund/status_s.png?again)](https://marijnhaverbeke.nl/fund/) 7 | 8 | CodeMirror is a versatile text editor implemented in JavaScript for 9 | the browser. It is specialized for editing code, and comes with over 10 | 100 language modes and various addons that implement more advanced 11 | editing functionality. Every language comes with fully-featured code 12 | and syntax highlighting to help with reading and editing complex code. 13 | 14 | A rich programming API and a CSS theming system are available for 15 | customizing CodeMirror to fit your application, and extending it with 16 | new functionality. 17 | 18 | You can find more information (and the 19 | [manual](https://codemirror.net/doc/manual.html)) on the [project 20 | page](https://codemirror.net). For questions and discussion, use the 21 | [discussion forum](https://discuss.codemirror.net/). 22 | 23 | See 24 | [CONTRIBUTING.md](https://github.com/codemirror/CodeMirror/blob/master/CONTRIBUTING.md) 25 | for contributing guidelines. 26 | 27 | The CodeMirror community aims to be welcoming to everybody. We use the 28 | [Contributor Covenant 29 | (1.1)](http://contributor-covenant.org/version/1/1/0/) as our code of 30 | conduct. 31 | 32 | ### Installation 33 | 34 | Either get the [zip file](https://codemirror.net/codemirror.zip) with 35 | the latest version, or make sure you have [Node](https://nodejs.org/) 36 | installed and run: 37 | 38 | npm install codemirror 39 | 40 | **NOTE**: This is the source repository for the library, and not the 41 | distribution channel. Cloning it is not the recommended way to install 42 | the library, and will in fact not work unless you also run the build 43 | step. 44 | 45 | ### Quickstart 46 | 47 | To build the project, make sure you have Node.js installed (at least version 6) 48 | and then `npm install`. To run, just open `index.html` in your 49 | browser (you don't need to run a webserver). Run the tests with `npm test`. 50 | -------------------------------------------------------------------------------- /src/lib/codemirror/addon/display/panel.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: https://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | CodeMirror.defineExtension("addPanel", function(node, options) { 13 | options = options || {}; 14 | 15 | if (!this.state.panels) initPanels(this); 16 | 17 | var info = this.state.panels; 18 | var wrapper = info.wrapper; 19 | var cmWrapper = this.getWrapperElement(); 20 | var replace = options.replace instanceof Panel && !options.replace.cleared; 21 | 22 | if (options.after instanceof Panel && !options.after.cleared) { 23 | wrapper.insertBefore(node, options.before.node.nextSibling); 24 | } else if (options.before instanceof Panel && !options.before.cleared) { 25 | wrapper.insertBefore(node, options.before.node); 26 | } else if (replace) { 27 | wrapper.insertBefore(node, options.replace.node); 28 | info.panels++; 29 | options.replace.clear(); 30 | } else if (options.position == "bottom") { 31 | wrapper.appendChild(node); 32 | } else if (options.position == "before-bottom") { 33 | wrapper.insertBefore(node, cmWrapper.nextSibling); 34 | } else if (options.position == "after-top") { 35 | wrapper.insertBefore(node, cmWrapper); 36 | } else { 37 | wrapper.insertBefore(node, wrapper.firstChild); 38 | } 39 | 40 | var height = (options && options.height) || node.offsetHeight; 41 | this._setSize(null, info.heightLeft -= height); 42 | if (!replace) { 43 | info.panels++; 44 | } 45 | if (options.stable && isAtTop(this, node)) 46 | this.scrollTo(null, this.getScrollInfo().top + height) 47 | 48 | return new Panel(this, node, options, height); 49 | }); 50 | 51 | function Panel(cm, node, options, height) { 52 | this.cm = cm; 53 | this.node = node; 54 | this.options = options; 55 | this.height = height; 56 | this.cleared = false; 57 | } 58 | 59 | Panel.prototype.clear = function() { 60 | if (this.cleared) return; 61 | this.cleared = true; 62 | var info = this.cm.state.panels; 63 | this.cm._setSize(null, info.heightLeft += this.height); 64 | if (this.options.stable && isAtTop(this.cm, this.node)) 65 | this.cm.scrollTo(null, this.cm.getScrollInfo().top - this.height) 66 | info.wrapper.removeChild(this.node); 67 | if (--info.panels == 0) removePanels(this.cm); 68 | }; 69 | 70 | Panel.prototype.changed = function(height) { 71 | var newHeight = height == null ? this.node.offsetHeight : height; 72 | var info = this.cm.state.panels; 73 | this.cm._setSize(null, info.heightLeft -= (newHeight - this.height)); 74 | this.height = newHeight; 75 | }; 76 | 77 | function initPanels(cm) { 78 | var wrap = cm.getWrapperElement(); 79 | var style = window.getComputedStyle ? window.getComputedStyle(wrap) : wrap.currentStyle; 80 | var height = parseInt(style.height); 81 | var info = cm.state.panels = { 82 | setHeight: wrap.style.height, 83 | heightLeft: height, 84 | panels: 0, 85 | wrapper: document.createElement("div") 86 | }; 87 | wrap.parentNode.insertBefore(info.wrapper, wrap); 88 | var hasFocus = cm.hasFocus(); 89 | info.wrapper.appendChild(wrap); 90 | if (hasFocus) cm.focus(); 91 | 92 | cm._setSize = cm.setSize; 93 | if (height != null) cm.setSize = function(width, newHeight) { 94 | if (newHeight == null) return this._setSize(width, newHeight); 95 | info.setHeight = newHeight; 96 | if (typeof newHeight != "number") { 97 | var px = /^(\d+\.?\d*)px$/.exec(newHeight); 98 | if (px) { 99 | newHeight = Number(px[1]); 100 | } else { 101 | info.wrapper.style.height = newHeight; 102 | newHeight = info.wrapper.offsetHeight; 103 | info.wrapper.style.height = ""; 104 | } 105 | } 106 | cm._setSize(width, info.heightLeft += (newHeight - height)); 107 | height = newHeight; 108 | }; 109 | } 110 | 111 | function removePanels(cm) { 112 | var info = cm.state.panels; 113 | cm.state.panels = null; 114 | 115 | var wrap = cm.getWrapperElement(); 116 | info.wrapper.parentNode.replaceChild(wrap, info.wrapper); 117 | wrap.style.height = info.setHeight; 118 | cm.setSize = cm._setSize; 119 | cm.setSize(); 120 | } 121 | 122 | function isAtTop(cm, dom) { 123 | for (var sibling = dom.nextSibling; sibling; sibling = sibling.nextSibling) 124 | if (sibling == cm.getWrapperElement()) return true 125 | return false 126 | } 127 | }); 128 | -------------------------------------------------------------------------------- /src/lib/codemirror/addon/merge/merge.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-merge { 2 | position: relative; 3 | border: 1px solid #ddd; 4 | white-space: pre; 5 | } 6 | 7 | .CodeMirror-merge, .CodeMirror-merge .CodeMirror { 8 | height: 350px; 9 | } 10 | 11 | .CodeMirror-merge-2pane .CodeMirror-merge-pane { width: 47%; } 12 | .CodeMirror-merge-2pane .CodeMirror-merge-gap { width: 6%; } 13 | .CodeMirror-merge-3pane .CodeMirror-merge-pane { width: 31%; } 14 | .CodeMirror-merge-3pane .CodeMirror-merge-gap { width: 3.5%; } 15 | 16 | .CodeMirror-merge-pane { 17 | display: inline-block; 18 | white-space: normal; 19 | vertical-align: top; 20 | } 21 | .CodeMirror-merge-pane-rightmost { 22 | position: absolute; 23 | right: 0px; 24 | z-index: 1; 25 | } 26 | 27 | .CodeMirror-merge-gap { 28 | z-index: 2; 29 | display: inline-block; 30 | height: 100%; 31 | -moz-box-sizing: border-box; 32 | box-sizing: border-box; 33 | overflow: hidden; 34 | border-left: 1px solid #ddd; 35 | border-right: 1px solid #ddd; 36 | position: relative; 37 | background: #f8f8f8; 38 | } 39 | 40 | .CodeMirror-merge-scrolllock-wrap { 41 | position: absolute; 42 | bottom: 0; left: 50%; 43 | } 44 | .CodeMirror-merge-scrolllock { 45 | position: relative; 46 | left: -50%; 47 | cursor: pointer; 48 | color: #555; 49 | line-height: 1; 50 | } 51 | .CodeMirror-merge-scrolllock:after { 52 | content: "\21db\00a0\00a0\21da"; 53 | } 54 | .CodeMirror-merge-scrolllock.CodeMirror-merge-scrolllock-enabled:after { 55 | content: "\21db\21da"; 56 | } 57 | 58 | .CodeMirror-merge-copybuttons-left, .CodeMirror-merge-copybuttons-right { 59 | position: absolute; 60 | left: 0; top: 0; 61 | right: 0; bottom: 0; 62 | line-height: 1; 63 | } 64 | 65 | .CodeMirror-merge-copy { 66 | position: absolute; 67 | cursor: pointer; 68 | color: #44c; 69 | z-index: 3; 70 | } 71 | 72 | .CodeMirror-merge-copy-reverse { 73 | position: absolute; 74 | cursor: pointer; 75 | color: #44c; 76 | } 77 | 78 | .CodeMirror-merge-copybuttons-left .CodeMirror-merge-copy { left: 2px; } 79 | .CodeMirror-merge-copybuttons-right .CodeMirror-merge-copy { right: 2px; } 80 | 81 | .CodeMirror-merge-r-inserted, .CodeMirror-merge-l-inserted { 82 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12MwuCXy3+CWyH8GBgYGJgYkAABZbAQ9ELXurwAAAABJRU5ErkJggg==); 83 | background-position: bottom left; 84 | background-repeat: repeat-x; 85 | } 86 | 87 | .CodeMirror-merge-r-deleted, .CodeMirror-merge-l-deleted { 88 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12M4Kyb2/6yY2H8GBgYGJgYkAABURgPz6Ks7wQAAAABJRU5ErkJggg==); 89 | background-position: bottom left; 90 | background-repeat: repeat-x; 91 | } 92 | 93 | .CodeMirror-merge-r-chunk { background: #ffffe0; } 94 | .CodeMirror-merge-r-chunk-start { border-top: 1px solid #ee8; } 95 | .CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #ee8; } 96 | .CodeMirror-merge-r-connect { fill: #ffffe0; stroke: #ee8; stroke-width: 1px; } 97 | 98 | .CodeMirror-merge-l-chunk { background: #eef; } 99 | .CodeMirror-merge-l-chunk-start { border-top: 1px solid #88e; } 100 | .CodeMirror-merge-l-chunk-end { border-bottom: 1px solid #88e; } 101 | .CodeMirror-merge-l-connect { fill: #eef; stroke: #88e; stroke-width: 1px; } 102 | 103 | .CodeMirror-merge-l-chunk.CodeMirror-merge-r-chunk { background: #dfd; } 104 | .CodeMirror-merge-l-chunk-start.CodeMirror-merge-r-chunk-start { border-top: 1px solid #4e4; } 105 | .CodeMirror-merge-l-chunk-end.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #4e4; } 106 | 107 | .CodeMirror-merge-collapsed-widget:before { 108 | content: "(...)"; 109 | } 110 | .CodeMirror-merge-collapsed-widget { 111 | cursor: pointer; 112 | color: #88b; 113 | background: #eef; 114 | border: 1px solid #ddf; 115 | font-size: 90%; 116 | padding: 0 3px; 117 | border-radius: 4px; 118 | } 119 | .CodeMirror-merge-collapsed-line .CodeMirror-gutter-elt { display: none; } 120 | -------------------------------------------------------------------------------- /src/lib/codemirror/addon/scroll/annotatescrollbar.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: https://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.defineExtension("annotateScrollbar", function(options) { 15 | if (typeof options == "string") options = {className: options}; 16 | return new Annotation(this, options); 17 | }); 18 | 19 | CodeMirror.defineOption("scrollButtonHeight", 0); 20 | 21 | function Annotation(cm, options) { 22 | this.cm = cm; 23 | this.options = options; 24 | this.buttonHeight = options.scrollButtonHeight || cm.getOption("scrollButtonHeight"); 25 | this.annotations = []; 26 | this.doRedraw = this.doUpdate = null; 27 | this.div = cm.getWrapperElement().appendChild(document.createElement("div")); 28 | this.div.style.cssText = "position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none"; 29 | this.computeScale(); 30 | 31 | function scheduleRedraw(delay) { 32 | clearTimeout(self.doRedraw); 33 | self.doRedraw = setTimeout(function() { self.redraw(); }, delay); 34 | } 35 | 36 | var self = this; 37 | cm.on("refresh", this.resizeHandler = function() { 38 | clearTimeout(self.doUpdate); 39 | self.doUpdate = setTimeout(function() { 40 | if (self.computeScale()) scheduleRedraw(20); 41 | }, 100); 42 | }); 43 | cm.on("markerAdded", this.resizeHandler); 44 | cm.on("markerCleared", this.resizeHandler); 45 | if (options.listenForChanges !== false) 46 | cm.on("change", this.changeHandler = function() { 47 | scheduleRedraw(250); 48 | }); 49 | } 50 | 51 | Annotation.prototype.computeScale = function() { 52 | var cm = this.cm; 53 | var hScale = (cm.getWrapperElement().clientHeight - cm.display.barHeight - this.buttonHeight * 2) / 54 | cm.getScrollerElement().scrollHeight 55 | if (hScale != this.hScale) { 56 | this.hScale = hScale; 57 | return true; 58 | } 59 | }; 60 | 61 | Annotation.prototype.update = function(annotations) { 62 | this.annotations = annotations; 63 | this.redraw(); 64 | }; 65 | 66 | Annotation.prototype.redraw = function(compute) { 67 | if (compute !== false) this.computeScale(); 68 | var cm = this.cm, hScale = this.hScale; 69 | 70 | var frag = document.createDocumentFragment(), anns = this.annotations; 71 | 72 | var wrapping = cm.getOption("lineWrapping"); 73 | var singleLineH = wrapping && cm.defaultTextHeight() * 1.5; 74 | var curLine = null, curLineObj = null; 75 | function getY(pos, top) { 76 | if (curLine != pos.line) { 77 | curLine = pos.line; 78 | curLineObj = cm.getLineHandle(curLine); 79 | } 80 | if ((curLineObj.widgets && curLineObj.widgets.length) || 81 | (wrapping && curLineObj.height > singleLineH)) 82 | return cm.charCoords(pos, "local")[top ? "top" : "bottom"]; 83 | var topY = cm.heightAtLine(curLineObj, "local"); 84 | return topY + (top ? 0 : curLineObj.height); 85 | } 86 | 87 | var lastLine = cm.lastLine() 88 | if (cm.display.barWidth) for (var i = 0, nextTop; i < anns.length; i++) { 89 | var ann = anns[i]; 90 | if (ann.to.line > lastLine) continue; 91 | var top = nextTop || getY(ann.from, true) * hScale; 92 | var bottom = getY(ann.to, false) * hScale; 93 | while (i < anns.length - 1) { 94 | if (anns[i + 1].to.line > lastLine) break; 95 | nextTop = getY(anns[i + 1].from, true) * hScale; 96 | if (nextTop > bottom + .9) break; 97 | ann = anns[++i]; 98 | bottom = getY(ann.to, false) * hScale; 99 | } 100 | if (bottom == top) continue; 101 | var height = Math.max(bottom - top, 3); 102 | 103 | var elt = frag.appendChild(document.createElement("div")); 104 | elt.style.cssText = "position: absolute; right: 0px; width: " + Math.max(cm.display.barWidth - 1, 2) + "px; top: " 105 | + (top + this.buttonHeight) + "px; height: " + height + "px"; 106 | elt.className = this.options.className; 107 | if (ann.id) { 108 | elt.setAttribute("annotation-id", ann.id); 109 | } 110 | } 111 | this.div.textContent = ""; 112 | this.div.appendChild(frag); 113 | }; 114 | 115 | Annotation.prototype.clear = function() { 116 | this.cm.off("refresh", this.resizeHandler); 117 | this.cm.off("markerAdded", this.resizeHandler); 118 | this.cm.off("markerCleared", this.resizeHandler); 119 | if (this.changeHandler) this.cm.off("change", this.changeHandler); 120 | this.div.parentNode.removeChild(this.div); 121 | }; 122 | }); 123 | -------------------------------------------------------------------------------- /src/lib/codemirror/addon/search/matchesonscrollbar.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-search-match { 2 | background: gold; 3 | border-top: 1px solid orange; 4 | border-bottom: 1px solid orange; 5 | -moz-box-sizing: border-box; 6 | box-sizing: border-box; 7 | opacity: .5; 8 | } 9 | -------------------------------------------------------------------------------- /src/lib/codemirror/addon/search/matchesonscrollbar.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: https://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror"), require("./searchcursor"), require("../scroll/annotatescrollbar")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror", "./searchcursor", "../scroll/annotatescrollbar"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.defineExtension("showMatchesOnScrollbar", function(query, caseFold, options) { 15 | if (typeof options == "string") options = {className: options}; 16 | if (!options) options = {}; 17 | return new SearchAnnotation(this, query, caseFold, options); 18 | }); 19 | 20 | function SearchAnnotation(cm, query, caseFold, options) { 21 | this.cm = cm; 22 | this.options = options; 23 | var annotateOptions = {listenForChanges: false}; 24 | for (var prop in options) annotateOptions[prop] = options[prop]; 25 | if (!annotateOptions.className) annotateOptions.className = "CodeMirror-search-match"; 26 | this.annotation = cm.annotateScrollbar(annotateOptions); 27 | this.query = query; 28 | this.caseFold = caseFold; 29 | this.gap = {from: cm.firstLine(), to: cm.lastLine() + 1}; 30 | this.matches = []; 31 | this.update = null; 32 | 33 | this.findMatches(); 34 | this.annotation.update(this.matches); 35 | 36 | var self = this; 37 | cm.on("change", this.changeHandler = function(_cm, change) { self.onChange(change); }); 38 | } 39 | 40 | var MAX_MATCHES = 1000; 41 | 42 | SearchAnnotation.prototype.findMatches = function() { 43 | if (!this.gap) return; 44 | for (var i = 0; i < this.matches.length; i++) { 45 | var match = this.matches[i]; 46 | if (match.from.line >= this.gap.to) break; 47 | if (match.to.line >= this.gap.from) this.matches.splice(i--, 1); 48 | } 49 | var cursor = this.cm.getSearchCursor(this.query, CodeMirror.Pos(this.gap.from, 0), {caseFold: this.caseFold, multiline: this.options.multiline}); 50 | var maxMatches = this.options && this.options.maxMatches || MAX_MATCHES; 51 | while (cursor.findNext()) { 52 | var match = {from: cursor.from(), to: cursor.to()}; 53 | if (match.from.line >= this.gap.to) break; 54 | this.matches.splice(i++, 0, match); 55 | if (this.matches.length > maxMatches) break; 56 | } 57 | this.gap = null; 58 | }; 59 | 60 | function offsetLine(line, changeStart, sizeChange) { 61 | if (line <= changeStart) return line; 62 | return Math.max(changeStart, line + sizeChange); 63 | } 64 | 65 | SearchAnnotation.prototype.onChange = function(change) { 66 | var startLine = change.from.line; 67 | var endLine = CodeMirror.changeEnd(change).line; 68 | var sizeChange = endLine - change.to.line; 69 | if (this.gap) { 70 | this.gap.from = Math.min(offsetLine(this.gap.from, startLine, sizeChange), change.from.line); 71 | this.gap.to = Math.max(offsetLine(this.gap.to, startLine, sizeChange), change.from.line); 72 | } else { 73 | this.gap = {from: change.from.line, to: endLine + 1}; 74 | } 75 | 76 | if (sizeChange) for (var i = 0; i < this.matches.length; i++) { 77 | var match = this.matches[i]; 78 | var newFrom = offsetLine(match.from.line, startLine, sizeChange); 79 | if (newFrom != match.from.line) match.from = CodeMirror.Pos(newFrom, match.from.ch); 80 | var newTo = offsetLine(match.to.line, startLine, sizeChange); 81 | if (newTo != match.to.line) match.to = CodeMirror.Pos(newTo, match.to.ch); 82 | } 83 | clearTimeout(this.update); 84 | var self = this; 85 | this.update = setTimeout(function() { self.updateAfterChange(); }, 250); 86 | }; 87 | 88 | SearchAnnotation.prototype.updateAfterChange = function() { 89 | this.findMatches(); 90 | this.annotation.update(this.matches); 91 | }; 92 | 93 | SearchAnnotation.prototype.clear = function() { 94 | this.cm.off("change", this.changeHandler); 95 | this.annotation.clear(); 96 | }; 97 | }); 98 | -------------------------------------------------------------------------------- /src/lib/codemirror/addon/selection/active-line.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: https://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | var WRAP_CLASS = "CodeMirror-activeline"; 14 | var BACK_CLASS = "CodeMirror-activeline-background"; 15 | var GUTT_CLASS = "CodeMirror-activeline-gutter"; 16 | 17 | CodeMirror.defineOption("styleActiveLine", false, function(cm, val, old) { 18 | var prev = old == CodeMirror.Init ? false : old; 19 | if (val == prev) return 20 | if (prev) { 21 | cm.off("beforeSelectionChange", selectionChange); 22 | clearActiveLines(cm); 23 | delete cm.state.activeLines; 24 | } 25 | if (val) { 26 | cm.state.activeLines = []; 27 | updateActiveLines(cm, cm.listSelections()); 28 | cm.on("beforeSelectionChange", selectionChange); 29 | } 30 | }); 31 | 32 | function clearActiveLines(cm) { 33 | for (var i = 0; i < cm.state.activeLines.length; i++) { 34 | cm.removeLineClass(cm.state.activeLines[i], "wrap", WRAP_CLASS); 35 | cm.removeLineClass(cm.state.activeLines[i], "background", BACK_CLASS); 36 | cm.removeLineClass(cm.state.activeLines[i], "gutter", GUTT_CLASS); 37 | } 38 | } 39 | 40 | function sameArray(a, b) { 41 | if (a.length != b.length) return false; 42 | for (var i = 0; i < a.length; i++) 43 | if (a[i] != b[i]) return false; 44 | return true; 45 | } 46 | 47 | function updateActiveLines(cm, ranges) { 48 | var active = []; 49 | for (var i = 0; i < ranges.length; i++) { 50 | var range = ranges[i]; 51 | var option = cm.getOption("styleActiveLine"); 52 | if (typeof option == "object" && option.nonEmpty ? range.anchor.line != range.head.line : !range.empty()) 53 | continue 54 | var line = cm.getLineHandleVisualStart(range.head.line); 55 | if (active[active.length - 1] != line) active.push(line); 56 | } 57 | if (sameArray(cm.state.activeLines, active)) return; 58 | cm.operation(function() { 59 | clearActiveLines(cm); 60 | for (var i = 0; i < active.length; i++) { 61 | cm.addLineClass(active[i], "wrap", WRAP_CLASS); 62 | cm.addLineClass(active[i], "background", BACK_CLASS); 63 | cm.addLineClass(active[i], "gutter", GUTT_CLASS); 64 | } 65 | cm.state.activeLines = active; 66 | }); 67 | } 68 | 69 | function selectionChange(cm, sel) { 70 | updateActiveLines(cm, sel.ranges); 71 | } 72 | }); 73 | -------------------------------------------------------------------------------- /src/lib/diff/README.md: -------------------------------------------------------------------------------- 1 | # diff 2 | 3 | implementation of myers diff algorithm 4 | 5 | [![Build Status](https://travis-ci.org/Swatinem/diff.png?branch=master)](https://travis-ci.org/Swatinem/diff) 6 | [![Coverage Status](https://coveralls.io/repos/Swatinem/diff/badge.png?branch=master)](https://coveralls.io/r/Swatinem/diff) 7 | [![Dependency Status](https://gemnasium.com/Swatinem/diff.png)](https://gemnasium.com/Swatinem/diff) 8 | 9 | 10 | This uses the [*An O(ND) Difference Algorithm and Its Variations*](http://www.xmailserver.org/diff2.pdf) 11 | Also see http://simplygenius.net/Article/DiffTutorial2 and 12 | http://www.mathertel.de/Diff/ViewSrc.aspx for more inspiration 13 | 14 | ## Installation 15 | 16 | $ npm install diff 17 | $ component install Swatinem/diff 18 | 19 | ## Usage 20 | 21 | ### diff(a, b, [eql(a, b)]) 22 | 23 | Given two arrays (or array-likes, such as strings) `a` and `b` and an optional 24 | equal function `eql`, this will return an array with the following operations: 25 | * *nop* the element is in both arrays 26 | * *ins* the element is only in array `b` and will be inserted 27 | * *del* the element in only in array `a` and will be removed 28 | * *rep* the element from `a` will be replaced by the element from `b`. 29 | This is essentially the same as a del+ins 30 | 31 | ## License 32 | 33 | LGPLv3 34 | 35 | -------------------------------------------------------------------------------- /src/lib/lz4/README.md: -------------------------------------------------------------------------------- 1 | ## Purpose 2 | 3 | The purpose of this library is to implement LZ4 compression/decompression, 4 | as documented at the official LZ4 repository: 5 | 6 | https://github.com/lz4/lz4/blob/dev/doc/lz4_Block_format.md 7 | 8 | The files in this directory are developed as a separate project at: 9 | 10 | https://github.com/gorhill/lz4-wasm 11 | 12 | ## Files 13 | 14 | ### `lz4-block-codec-any.js` 15 | 16 | The purpose is to instanciate a WebAssembly- or pure javascript-based 17 | LZ4 block codec. 18 | 19 | If the choosen implementation is not specified, there will be an attempt to 20 | create a WebAssembly-based instance. If for whatever reason this fails, a 21 | pure javascript-based instance will be created. 22 | 23 | The script for either instance are dynamically loaded and only when needed, 24 | such that no resources are wasted by keeping in memory code which won't be 25 | used. 26 | 27 | ### `lz4-block-codec-wasm.js` 28 | 29 | This contains the code to instanciate WebAssembly-based LZ4 block codec. Note 30 | that the WebAssembly module is loaded using a `same-origin` fetch, hence 31 | ensuring that no code outside the package is loaded. 32 | 33 | ### `lz4-block-codec-js.js` 34 | 35 | This contains the code to instanciate pure javascript-based LZ4 block codec. 36 | 37 | This is used as a fallback implementation should WebAssembly not be available 38 | for whatever reason. 39 | 40 | ### `lz4-block-codec.wasm` 41 | 42 | This is the WebAssembly module, loaded by `lz4-block-codec-wasm.js` using a 43 | `same-origin` fetch. 44 | 45 | ### `lz4-block-codec.wat` 46 | 47 | The WebAssembly source code used to generate the WebAssembly module `lz4-block-codec.wasm`. 48 | 49 | wat2wasm ./lz4-block-codec.wat -o ./lz4-block-codec.wasm 50 | wasm-opt ./lz4-block-codec.wasm -O4 -o ./lz4-block-codec.wasm 51 | 52 | You can get `wat2wasm` at , and `wasm-opt` at . 53 | -------------------------------------------------------------------------------- /src/lib/lz4/lz4-block-codec.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/src/lib/lz4/lz4-block-codec.wasm -------------------------------------------------------------------------------- /src/lib/publicsuffixlist/wasm/README.md: -------------------------------------------------------------------------------- 1 | ### For code reviewers 2 | 3 | All `wasm` files in that directory where created by compiling the 4 | corresponding `wat` file using the command (using 5 | `publicsuffixlist.wat`/`publicsuffixlist.wasm` as example): 6 | 7 | wat2wasm publicsuffixlist.wat -o publicsuffixlist.wasm 8 | 9 | Assuming: 10 | 11 | - The command is executed from within the present directory. 12 | 13 | ### `wat2wasm` tool 14 | 15 | The `wat2wasm` tool can be downloaded from an official WebAssembly project: 16 | . 17 | 18 | ### `wat2wasm` tool online 19 | 20 | You can also use the following online `wat2wasm` tool: 21 | . 22 | 23 | Just paste the whole content of the `wat` file to compile into the WAT pane. 24 | Click "Download" button to retrieve the resulting `wasm` file. 25 | 26 | ### See also 27 | 28 | For the curious, the following online tool allows you to find out the machine 29 | code as a result from the WASM code: https://mbebenita.github.io/WasmExplorer/ 30 | -------------------------------------------------------------------------------- /src/lib/publicsuffixlist/wasm/publicsuffixlist.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikobockerman/nuTensor/9a577584259ee7ff9bace6f9631e2fc980f925f1/src/lib/publicsuffixlist/wasm/publicsuffixlist.wasm -------------------------------------------------------------------------------- /src/main-blocked.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
exclamation-triangle
13 |
14 |

15 | 23 |
24 | 25 | 30 | 31 |
32 |

33 |

34 |
35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/raw-settings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 |

info-circle 22 |

23 |

  24 |

25 | 26 |
27 | 28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/user-rules.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | nuTensor — Your rules 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 |
22 | 23 |
24 | 25 | 26 |
27 |
28 |
29 |

30 |
31 | 32 | 33 |
34 |
35 |
36 |

37 |
38 | 39 | 40 | 41 |
42 |
43 |
filter
44 |
45 |
46 |
47 | 48 |
49 | 50 | 51 |
52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /tools/import-crowdin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This script assumes a linux environment 4 | 5 | DLDIR=~/Downloads 6 | ARCDIR=$DLDIR/crowdin 7 | 8 | echo "*** uMatrix: Importing from Crowdin archive" 9 | rm -r $ARCDIR 10 | unzip -q $DLDIR/uMatrix.zip -d $ARCDIR 11 | 12 | # Add-on strings 13 | LOCALEDIR=src/_locales 14 | SRCDIR=$ARCDIR/$LOCALEDIR 15 | DESDIR=./$LOCALEDIR 16 | cp $SRCDIR/am_ET/messages.json $DESDIR/am/messages.json 17 | cp $SRCDIR/ar_SA/messages.json $DESDIR/ar/messages.json 18 | cp $SRCDIR/bg_BG/messages.json $DESDIR/bg/messages.json 19 | cp $SRCDIR/bn_BD/messages.json $DESDIR/bn/messages.json 20 | cp $SRCDIR/ca_ES/messages.json $DESDIR/ca/messages.json 21 | cp $SRCDIR/cs_CZ/messages.json $DESDIR/cs/messages.json 22 | cp $SRCDIR/da_DK/messages.json $DESDIR/da/messages.json 23 | cp $SRCDIR/de_DE/messages.json $DESDIR/de/messages.json 24 | cp $SRCDIR/el_GR/messages.json $DESDIR/el/messages.json 25 | cp $SRCDIR/eo_UY/messages.json $DESDIR/eo/messages.json 26 | cp $SRCDIR/es_ES/messages.json $DESDIR/es/messages.json 27 | cp $SRCDIR/et_EE/messages.json $DESDIR/et/messages.json 28 | cp $SRCDIR/fa_IR/messages.json $DESDIR/fa/messages.json 29 | cp $SRCDIR/fi_FI/messages.json $DESDIR/fi/messages.json 30 | cp $SRCDIR/fil_PH/messages.json $DESDIR/fil/messages.json 31 | cp $SRCDIR/fr_FR/messages.json $DESDIR/fr/messages.json 32 | cp $SRCDIR/gu_IN/messages.json $DESDIR/gu/messages.json 33 | cp $SRCDIR/he_IL/messages.json $DESDIR/he/messages.json 34 | cp $SRCDIR/hi_IN/messages.json $DESDIR/hi/messages.json 35 | cp $SRCDIR/hr_HR/messages.json $DESDIR/hr/messages.json 36 | cp $SRCDIR/hu_HU/messages.json $DESDIR/hu/messages.json 37 | cp $SRCDIR/id_ID/messages.json $DESDIR/id/messages.json 38 | cp $SRCDIR/it_IT/messages.json $DESDIR/it/messages.json 39 | cp $SRCDIR/ja_JP/messages.json $DESDIR/ja/messages.json 40 | cp $SRCDIR/kn_IN/messages.json $DESDIR/kn/messages.json 41 | cp $SRCDIR/ko_KR/messages.json $DESDIR/ko/messages.json 42 | cp $SRCDIR/lt_LT/messages.json $DESDIR/lt/messages.json 43 | cp $SRCDIR/lv_LV/messages.json $DESDIR/lv/messages.json 44 | cp $SRCDIR/ml_IN/messages.json $DESDIR/ml/messages.json 45 | cp $SRCDIR/mr_IN/messages.json $DESDIR/mr/messages.json 46 | cp $SRCDIR/ms_MY/messages.json $DESDIR/ms/messages.json 47 | cp $SRCDIR/nl_NL/messages.json $DESDIR/nl/messages.json 48 | cp $SRCDIR/no_NO/messages.json $DESDIR/nb/messages.json 49 | cp $SRCDIR/pl_PL/messages.json $DESDIR/pl/messages.json 50 | cp $SRCDIR/pt_BR/messages.json $DESDIR/pt_BR/messages.json 51 | cp $SRCDIR/pt_PT/messages.json $DESDIR/pt_PT/messages.json 52 | cp $SRCDIR/ro_RO/messages.json $DESDIR/ro/messages.json 53 | cp $SRCDIR/ru_RU/messages.json $DESDIR/ru/messages.json 54 | cp $SRCDIR/sk_SK/messages.json $DESDIR/sk/messages.json 55 | cp $SRCDIR/sl_SI/messages.json $DESDIR/sl/messages.json 56 | cp $SRCDIR/sr_SP/messages.json $DESDIR/sr/messages.json 57 | cp $SRCDIR/sv_SE/messages.json $DESDIR/sv/messages.json 58 | cp $SRCDIR/sw_KE/messages.json $DESDIR/sw/messages.json 59 | cp $SRCDIR/ta_IN/messages.json $DESDIR/ta/messages.json 60 | cp $SRCDIR/te_IN/messages.json $DESDIR/te/messages.json 61 | cp $SRCDIR/th_TH/messages.json $DESDIR/th/messages.json 62 | cp $SRCDIR/tr_TR/messages.json $DESDIR/tr/messages.json 63 | cp $SRCDIR/uk_UA/messages.json $DESDIR/uk/messages.json 64 | cp $SRCDIR/vi_VN/messages.json $DESDIR/vi/messages.json 65 | cp $SRCDIR/zh_CN/messages.json $DESDIR/zh_CN/messages.json 66 | cp $SRCDIR/zh_TW/messages.json $DESDIR/zh_TW/messages.json 67 | 68 | rm -r $ARCDIR 69 | echo "*** uMatrix: Import done." 70 | 71 | git status 72 | -------------------------------------------------------------------------------- /tools/make-assets.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This script assumes a linux environment 4 | 5 | DES=$1/assets 6 | 7 | printf "*** Packaging assets in $DES... " 8 | 9 | rm -rf $DES 10 | mkdir $DES 11 | 12 | cp ./assets/assets.json $DES/ 13 | 14 | if [ -n "${TRAVIS_TAG}" ]; then 15 | pushd .. > /dev/null 16 | git clone --depth 1 https://github.com/geekprojects/nuAssets.git 17 | popd > /dev/null 18 | fi 19 | 20 | mkdir $DES/thirdparties 21 | cp -R ../nuAssets/thirdparties/hosts-file.net $DES/thirdparties/ 22 | cp -R ../nuAssets/thirdparties/mirror1.malwaredomains.com $DES/thirdparties/ 23 | cp -R ../nuAssets/thirdparties/pgl.yoyo.org $DES/thirdparties/ 24 | cp -R ../nuAssets/thirdparties/publicsuffix.org $DES/thirdparties/ 25 | cp -R ../nuAssets/thirdparties/someonewhocares.org $DES/thirdparties/ 26 | cp -R ../nuAssets/thirdparties/winhelp2002.mvps.org $DES/thirdparties/ 27 | cp -R ../nuAssets/thirdparties/www.malwaredomainlist.com $DES/thirdparties/ 28 | mkdir $DES/umatrix 29 | cp -R ../nuAssets/recipes/* $DES/umatrix/ 30 | 31 | echo "done." 32 | -------------------------------------------------------------------------------- /tools/make-chromium-meta.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import json 5 | import re 6 | import sys 7 | 8 | if len(sys.argv) == 1 or not sys.argv[1]: 9 | raise SystemExit('Build dir missing.') 10 | 11 | proj_dir = os.path.join(os.path.split(os.path.abspath(__file__))[0], '..') 12 | build_dir = os.path.abspath(sys.argv[1]) 13 | 14 | version = '' 15 | with open(os.path.join(proj_dir, 'dist', 'version')) as f: 16 | version = f.read().strip() 17 | 18 | manifest_out = {} 19 | manifest_out_file = os.path.join(build_dir, 'manifest.json') 20 | with open(manifest_out_file) as f: 21 | manifest_out = json.load(f) 22 | 23 | # Development build? If so, modify name accordingly. 24 | match = re.search('^(\d+\.\d+\.\d+)(\.|b|rc)(\d+)$', version) 25 | if match: 26 | version = match.group(1) 27 | revision = int(match.group(3)) 28 | if match.group(2) == 'rc': 29 | revision += 100 30 | version += '.' + str(revision) 31 | manifest_out['name'] += ' development build' 32 | manifest_out['short_name'] += ' dev build' 33 | manifest_out['browser_action']['default_title'] += ' dev build' 34 | 35 | manifest_out['version'] = version 36 | 37 | with open(manifest_out_file, 'w') as f: 38 | json.dump(manifest_out, f, indent=2, separators=(',', ': '), sort_keys=True) 39 | f.write('\n') 40 | -------------------------------------------------------------------------------- /tools/make-chromium.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This script assumes a linux environment 4 | 5 | echo "*** uMatrix(Chromium): Creating package" 6 | echo "*** uMatrix(Chromium): Copying files" 7 | 8 | DES=./dist/build/uMatrix.chromium 9 | rm -rf $DES 10 | mkdir -p $DES 11 | 12 | bash ./tools/make-assets.sh $DES 13 | 14 | cp -R ./src/* $DES/ 15 | cp -R $DES/_locales/nb $DES/_locales/no # Chrome store quirk 16 | cp ./platform/chromium/*.js $DES/js/ 17 | cp -R ./platform/chromium/img/* $DES/img/ 18 | cp ./platform/chromium/manifest.json $DES/ 19 | cp LICENSE.txt $DES/ 20 | 21 | echo "*** uMatrix.chromium: Generating meta..." 22 | python3 tools/make-chromium-meta.py $DES/ 23 | 24 | if [ "$1" = all ]; then 25 | echo "*** uMatrix.chromium: Creating package..." 26 | pushd $(dirname $DES/) 27 | zip uMatrix.chromium.zip -qr $(basename $DES/)/* 28 | popd 29 | elif [ -n "$1" ]; then 30 | echo "*** uMatrix.chromium: Creating versioned package..." 31 | pushd $(dirname $DES/) > /dev/null 32 | zip uMatrix_"$1".chromium.zip -qr $(basename $DES/)/* 33 | popd > /dev/null 34 | fi 35 | 36 | echo "*** uMatrix(Chromium): Package done." 37 | -------------------------------------------------------------------------------- /tools/make-clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This script assumes a linux environment 4 | 5 | echo "*** nuTensor(Chromium): Cleaning." 6 | rm -R ./dist/build 7 | echo "*** nuTensor(Chromium): Cleaned." 8 | -------------------------------------------------------------------------------- /tools/make-firefox-meta.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import json 5 | import re 6 | import sys 7 | 8 | if len(sys.argv) == 1 or not sys.argv[1]: 9 | raise SystemExit('Build dir missing.') 10 | 11 | proj_dir = os.path.join(os.path.split(os.path.abspath(__file__))[0], '..') 12 | build_dir = os.path.abspath(sys.argv[1]) 13 | 14 | version = '' 15 | with open(os.path.join(proj_dir, 'dist', 'version')) as f: 16 | version = f.read().strip() 17 | 18 | webext_manifest = {} 19 | webext_manifest_file = os.path.join(build_dir, 'manifest.json') 20 | with open(webext_manifest_file) as f: 21 | webext_manifest = json.load(f) 22 | 23 | webext_manifest['version'] = version 24 | match = re.search('^\d+\.\d+\.\d+(b|rc)', version) 25 | if not match: 26 | # https://bugzilla.mozilla.org/show_bug.cgi?id=1459007 27 | # By design Firefox opens the sidebar with new installation of 28 | # nuTensor when sidebar_action is present in the manifest. 29 | # Remove sidebarAction support for stable release of uBO. 30 | del webext_manifest['sidebar_action'] 31 | 32 | with open(webext_manifest_file, 'w') as f2: 33 | json.dump(webext_manifest, f2, indent=2, separators=(',', ': '), sort_keys=True) 34 | f2.write('\n') 35 | -------------------------------------------------------------------------------- /tools/make-firefox.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This script assumes a linux environment 4 | 5 | echo "*** nuTensor.firefox: Creating web store package" 6 | echo "*** nuTensor.firefox: Copying files" 7 | 8 | BLDIR=dist/build 9 | DES="$BLDIR"/nuTensor.firefox 10 | rm -rf $DES 11 | mkdir -p $DES 12 | 13 | bash ./tools/make-assets.sh $DES 14 | 15 | cp -R ./src/* $DES/ 16 | cp platform/chromium/*.js $DES/js/ 17 | cp -R platform/chromium/img/* $DES/img/ 18 | cp LICENSE.txt $DES/ 19 | 20 | cp platform/firefox/*.js $DES/js/ 21 | cp platform/firefox/manifest.json $DES/ 22 | 23 | echo "*** nuTensor.firefox: Generating meta..." 24 | python3 tools/make-firefox-meta.py $DES/ 25 | 26 | if [ "$1" = all ]; then 27 | echo "*** nuTensor.firefox: Creating package..." 28 | pushd $DES > /dev/null 29 | zip ../$(basename $DES).xpi -qr * 30 | popd > /dev/null 31 | elif [ -n "$1" ]; then 32 | echo "*** nuTensor.firefox: Creating versioned package..." 33 | pushd $DES > /dev/null 34 | zip ../$(basename $DES).xpi -qr * 35 | popd > /dev/null 36 | mv "$BLDIR"/nuTensor.firefox.xpi "$BLDIR"/nuTensor"$1".firefox.xpi 37 | fi 38 | 39 | echo "*** nuTensor.firefox: Package done." 40 | -------------------------------------------------------------------------------- /tools/make-opera-meta.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import json 5 | import re 6 | import sys 7 | 8 | if len(sys.argv) == 1 or not sys.argv[1]: 9 | raise SystemExit('Build dir missing.') 10 | 11 | proj_dir = os.path.join(os.path.split(os.path.abspath(__file__))[0], '..') 12 | build_dir = os.path.abspath(sys.argv[1]) 13 | 14 | version = '' 15 | with open(os.path.join(proj_dir, 'dist', 'version')) as f: 16 | version = f.read().strip() 17 | 18 | # Import data from chromium platform 19 | chromium_manifest = {} 20 | opera_manifest = {} 21 | 22 | chromium_manifest_file = os.path.join(proj_dir, 'platform', 'chromium', 'manifest.json') 23 | with open(chromium_manifest_file) as f1: 24 | chromium_manifest = json.load(f1) 25 | 26 | # WebExtension 27 | opera_manifest_add_file = os.path.join(proj_dir, 'platform', 'opera', 'manifest-add.json') 28 | with open(opera_manifest_add_file) as f2: 29 | opera_manifest = json.load(f2) 30 | 31 | for key in chromium_manifest: 32 | if key not in opera_manifest: 33 | opera_manifest[key] = chromium_manifest[key] 34 | 35 | # Development build? If so, modify name accordingly. 36 | match = re.search('^(\d+\.\d+\.\d+)(\.|b|rc)(\d+)$', version) 37 | if match: 38 | version = match.group(1) 39 | revision = int(match.group(3)) 40 | if match.group(2) == 'rc': 41 | revision += 100 42 | version += '.' + str(revision) 43 | opera_manifest['name'] += ' development build' 44 | opera_manifest['short_name'] += ' dev build' 45 | opera_manifest['browser_action']['default_title'] += ' dev build' 46 | 47 | opera_manifest['version'] = version 48 | 49 | opera_manifest_file = os.path.join(build_dir, 'manifest.json') 50 | with open(opera_manifest_file, 'w') as f2: 51 | json.dump(opera_manifest, f2, indent=2, separators=(',', ': '), sort_keys=True) 52 | f2.write('\n') 53 | -------------------------------------------------------------------------------- /tools/make-opera.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This script assumes a linux environment 4 | 5 | echo "*** uMatrix.opera: Creating package" 6 | echo "*** uMatrix.opera: Copying files" 7 | 8 | DES=./dist/build/uMatrix.opera 9 | rm -r $DES 10 | mkdir -p $DES 11 | 12 | bash ./tools/make-assets.sh $DES 13 | 14 | cp -R ./src/* $DES/ 15 | cp ./platform/chromium/*.js $DES/js/ 16 | cp -R ./platform/chromium/img/* $DES/img/ 17 | cp ./platform/chromium/manifest.json $DES/ 18 | cp LICENSE.txt $DES/ 19 | 20 | # Copy only locales with fully translated description 21 | rm -rf $DES/_locales 22 | mkdir -p $DES/_locales 23 | cp -R ./src/_locales/de $DES/_locales/ 24 | cp -R ./src/_locales/en $DES/_locales/ 25 | cp -R ./src/_locales/es $DES/_locales/ 26 | cp -R ./src/_locales/fr $DES/_locales/ 27 | cp -R ./src/_locales/he $DES/_locales/ 28 | cp -R ./src/_locales/id $DES/_locales/ 29 | cp -R ./src/_locales/it $DES/_locales/ 30 | cp -R ./src/_locales/nl $DES/_locales/ 31 | cp -R ./src/_locales/pt_BR $DES/_locales/ 32 | cp -R ./src/_locales/pt_PT $DES/_locales/ 33 | cp -R ./src/_locales/tr $DES/_locales/ 34 | cp -R ./src/_locales/zh_TW $DES/_locales/ 35 | 36 | echo "*** uMatrix.opera: Generating meta..." 37 | python3 tools/make-opera-meta.py $DES/ 38 | 39 | echo "*** uMatrix.opera: Package done." 40 | --------------------------------------------------------------------------------