├── 1p-filters.html
├── 3p-filters.html
├── BarrierIcon.png
├── LICENSE.txt
├── README.md
├── _locales
├── ar
│ └── messages.json
├── az
│ └── messages.json
├── bg
│ └── messages.json
├── bn
│ └── messages.json
├── bs
│ └── messages.json
├── ca
│ └── messages.json
├── cs
│ └── messages.json
├── cv
│ └── messages.json
├── da
│ └── messages.json
├── de
│ └── messages.json
├── el
│ └── messages.json
├── en
│ └── messages.json
├── en_GB
│ └── messages.json
├── eo
│ └── messages.json
├── es
│ └── messages.json
├── et
│ └── messages.json
├── eu
│ └── messages.json
├── fa
│ └── messages.json
├── fi
│ └── messages.json
├── fil
│ └── messages.json
├── fr
│ └── messages.json
├── fy
│ └── messages.json
├── gl
│ └── messages.json
├── he
│ └── messages.json
├── hi
│ └── messages.json
├── hr
│ └── messages.json
├── hu
│ └── messages.json
├── hy
│ └── messages.json
├── id
│ └── messages.json
├── it
│ └── messages.json
├── ja
│ └── messages.json
├── ka
│ └── messages.json
├── kk
│ └── 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
├── no
│ └── messages.json
├── oc
│ └── 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
├── sq
│ └── messages.json
├── sr
│ └── messages.json
├── sv
│ └── messages.json
├── ta
│ └── messages.json
├── te
│ └── messages.json
├── th
│ └── messages.json
├── tr
│ └── messages.json
├── uk
│ └── messages.json
├── ur
│ └── messages.json
├── vi
│ └── messages.json
├── zh_CN
│ └── messages.json
└── zh_TW
│ └── messages.json
├── about.html
├── aboutBarrier.html
├── advanced-settings.html
├── asset-viewer.html
├── assets
├── assets.json
├── resources
│ └── scriptlets.js
├── thirdparties
│ ├── easylist-downloads.adblockplus.org
│ │ ├── easylist.txt
│ │ └── easyprivacy.txt
│ ├── pgl.yoyo.org
│ │ └── as
│ │ │ ├── README.md
│ │ │ └── serverlist
│ ├── publicsuffix.org
│ │ └── list
│ │ │ └── effective_tld_names.dat
│ └── urlhaus-filter
│ │ ├── LICENSE.md
│ │ └── urlhaus-filter-online.txt
└── ublock
│ ├── badware.txt
│ ├── experimental.txt
│ ├── filters-2020.txt
│ ├── filters.txt
│ ├── legacy.txt
│ ├── privacy.txt
│ ├── resource-abuse.txt
│ └── unbreak.txt
├── background.html
├── background.js
├── block.js
├── cloud-ui.html
├── content.js
├── cookie.png
├── css
├── 1p-filters.css
├── 3p-filters.css
├── about.css
├── advanced-settings.css
├── cloud-ui.css
├── codemirror.css
├── common.css
├── dashboard-common.css
├── dashboard.css
├── document-blocked.css
├── dyna-rules.css
├── fa-icons.css
├── fonts
│ ├── Inter
│ │ ├── Inter-Regular.woff2
│ │ ├── Inter-SemiBold.woff2
│ │ └── LICENSE.txt
│ ├── Metropolis
│ │ ├── Metropolis-Regular.woff2
│ │ ├── Metropolis-SemiBold.woff2
│ │ ├── README.md
│ │ └── UNLICENSE
│ ├── OFL.txt
│ └── fontawesome-webfont.ttf
├── logger-ui-inspector.css
├── logger-ui.css
├── popup-fenix.css
├── popup.css
├── settings.css
├── shortcuts.css
├── themes
│ └── default.css
└── whitelist.css
├── customblock.js
├── dashboard.html
├── default_filters.js
├── document-blocked.html
├── dyna-rules.html
├── epicker.html
├── icon_32off.png
├── imagedata.js
├── img
├── cloud.png
├── fontawesome
│ ├── LICENSE.txt
│ └── fontawesome-defs.svg
├── help16.png
├── icon_128.png
├── icon_16-off.png
├── icon_16.png
├── icon_32-off.png
├── icon_32.png
├── icon_64.png
├── material-design.svg
├── photon.svg
├── ublock-defs.svg
└── ublock.svg
├── is-webrtc-supported.html
├── js
├── 1p-filters.js
├── 3p-filters.js
├── about.js
├── advanced-settings.js
├── asset-viewer.js
├── assets.js
├── background.js
├── cachestorage.js
├── cloud-ui.js
├── codemirror
│ ├── search.js
│ ├── ubo-dynamic-filtering.js
│ └── ubo-static-filtering.js
├── commands.js
├── console.js
├── contentscript.js
├── contextmenu.js
├── cosmetic-filtering.js
├── dashboard-common.js
├── dashboard.js
├── document-blocked.js
├── dyna-rules.js
├── dynamic-net-filtering.js
├── fa-icons.js
├── filtering-context.js
├── hnswitches.js
├── hntrie.js
├── html-filtering.js
├── i18n.js
├── is-webrtc-supported.js
├── logger-ui-inspector.js
├── logger-ui.js
├── logger.js
├── lz4.js
├── messaging.js
├── pagestore.js
├── popup-fenix.js
├── popup.js
├── redirect-engine.js
├── reverselookup-worker.js
├── reverselookup.js
├── scriptlet-filtering.js
├── scriptlets
│ ├── cosmetic-logger.js
│ ├── cosmetic-off.js
│ ├── cosmetic-on.js
│ ├── dom-inspector.js
│ ├── dom-survey-elements.js
│ ├── dom-survey-scripts.js
│ ├── element-picker.js
│ ├── load-large-media-all.js
│ ├── load-large-media-interactive.js
│ ├── noscript-spoof.js
│ ├── should-inject-contentscript.js
│ └── subscriber.js
├── settings.js
├── shortcuts.js
├── start.js
├── static-ext-filtering.js
├── static-filtering-parser.js
├── static-net-filtering.js
├── storage.js
├── strie.js
├── tab.js
├── text-encode.js
├── traffic.js
├── ublock.js
├── udom.js
├── uritools.js
├── url-net-filtering.js
├── utils.js
├── vapi-background.js
├── vapi-client-extra.js
├── vapi-client.js
├── vapi-common.js
├── vapi-webrequest.js
├── vapi.js
├── wasm
│ ├── README.md
│ ├── biditrie.wasm
│ ├── biditrie.wat
│ ├── hntrie.wasm
│ └── hntrie.wat
├── webext.js
└── whitelist.js
├── lib
├── codemirror
│ ├── LICENSE
│ ├── README.md
│ ├── addon
│ │ ├── comment
│ │ │ └── comment.js
│ │ ├── display
│ │ │ └── panel.js
│ │ ├── edit
│ │ │ ├── closebrackets.js
│ │ │ └── matchbrackets.js
│ │ ├── hint
│ │ │ ├── show-hint.css
│ │ │ └── show-hint.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
├── mainoptions.js
├── managed_storage.json
├── manifest.json
├── onInstall.js
├── options.html
├── options.js
├── optionstyles.css
├── p.html
├── popup-fenix.html
├── popup.html
├── privacy.md
├── privacyExtension.code-workspace
├── settings.html
├── shareIcon.png
├── shortcuts.html
├── sidesettings.js
├── styles.css
├── web_accessible_resources
├── 1x1.gif
├── 2x2.png
├── 32x32.png
├── 3x2.png
├── README.txt
├── addthis_widget.js
├── amazon_ads.js
├── amazon_apstag.js
├── ampproject_v0.js
├── chartbeat.js
├── disqus_embed.js
├── disqus_forums_embed.js
├── doubleclick_instream_ad_status.js
├── empty
├── google-analytics_analytics.js
├── google-analytics_cx_api.js
├── google-analytics_ga.js
├── google-analytics_inpage_linkid.js
├── googlesyndication_adsbygoogle.js
├── googletagmanager_gtm.js
├── googletagservices_gpt.js
├── hd-main.js
├── ligatus_angular-tag.js
├── monkeybroker.js
├── nobab.js
├── noeval-silent.js
├── noeval.js
├── nofab.js
├── noop-0.1s.mp3
├── noop-1s.mp4
├── noop.html
├── noop.js
├── noop.txt
├── outbrain-widget.js
├── popads-dummy.js
├── popads.js
├── scorecardresearch_beacon.js
└── window.open-defuser.js
└── whitelist.html
/1p-filters.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | uBlock — Your filters
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 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/3p-filters.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | uBlock — Filter lists
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | check
22 | refresh
23 | clock-o
24 |
25 |
26 |
33 |
34 |
39 |
40 |
41 |
42 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/BarrierIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/BarrierIcon.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | Barrier
3 | Barrier is the only all-in-one tool for online privacy. Barrier incorporates cookie and script blockers, smart anti-tracking, and the most sophisticated adblock. Your data is safe when using Barrier. All these features and more are encapsulated in Barrier’s slick user interface, with easy-to-use toggles and whitelist.
4 |
5 | Barrier is produced as an independent, open-source project. The project is proudly powered by other privacy services such as uBlock and Privacy Badger.
6 |
7 | With Barrier, you can navigate the web safely.
8 |
9 | Privacy Policy
10 | The Barrier Privacy Extension (referred to simply as “Barrier” from now on) does not track users at all. No usage statistics are collected.
11 |
12 | Barrier is a completely local application: A user’s whitelist is stored on the client browser’s local storage, never on a server. A user’s blocking configuration is stored on the client browser’s local storage, never on a server.
13 |
14 | Barrier’s source code is available on GitHub.com through GitHub Inc., a subsidiary of Microsoft. Barrier has no business ties to Github Inc or Microsoft.
15 |
16 |
17 | Contributing
18 | Contact barrierprivacy@gmail.com. We'd love to have you on the team!
19 |
20 |
21 |
22 | Powered By
23 | https://github.com/gorhill/uBlock/releases
24 | https://github.com/EFForg/https-everywhere
25 | https://github.com/EFForg/privacybadger
26 |
--------------------------------------------------------------------------------
/about.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | uBlock — About
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Copyright (c) Raymond Hill 2014-present
19 |
20 |
21 |
22 |
23 |
26 |
27 |
28 |
29 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/aboutBarrier.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | Welcome
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
Welcome to Barrier.
31 |
Barrier is the only all-in-one tool for online privacy.
32 |
Barrier is produced as an independent, open-source project.
33 |
Barrier is proudly powered by other privacy services such as uBlock and Privacy Badger.
34 |
Our Github:
35 |
Made Possible by:
36 |
https://github.com/gorhill/uBlock/releases
37 |
https://github.com/EFForg/https-everywhere
38 |
https://github.com/EFForg/privacybadger
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/advanced-settings.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/asset-viewer.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/assets/thirdparties/pgl.yoyo.org/as/README.md:
--------------------------------------------------------------------------------
1 | :
2 |
3 | Site does encourage use of the list for noncommercial uses only, as per
4 | https://pgl.yoyo.org/ ("everything licensed under the McRae General Public
5 | License (version 4.r53) ")
6 |
7 | Licence can be found at https://pgl.yoyo.org/license/, and is copied below
8 | for brevity:
9 |
10 |
11 | Preamble
12 | --------
13 | Your GRAN.
14 |
15 |
16 | MCRAE GENERAL PUBLIC LICENSE (version 4.r53)
17 | --------------------------------------------
18 | This license applies to any work containing a notice placed by the
19 | copyright holder (that would be ME) saying it is uses the McRae
20 | General Public License. "The work" refers to any such work.
21 |
22 | This license stipulates that it is strictly forbidden to redistribute
23 | or use the work in any manner that could possibly be construed as
24 | making anybody any money, or I'll sue you. No! You will NOT do that!
25 | Okee? And if you don't agree with these terms, you can print out the
26 | source to the work and stick it up your ARSE.
27 |
28 | Aye, but otherwise feel free to take "the work" and do what you like.
29 | If you're TOO BLOODY LAZY to do it yourself, I cannae help it. OK?
30 |
--------------------------------------------------------------------------------
/assets/ublock/experimental.txt:
--------------------------------------------------------------------------------
1 | ! uBlock Origin -- Experimental filters.
2 | !
3 | ! These filters are experimental and may cause breakage. They are being
4 | ! evaluated/fine-tuned for inclusion in the default set of filters.
5 | !
6 | ! The `important` filter option is often used here in order to ensure the
7 | ! experimental filters are used, i.e. they will override existing exception
8 | ! filters which might exist to unbreak known web page breakage.
9 |
10 | ! googletagservices.com not blocked by EasyPrivacy (I don't know why).
11 | ! This is a redirection-based filter being developed in order to be able
12 | ! to safely block `googletagservices.com` everywhere by default.
13 | ||googletagservices.com/tag/js/gpt.js$script,redirect=googletagservices.com/gpt.js,important
14 |
15 | ! www.google-analytics.com
16 | ! The goal is to be able to block `www.google-analytics.com` while preventing
17 | ! web page breakage.
18 | ! Replacement for `www.google-analytics.com/ga.js`
19 | ||google-analytics.com/ga.js$script,redirect=google-analytics.com/ga.js,important
20 |
21 | ! Replacement for `www.google-analytics.com/analytics.js`
22 | ||google-analytics.com/analytics.js$script,redirect=google-analytics.com/analytics.js,important
23 |
24 | ! https://github.com/gorhill/uBlock/issues/1248
25 | ||google-analytics.com/plugins/ga/inpage_linkid.js$script,redirect=google-analytics.com/inpage_linkid.js,important
26 |
27 | ! https://github.com/gorhill/uBlock/issues/1265
28 | ||scorecardresearch.com/beacon.js$script,redirect=scorecardresearch.com/beacon.js,important
29 |
30 | ! https://github.com/gorhill/uBlock/issues/897#issuecomment-180871042
31 | ||doubleclick.net/instream/ad_status.js$script,redirect=doubleclick.net/instream/ad_status.js,important
32 |
33 | ! This should be blocked by default: need to evaluate impact, and if any
34 | ! possibly fix with a neutered script.
35 | ! Commented out for now:
36 | ! - https://github.com/uBlockOrigin/uAssets/issues/41
37 | ! ||tags.tiqcdn.com^
38 |
--------------------------------------------------------------------------------
/assets/ublock/legacy.txt:
--------------------------------------------------------------------------------
1 | ! Title: uBlock filters -- Legacy
2 | ! Expires: 11 days
3 | ! Description: Filters to address issues specific to legacy versions of uBO.
4 | ! Homepage: https://github.com/uBlockOrigin/uAssets
5 | ! Licence: https://github.com/uBlockOrigin/uAssets/blob/master/LICENSE
6 | !
7 | ! GitHub issues: https://github.com/uBlockOrigin/uAssets/issues
8 | ! GitHub pull requests: https://github.com/uBlockOrigin/uAssets/pulls
9 |
10 | ! https://github.com/uBlockOrigin/uAssets/issues/5120
11 | @@||svonm.com/hd-main.js$script,domain=kicker.de|kino.de|videos.giga.de|video.spieletipps.de
12 | !#if env_chromium
13 | @@||svonm.com/hd-main.js$script,domain=kicker.de|kino.de|videos.giga.de|video.spieletipps.de,badfilter
14 | !#endif
15 | !#if env_firefox
16 | @@||svonm.com/hd-main.js$script,domain=kicker.de|kino.de|videos.giga.de|video.spieletipps.de,badfilter
17 | !#endif
18 | !#if env_mobile
19 | @@||svonm.com/hd-main.js$script,domain=kicker.de|kino.de|videos.giga.de|video.spieletipps.de,badfilter
20 | !#endif
21 |
22 | ! https://github.com/uBlockOrigin/uAssets/issues/5186
23 | ||fwmrm.net/ad/*$script,redirect=noopjs,domain=nationalgeographic.com
24 | @@||fwmrm.net/*/fox_live/AdManager.js$script,domain=nationalgeographic.com
25 |
26 | ! https://github.com/easylist/easylist/issues/3261#issuecomment-483481215
27 | @@||adswizz.com/anon.npr-mp3/*$object,domain=podbay.fm
28 | @@||adswizz.com/anon.npr-podcasts/*$object,domain=podbay.fm
29 |
30 | ! https://github.com/uBlockOrigin/uAssets/issues/1633#issuecomment-487359894
31 | |about:blank|$popup,domain=fileflares.com,badfilter
32 |
33 | ! https://github.com/easylist/easylist/issues/4185#issuecomment-567586648
34 | ||cbsistatic.com/*/dw-tracking$script,important,redirect=noopjs,domain=techrepublic.com,badfilter
35 |
36 | ! https://github.com/uBlockOrigin/uAssets/issues/7440
37 | greatist.com#@##modal-host
38 | greatist.com,healthline.com,medicalnewstoday.com#@##modal-host:style(display: none !important;)
39 |
40 | ! https://github.com/ryanbr/fanboy-adblock/issues/1360#issuecomment-634700528
41 | lawrievetgroup.co.uk###js-consent-wrapper
42 | lawrievetgroup.co.uk##body:style(overflow: auto !important;)
43 |
44 | ! https://github.com/gorhill/uBlock-for-firefox-legacy/pull/234#issuecomment-647043243
45 | hentai2read.com##[src^="//"]:xpath(//ancestor-or-self::*[@target="_blank"])
46 | prepostseo.com##.adsbygoogle:xpath(//ancestor-or-self::*[contains(concat(" ", @class, " "), " col-lg-12 ")][contains(concat(" ", @class, " "), " text-center ")])
47 | sky.com##.sdc-site-tile__headline:after
48 |
--------------------------------------------------------------------------------
/background.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Barrier
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 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/block.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | allFilters = null;
4 | webRTCPrivacy = null;
5 |
6 | function setFilters(newFilters) {
7 | allFilters = newFilters;
8 | chrome.storage.local.set({"filters": newFilters});
9 | }
10 |
11 | // magic objects that the webRequest API interprets
12 | // we turn images and iframes into innocuous no-ops, everything else gets outright "cancelled"
13 | blockImagePayload = {redirectUrl: "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEAAAAALAAAAAABAAEAAAI="};
14 | blockPagePayload = {redirectUrl: "about:blank"};
15 | cancelPayload = {cancel: true};
16 |
17 | // magic callbacks to deliver the abovementioned magic objects:
18 | function blockImage(details) {
19 | return blockImagePayload;
20 | }
21 |
22 | function blockPage(details) {
23 | return blockPagePayload;
24 | }
25 |
26 | function blockObject(details) {
27 | return cancelPayload;
28 | }
29 |
30 | // types of object and callbacks to remove them:
31 | listenerCallbacks = [
32 | [["image"], blockImage],
33 | [["sub_frame"], blockPage],
34 | [["main_frame", "object", "script", "xmlhttprequest", "stylesheet", "font", "media", "ping", "csp_report", "other"], blockObject]
35 | ]
36 |
37 | // global on/off state
38 | blockingEnabled = false;
39 |
40 | // register all callbacks
41 | function enable(icon = true) {
42 | if (blockingEnabled) {
43 | return;
44 | }
45 |
46 | // edge case: enabling with urls == [] will block *all* URLs,
47 | // rather than none of them
48 | if (allFilters.length > 0) {
49 | for (var j in listenerCallbacks) {
50 | var types = listenerCallbacks[j][0];
51 | var callback = listenerCallbacks[j][1];
52 | chrome.webRequest.onBeforeRequest.addListener(
53 | callback,
54 | {urls: allFilters, types: types},
55 | // blocks the request until processed; needed to cancel/redir
56 | ["blocking"]
57 | );
58 | }
59 | }
60 |
61 |
62 | var wsFilters = [];
63 | var prefix = "*://"
64 | allFilters.forEach(function(filter) {
65 | if (filter.startsWith(prefix)) {
66 | var suffix = filter.slice(prefix.length)
67 | wsFilters.push("ws://" + suffix)
68 | wsFilters.push("wss://" + suffix)
69 | }
70 | });
71 | if (wsFilters.length > 0) {
72 | chrome.webRequest.onBeforeRequest.addListener(
73 | blockObject,
74 | {urls: wsFilters, types: ["websocket"]},
75 | ["blocking"]
76 | );
77 | }
78 |
79 | blockingEnabled = true;
80 | if (icon) {
81 |
82 | }
83 | }
84 |
85 | // unregister all callbacks
86 | function disable(icon = true) {
87 | for (var j in listenerCallbacks) {
88 | var callback = listenerCallbacks[j][1];
89 | chrome.webRequest.onBeforeRequest.removeListener(callback);
90 | }
91 |
92 | blockingEnabled = false;
93 | if (icon) {
94 |
95 | }
96 | }
97 |
98 | // power-cycle
99 | function refreshFilters() {
100 | // work around some weird Chrome issue. seems like: on first load,
101 | // if you call setIcon twice in a row, the second call is ignored (?)
102 | disable(false);
103 | enable(true);
104 | }
105 |
106 | // switch-flip
107 | function toggleEnabled() {
108 | if (blockingEnabled) {
109 | disable();
110 | } else {
111 | enable();
112 | }
113 | }
114 |
115 | function setWebRTCPrivacy(flag, store = true) {
116 | webRTCPrivacy = flag;
117 | var privacySetting = flag ? "default_public_interface_only" :"default";
118 | chrome.privacy.network.webRTCIPHandlingPolicy.set({value: privacySetting});
119 | if (store) {
120 | chrome.storage.local.set({"webrtc_privacy": flag});
121 | }
122 | }
123 |
124 | // Initialization.
125 |
126 | chrome.storage.local.get("filters",
127 | function(result) {
128 | if (result["filters"] == undefined) {
129 | console.log("Initializing filters to defaults.");
130 | setFilters(defaultFilters);
131 | } else {
132 | setFilters(result["filters"]);
133 | allFilters = result["filters"];
134 | }
135 |
136 | // toggle blocking on-off via the extension icon in the Omnibar
137 | chrome.storage.onChanged.addListener(function(changes, namespace) {
138 |
139 | });
140 |
141 |
142 | }
143 | );
144 |
145 | chrome.storage.local.get("webrtc_privacy",
146 | function(result) {
147 | if (result["webrtc_privacy"] == undefined) {
148 | console.log("Initializing WebRTC privacy to default.");
149 | setWebRTCPrivacy(false, true);
150 | } else {
151 | setWebRTCPrivacy(result["webrtc_privacy"], false);
152 | }
153 | }
154 | );
155 |
156 |
--------------------------------------------------------------------------------
/cloud-ui.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | cloud-upload
9 |
10 | cloud-download
11 | cloud-download plus
12 |
13 | cog
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/content.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | var status = null;
4 | var enabledOrNoT = null;
5 | //check if process is enabled
6 | function toggleScriptBlocker() {
7 | if(enabledOrNoT == true) {
8 | status=true;
9 | } else
10 | status = false;
11 |
12 | }
13 |
14 | //intialize a blank function
15 | function needsToBeBlacklisted (x,y) {
16 |
17 | }
18 |
19 | const observer = new MutationObserver(mutations => {
20 | mutations.forEach(({ addedNodes }) => {
21 | addedNodes.forEach(node => {
22 | // For each added script tag
23 | if(node.nodeType === 1 && node.tagName === 'SCRIPT') {
24 | const src = node.src || 'https://www.google.com'
25 | const type = node.type
26 | // If the src is inside your blacklist
27 | if(needsToBeBlacklisted(src, type)) {
28 | if(status == true) {
29 | // Assume that this code is executed inside the mutation observer callback:
30 | addedNodes.forEach(node => {
31 | // See above for script tag checks…
32 |
33 | // Blocks the script tag execution in Safari, Chrome, Edge & IE
34 | node.type = 'javascript/blocked'
35 |
36 | // Unnecessary, but cleaner: remove the node from the DOM
37 | node.parentElement.removeChild(node)
38 |
39 | })}
40 |
41 |
42 |
43 |
44 | }
45 | }
46 | })
47 | })
48 | })
49 |
50 | // Starts the monitoring
51 | observer.observe(document.documentElement, {
52 | childList: true,
53 | subtree: true
54 | })
55 |
56 |
57 | chrome.runtime.sendMessage({method: "getLocalStorage", key: "thirdPartyJS"}, function(response) {
58 | enabledOrNoT= response.data;
59 |
60 | });
61 |
62 |
63 |
64 |
65 | chrome.runtime.sendMessage({method: "clearCookies", key: true}, function(response) {
66 |
67 |
68 | });
69 |
--------------------------------------------------------------------------------
/cookie.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/cookie.png
--------------------------------------------------------------------------------
/css/1p-filters.css:
--------------------------------------------------------------------------------
1 | html {
2 | height: 100vh;
3 | overflow: hidden;
4 | width: 100vw;
5 | }
6 | body {
7 | display: flex;
8 | flex-direction: column;
9 | height: 100%;
10 | justify-content: stretch;
11 | overflow: hidden;
12 | width: 100%;
13 | }
14 | .body {
15 | flex-shrink: 0;
16 | }
17 | .codeMirrorContainer {
18 | flex-grow: 1;
19 | }
20 | #userFilters {
21 | text-align: left;
22 | word-wrap: normal;
23 | }
24 |
--------------------------------------------------------------------------------
/css/about.css:
--------------------------------------------------------------------------------
1 | .entries {
2 | margin: 0.5em 0;
3 | margin-inline-start: 2em;
4 | -webkit-margin-start: 2em;
5 | }
6 | .entry {
7 | margin: 0.5em 0;
8 | }
9 |
--------------------------------------------------------------------------------
/css/advanced-settings.css:
--------------------------------------------------------------------------------
1 | html {
2 | height: 100vh;
3 | overflow: hidden;
4 | width: 100vw;
5 | }
6 | body {
7 | display: flex;
8 | flex-direction: column;
9 | height: 100%;
10 | justify-content: stretch;
11 | overflow: hidden;
12 | width: 100%;
13 | }
14 | .body {
15 | flex-shrink: 0;
16 | }
17 | .codeMirrorContainer {
18 | flex-grow: 1;
19 | }
20 | #advancedSettings {
21 | border-top: 1px solid #ddd;
22 | text-align: left;
23 | }
24 | .CodeMirror-wrap pre {
25 | word-break: break-all;
26 | }
27 |
--------------------------------------------------------------------------------
/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 | overflow: auto;
6 | padding: 0.5em;
7 | position: relative;
8 | }
9 | #cloudWidget.hide {
10 | display: none;
11 | }
12 | #cloudWidget > button {
13 | font-size: 180%;
14 | padding: 0 0.25em;
15 | position: relative;
16 | }
17 | #cloudWidget {
18 | align-items: center;
19 | display: flex;
20 | flex-wrap: nowrap;
21 | }
22 | #cloudWidget button[disabled] {
23 | visibility: hidden;
24 | }
25 | #cloudWidget button.error {
26 | color: var(--fg-icon-info-lvl-4);
27 | }
28 | #cloudPullAndMerge {
29 | margin-left: 0.25em;
30 | }
31 | #cloudPullAndMerge > span:nth-of-type(2) {
32 | font-size: 50%;
33 | position: absolute;
34 | right: 0;
35 | top: 0;
36 | }
37 | #cloudInfo {
38 | color: var(--fg-0-60);
39 | flex-shrink: 0;
40 | font-size: 90%;
41 | margin: 0 1em;
42 | overflow: hidden;
43 | padding: 0;
44 | white-space: pre-line;
45 | }
46 | #cloudError {
47 | color: var(--fg-icon-info-lvl-4);
48 | flex-grow: 1;
49 | flex-shrink: 2;
50 | font-size: x-small;
51 | margin: 0 1em;
52 | }
53 | #cloudWidget #cloudCog {
54 | color: var(--fg-0-50);
55 | cursor: pointer;
56 | fill: var(--fg-0-50);
57 | font-size: 110%;
58 | padding: 0.4em;
59 | }
60 | #cloudWidget #cloudCog:hover {
61 | color: inherit;
62 | fill: inherit;
63 | }
64 | #cloudWidget #cloudOptions {
65 | background-color: var(--default-surface);
66 | border: 1px solid var(--bg-1-border);
67 | bottom: 0;
68 | display: none;
69 | margin: 0.4em;
70 | padding: 0.4em;
71 | position: absolute;
72 | right: 0;
73 | text-align: center;
74 | top: 0;
75 | z-index: 10;
76 | }
77 | #cloudWidget #cloudOptions.show {
78 | display: block;
79 | }
80 |
--------------------------------------------------------------------------------
/css/codemirror.css:
--------------------------------------------------------------------------------
1 | .codeMirrorContainer {
2 | font-size: 12px;
3 | line-height: 1.25;
4 | overflow: hidden;
5 | position: relative;
6 | }
7 | .CodeMirror {
8 | box-sizing: border-box;
9 | flex-grow: 1;
10 | height: 100%;
11 | width: 100%;
12 | }
13 |
14 | /* For when panels are used */
15 | .codeMirrorContainer > div:not([class^="CodeMirror"]) {
16 | display: flex;
17 | flex-direction: column;
18 | height: 100%;
19 | }
20 |
21 | .codeMirrorContainer.codeMirrorBreakAll .CodeMirror-wrap pre {
22 | word-break: break-all;
23 | }
24 |
25 | /* CodeMirror theme overrides */
26 | .cm-s-default .cm-value { color: #930; }
27 | .cm-s-default .cm-comment { color: #777; }
28 | .cm-s-default .cm-keyword { color: #90b; }
29 | .cm-s-default .cm-regex {
30 | text-underline-position: under;
31 | text-decoration-color: darkgray;
32 | text-decoration-style: solid;
33 | text-decoration-line: underline;
34 | }
35 | .cm-s-default .cm-error {
36 | color: inherit;
37 | }
38 | .cm-s-default .cm-error,
39 | .CodeMirror-linebackground.error {
40 | background-color: #ff000016;
41 | text-decoration: underline red;
42 | text-underline-position: under;
43 | }
44 |
45 | .cm-directive { color: #333; font-weight: bold; }
46 | .cm-staticext { color: #008; }
47 | .cm-staticnetBlock { color: #800; }
48 | .cm-staticnetAllow { color: #004f00; }
49 | .cm-staticOpt { background-color: #ddd; font-weight: bold; }
50 |
51 | div.CodeMirror span.CodeMirror-matchingbracket {
52 | color: unset;
53 | }
54 | .CodeMirror-matchingbracket {
55 | color: inherit !important;
56 | font-weight: bold;
57 | }
58 |
59 | .cm-search-widget {
60 | align-items: center;
61 | background-color: var(--bg-code);
62 | cursor: default;
63 | direction: ltr;
64 | display: flex;
65 | flex-shrink: 0;
66 | font-size: 110%;
67 | justify-content: center;
68 | padding: 0.5em;
69 | user-select: none;
70 | -moz-user-select: none;
71 | -webkit-user-select: none;
72 | z-index: 1000;
73 | }
74 | .cm-search-widget .fa-icon {
75 | fill: #888;
76 | font-size: 140%;
77 | }
78 | .cm-search-widget .fa-icon:not(.fa-icon-ro):hover {
79 | fill: #000;
80 | }
81 | .cm-search-widget-input {
82 | border: 1px solid gray;
83 | border-radius: 3px;
84 | display: inline-flex;
85 | max-width: 50vw;
86 | width: 16em;
87 | }
88 | .cm-search-widget-input > input {
89 | border: 0;
90 | flex-grow: 1;
91 | width: 100%;
92 | }
93 | .cm-search-widget-input > .cm-search-widget-count {
94 | align-items: center;
95 | color: #888;
96 | display: none;
97 | flex-grow: 0;
98 | font-size: 80%;
99 | padding: 0 0.4em;
100 | pointer-events: none;
101 | }
102 | .cm-search-widget[data-query] .cm-search-widget-count {
103 | display: inline-flex;
104 | }
105 | .cm-search-widget .cm-search-widget-button:hover {
106 | color: #000;
107 | }
108 | .cm-search-widget .sourceURL {
109 | padding-left: 0.5em;
110 | padding-right: 0.5em;
111 | position: absolute;
112 | left: 0;
113 | }
114 | .cm-search-widget .sourceURL[href=""] {
115 | display: none;
116 | }
117 |
118 | .CodeMirror-merge-l-deleted {
119 | background-image: none;
120 | font-weight: bold;
121 | }
122 | .CodeMirror-merge-l-inserted {
123 | background-image: none;
124 | font-weight: bold;
125 | }
126 | /* This probably needs to be added to CodeMirror repo */
127 | .CodeMirror-merge-gap {
128 | vertical-align: top;
129 | }
130 |
131 | .CodeMirror-hints {
132 | z-index: 10000;
133 | }
134 |
--------------------------------------------------------------------------------
/css/dashboard-common.css:
--------------------------------------------------------------------------------
1 | body > div.body {
2 | padding: 0 0.5em;
3 | }
4 | @media screen and (max-device-width: 960px) {
5 | body {
6 | zoom: 1.4;
7 | }
8 | }
9 | h2, h3 {
10 | margin: 1em 0;
11 | }
12 | h2 {
13 | font-size: 18px;
14 | }
15 | h3 {
16 | font-size: 16px;
17 | }
18 | a {
19 | text-decoration: none;
20 | }
21 | .fa.info,
22 | .fa-icon.info {
23 | color: var(--fg-icon-info-lvl-0-dimmed);
24 | fill: var(--fg-icon-info-lvl-0-dimmed);
25 | font-size: 115%;
26 | }
27 | .fa.info:hover,
28 | .fa-icon.info:hover {
29 | color: inherit;
30 | fill: inherit;
31 | }
32 | .fa.info.important,
33 | .fa-icon.info.important {
34 | color: var(--fg-icon-info-lvl-3-dimmed);
35 | }
36 | .fa.info.important:hover,
37 | .fa-icon.info.important:hover {
38 | color: var(--fg-icon-info-lvl-3);
39 | }
40 | input[type="number"] {
41 | width: 5em;
42 | }
43 | input[type="checkbox"][disabled] + * {
44 | color: var(--fg-0-50);
45 | }
46 | @media (max-height: 640px), (max-height: 800px) and (max-width: 480px) {
47 | .body > p,
48 | .body > ul {
49 | margin: 0.5em 0;
50 | }
51 | .vverbose {
52 | display: none !important;
53 | }
54 | }
55 | /**
56 | On mobile device, the on-screen keyboard may take up
57 | so much space that it overlaps the content being edited.
58 | The rule below makes it possible to scroll the edited
59 | content within view.
60 | */
61 | :root.mobile {
62 | overflow: auto;
63 | }
64 | :root.mobile body {
65 | min-height: 600px;
66 | }
67 |
--------------------------------------------------------------------------------
/css/dashboard.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | display: flex;
3 | flex-direction: column;
4 | height: 100vh;
5 | justify-content: stretch;
6 | overflow: hidden;
7 | position: relative;
8 | width: 100vw;
9 | }
10 | #dashboard-nav {
11 | background-color: var(--default-surface);
12 | border: 0;
13 | box-shadow: var(--dashboard-bar-shadow);
14 | display: flex;
15 | flex-shrink: 0;
16 | flex-wrap: wrap;
17 | overflow-x: hidden;
18 | padding: 0;
19 | position: sticky;
20 | top: 0;
21 | width: 100%;
22 | z-index: 10;
23 | }
24 | #dashboard-nav .logo {
25 | align-items: center;
26 | display: inline-flex;
27 | padding: 0 0.5em;
28 | width: 1.25em;
29 | }
30 | #dashboard-nav .logo > img {
31 | width: 100%;
32 | }
33 | .tabButton {
34 | border: 0;
35 | border-bottom: 3px solid var(--bg-1);
36 | border-top: 3px solid transparent;
37 | color: var(--dashboard-tab-ink);
38 | fill: var(--dashboard-tab-ink);
39 | letter-spacing: 0.5px;
40 | padding: 0.5em 1.4em calc(0.5em - 3px);
41 | text-decoration: none;
42 | user-select: none;
43 | white-space: nowrap;
44 | }
45 | .tabButton:focus {
46 | outline: 0;
47 | }
48 | .tabButton.selected {
49 | border-bottom: 3px solid var(--dashboard-tab-active-ink);
50 | color: var(--dashboard-tab-active-ink);
51 | fill: var(--dashboard-tab-active-ink);
52 | }
53 | iframe {
54 | background-color: transparent;
55 | border: 0;
56 | flex-grow: 1;
57 | margin: 0;
58 | padding: 0;
59 | width: 100%;
60 | }
61 | #unsavedWarning {
62 | box-shadow: rgba(128,128,128,0.4) 0 4px 4px;
63 | display: none;
64 | left: 0;
65 | position: absolute;
66 | width: 100%;
67 | z-index: 20;
68 | }
69 | #unsavedWarning.on {
70 | display: initial;
71 | }
72 | #unsavedWarning > div:first-of-type {
73 | background-color: var(--bg-transient-notice);
74 | padding: 0.5em;
75 | }
76 | #unsavedWarning > div:last-of-type {
77 | height: 100vh;
78 | position: absolute;
79 | width: 100vw;
80 | }
81 |
82 | body:not(.canUpdateShortcuts) .tabButton[data-pane="shortcuts.html"] {
83 | display: none;
84 | }
85 |
86 | /* high dpi devices */
87 | :root.hidpi .tabButton {
88 | font-family: Metropolis, sans-serif;
89 | font-weight: 600;
90 | }
91 |
92 | /* hover-able devices */
93 | :root.desktop .tabButton {
94 | cursor: default;
95 | }
96 | :root.desktop .tabButton:not(.selected) {
97 | cursor: pointer;
98 | }
99 | :root.desktop .tabButton:not(.selected):hover {
100 | background-color: var(--dashboard-tab-surface-hover);
101 | border-bottom-color: var(--dashboard-tab-surface-hover);
102 | }
103 |
104 | /* touch-screen devices */
105 | :root.mobile #dashboard-nav {
106 | flex-wrap: nowrap;
107 | overflow-x: auto;
108 | }
109 | :root.mobile #dashboard-nav .logo {
110 | display: none;
111 | }
112 |
--------------------------------------------------------------------------------
/css/document-blocked.css:
--------------------------------------------------------------------------------
1 | /**
2 | uBlock Origin - a browser extension to block requests.
3 | Copyright (C) 2018-present Raymond Hill
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see {http://www.gnu.org/licenses/}.
17 |
18 | Home: https://github.com/gorhill/uBlock
19 | */
20 |
21 | body {
22 | display: flex;
23 | flex-direction: column;
24 | font-size: 14px;
25 | line-height: 20px;
26 | padding: 40px;
27 | text-align: center;
28 | }
29 | body > div {
30 | margin: 0 0 var(--default-gap-large) 0;
31 | }
32 | body > div > * {
33 | margin: 0 0 var(--default-gap-xsmall) 0;
34 | }
35 | a {
36 | text-decoration: none;
37 | }
38 | .code {
39 | font-size: 13px;
40 | word-break: break-all;
41 | }
42 | #warningSign {
43 | width: 100%;
44 | }
45 | #warningSign > a {
46 | fill: var(--yellow-50);
47 | font-size: 96px;
48 | }
49 | #theURL {
50 | padding: 0;
51 | }
52 | #theURL > * {
53 | margin: 0;
54 | }
55 | #theURL > p {
56 | position: relative;
57 | z-index: 10;
58 | }
59 | #theURL > p > span {
60 | background-color: transparent;
61 | top: 100%;
62 | box-sizing: border-box;
63 | color: var(--fg-0-60);
64 | cursor: pointer;
65 | fill: var(--fg-0-60);
66 | padding: var(--default-gap-xxsmall);
67 | position: absolute;
68 | transform: translate(0, -50%);
69 | }
70 | body[dir="ltr"] #theURL > p > span {
71 | right: 0;
72 | }
73 | body[dir="rtl"] #theURL > p > span {
74 | left: 0;
75 | }
76 | #theURL > p:hover > span {
77 | color: var(--default-ink);
78 | fill: var(--default-ink);
79 | }
80 | #theURL > p > span:before {
81 | content: '\f010';
82 | }
83 | #theURL.collapsed > p > span:before {
84 | content: '\f00e';
85 | }
86 | #parsed {
87 | background-color: var(--bg-1);
88 | border: 1px solid var(--bg-code);
89 | border-top: none;
90 | color: var(--fg-0-80);
91 | font-size: small;
92 | overflow-x: auto;
93 | padding: var(--default-gap-xxsmall);
94 | text-align: initial;
95 | text-overflow: ellipsis;
96 | }
97 | #theURL.collapsed > #parsed {
98 | display: none;
99 | }
100 | #parsed ul, #parsed li {
101 | list-style-type: none;
102 | }
103 | #parsed li {
104 | white-space: nowrap;
105 | }
106 | #parsed span {
107 | display: inline-block;
108 | }
109 | #parsed span:first-of-type {
110 | font-weight: bold;
111 | }
112 | #whyex a {
113 | white-space: nowrap;
114 | }
115 | #proceed {
116 | margin-bottom: var(--default-gap);
117 | }
118 | :root.mobile .proceedButtons {
119 | justify-content: center;
120 | display: flex;
121 | flex-direction: column;
122 | }
123 | .proceedButtons > button {
124 | margin-inline-end: var(--default-gap);
125 | margin-block-end: var(--default-gap-xsmall);
126 | }
127 |
128 | .filterList:first-child .filterListSeparator {
129 | display: none;
130 | }
131 | .filterList .filterListSupport[href=""] {
132 | display: none;
133 | }
134 |
135 | /* Small-screen devices */
136 | :root.mobile button {
137 | width: 100%;
138 | }
139 |
--------------------------------------------------------------------------------
/css/dyna-rules.css:
--------------------------------------------------------------------------------
1 | html {
2 | height: 100vh;
3 | overflow: hidden;
4 | width: 100vw;
5 | }
6 | body {
7 | display: flex;
8 | flex-direction: column;
9 | height: 100%;
10 | justify-content: stretch;
11 | overflow: hidden;
12 | width: 100%;
13 | }
14 | .body {
15 | flex-shrink: 0;
16 | }
17 | #diff {
18 | border: 0;
19 | border-top: 1px solid #eee;
20 | white-space: nowrap;
21 | }
22 | #diff .tools > * {
23 | margin-bottom: 0.5em;
24 | }
25 | #diff .ruleActions {
26 | border: 0;
27 | box-sizing: border-box;
28 | display: inline-block;
29 | padding: 0;
30 | text-align: center;
31 | vertical-align: top;
32 | width: 50%;
33 | white-space: nowrap;
34 | }
35 | #diff .ruleActions .fieldset-header {
36 | margin: 0.5em 0;
37 | }
38 | #ruleFilter {
39 | direction: ltr;
40 | text-align: center;
41 | }
42 | #ruleFilter .fa {
43 | color: var(--fg-0-60);
44 | }
45 | #revertButton,
46 | #commitButton,
47 | body.editing #diff #exportButton,
48 | body.editing #diff #importButton {
49 | background-color: var(--button-disabled-surface);
50 | color: var(--button-disabled-ink);
51 | fill: var(--button-disabled-ink);
52 | filter: var(--button-disabled-filter);
53 | pointer-events: none;
54 | }
55 | body:not(.editing) #diff.dirty #revertButton,
56 | body:not(.editing) #diff.dirty #commitButton {
57 | background-color: var(--button-surface);
58 | color: var(--button-ink);
59 | fill: var(--button-ink);
60 | filter: none;
61 | pointer-events: auto;
62 | }
63 | body:not(.editing) #diff.dirty #revertButton:hover,
64 | body:not(.editing) #diff.dirty #commitButton:hover {
65 | background-color: var(--button-surface-hover);
66 | }
67 |
68 | .codeMirrorContainer {
69 | flex-grow: 1;
70 | }
71 | .CodeMirror-merge, .CodeMirror-merge-pane, .CodeMirror-merge .CodeMirror {
72 | box-sizing: border-box;
73 | height: 100%;
74 | }
75 | body.editing .CodeMirror-merge-copy,
76 | body.editing .CodeMirror-merge-copy-reverse {
77 | display: none;
78 | }
79 | body.editing .CodeMirror-merge-left .CodeMirror {
80 | color: var(--fg-0-60);
81 | }
82 | body.editing .CodeMirror-merge-editor .CodeMirror {
83 | background-color: var(--bg-transient-notice);
84 | }
85 | body[dir="rtl"] .CodeMirror-merge-pane-rightmost {
86 | right: unset;
87 | left: 0;
88 | }
89 |
90 | /* mobile devices */
91 | :root.mobile #diff .tools {
92 | overflow: auto;
93 | }
94 |
--------------------------------------------------------------------------------
/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 0.1em;
9 | position: relative;
10 | user-select: none;
11 | vertical-align: text-bottom;
12 | -webkit-user-select: none;
13 | }
14 | .fa-icon > * {
15 | pointer-events: none;
16 | }
17 | .fa-icon.disabled,
18 | .fa-icon[disabled] {
19 | color: var(--button-disabled-ink);
20 | fill: var(--button-disabled-ink);
21 | filter: var(--button-disabled-filter);
22 | stroke: var(--button-disabled-ink);
23 | pointer-events: none;
24 | }
25 | .fa-icon > .fa-icon-badge,
26 | .fa-icon.disabled > .fa-icon-badge {
27 | visibility: hidden;
28 | }
29 | .fa-icon.fa-icon-badged > .fa-icon-badge {
30 | bottom: -20%;
31 | display: inline-block;
32 | font: 60% sans-serif;
33 | left: calc(100% - 0.2em);
34 | position: absolute;
35 | visibility: visible;
36 | }
37 | .fa-icon.fa-icon-vflipped {
38 | transform: scale(1, -1);
39 | }
40 |
41 | .fa-icon > svg {
42 | height: 1em;
43 | overflow: visible;
44 | width: 1em;
45 | }
46 |
47 | .fa-icon > .fa-icon_bar-chart {
48 | width: calc(1em * 2048 / 1792);
49 | }
50 | .fa-icon > .fa-icon_cloud-download,
51 | .fa-icon > .fa-icon_cloud-upload,
52 | .fa-icon > .fa-icon_cogs,
53 | .fa-icon > .fa-icon_eraser,
54 | .fa-icon > .fa-icon_film {
55 | width: calc(1em * 1920 / 1792);
56 | }
57 | .fa-icon > .fa-icon_code {
58 | width: calc(1em * 1830 / 1792);
59 | }
60 | .fa-icon > .fa-icon_exclamation-triangle {
61 | width: calc(1em * 1794 / 1792);
62 | }
63 | .fa-icon > .fa-icon_clipboard,
64 | .fa-icon > .fa-icon_external-link,
65 | .fa-icon > .fa-icon_eye-dropper,
66 | .fa-icon > .fa-icon_eye-open,
67 | .fa-icon > .fa-icon_eye-slash,
68 | .fa-icon > .fa-icon_files-o,
69 | .fa-icon > .fa-icon_list-alt {
70 | width: calc(1em * 1792 / 1792);
71 | }
72 | .fa-icon > .fa-icon_font,
73 | .fa-icon > .fa-icon_search,
74 | .fa-icon > .fa-icon_spinner,
75 | .fa-icon > .fa-icon_unlink {
76 | width: calc(1em * 1664 / 1792);
77 | }
78 | .fa-icon > .fa-icon_home {
79 | width: calc(1em * 1612 / 1792);
80 | }
81 | .fa-icon > .fa-icon_check {
82 | width: calc(1em * 1550 / 1792);
83 | }
84 | .fa-icon > .fa-icon_cog,
85 | .fa-icon > .fa-icon_clock-o,
86 | .fa-icon > .fa-icon_floppy-o,
87 | .fa-icon > .fa-icon_info-circle,
88 | .fa-icon > .fa-icon_pause-circle-o,
89 | .fa-icon > .fa-icon_play-circle-o,
90 | .fa-icon > .fa-icon_power-off,
91 | .fa-icon > .fa-icon_question-circle,
92 | .fa-icon > .fa-icon_refresh,
93 | .fa-icon > .fa-icon_sliders {
94 | width: calc(1em * 1536 / 1792);
95 | }
96 | .fa-icon > .fa-icon_filter {
97 | width: calc(1em * 1410 / 1792);
98 | }
99 | .fa-icon > .fa-icon_plus,
100 | .fa-icon > .fa-icon_trash-o {
101 | width: calc(1em * 1408 / 1792);
102 | }
103 | .fa-icon > .fa-icon_times {
104 | width: calc(1em * 1188 / 1792);
105 | }
106 | .fa-icon > .fa-icon_angle-up,
107 | .fa-icon > .fa-icon_double-angle-up,
108 | .fa-icon > .fa-icon_lock,
109 | .fa-icon > .fa-icon_unlock-alt {
110 | width: calc(1em * 1152 / 1792);
111 | }
112 | .fa-icon > .fa-icon_double-angle-left {
113 | width: calc(1em * 966 / 1792);
114 | }
115 | .fa-icon > .fa-icon_bolt {
116 | width: calc(1em * 896 / 1792);
117 | }
118 |
--------------------------------------------------------------------------------
/css/fonts/Inter/Inter-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/css/fonts/Inter/Inter-Regular.woff2
--------------------------------------------------------------------------------
/css/fonts/Inter/Inter-SemiBold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/css/fonts/Inter/Inter-SemiBold.woff2
--------------------------------------------------------------------------------
/css/fonts/Inter/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2016-2020 The Inter Project Authors
2 | https://github.com/rsms/inter
3 |
4 | This Font Software is licensed under the SIL Open Font License, Version 1.1.
5 | This license is copied below, and is also available with a FAQ at:
6 | http://scripts.sil.org/OFL
7 |
8 | -----------------------------------------------------------
9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10 | -----------------------------------------------------------
11 |
12 | PREAMBLE
13 | The goals of the Open Font License (OFL) are to stimulate worldwide
14 | development of collaborative font projects, to support the font creation
15 | efforts of academic and linguistic communities, and to provide a free and
16 | open framework in which fonts may be shared and improved in partnership
17 | with others.
18 |
19 | The OFL allows the licensed fonts to be used, studied, modified and
20 | redistributed freely as long as they are not sold by themselves. The
21 | fonts, including any derivative works, can be bundled, embedded,
22 | redistributed and/or sold with any software provided that any reserved
23 | names are not used by derivative works. The fonts and derivatives,
24 | however, cannot be released under any other type of license. The
25 | requirement for fonts to remain under this license does not apply
26 | to any document created using the fonts or their derivatives.
27 |
28 | DEFINITIONS
29 | "Font Software" refers to the set of files released by the Copyright
30 | Holder(s) under this license and clearly marked as such. This may
31 | include source files, build scripts and documentation.
32 |
33 | "Reserved Font Name" refers to any names specified as such after the
34 | copyright statement(s).
35 |
36 | "Original Version" refers to the collection of Font Software components as
37 | distributed by the Copyright Holder(s).
38 |
39 | "Modified Version" refers to any derivative made by adding to, deleting,
40 | or substituting -- in part or in whole -- any of the components of the
41 | Original Version, by changing formats or by porting the Font Software to a
42 | new environment.
43 |
44 | "Author" refers to any designer, engineer, programmer, technical
45 | writer or other person who contributed to the Font Software.
46 |
47 | PERMISSION AND CONDITIONS
48 | Permission is hereby granted, free of charge, to any person obtaining
49 | a copy of the Font Software, to use, study, copy, merge, embed, modify,
50 | redistribute, and sell modified and unmodified copies of the Font
51 | Software, subject to the following conditions:
52 |
53 | 1) Neither the Font Software nor any of its individual components,
54 | in Original or Modified Versions, may be sold by itself.
55 |
56 | 2) Original or Modified Versions of the Font Software may be bundled,
57 | redistributed and/or sold with any software, provided that each copy
58 | contains the above copyright notice and this license. These can be
59 | included either as stand-alone text files, human-readable headers or
60 | in the appropriate machine-readable metadata fields within text or
61 | binary files as long as those fields can be easily viewed by the user.
62 |
63 | 3) No Modified Version of the Font Software may use the Reserved Font
64 | Name(s) unless explicit written permission is granted by the corresponding
65 | Copyright Holder. This restriction only applies to the primary font name as
66 | presented to the users.
67 |
68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69 | Software shall not be used to promote, endorse or advertise any
70 | Modified Version, except to acknowledge the contribution(s) of the
71 | Copyright Holder(s) and the Author(s) or with their explicit written
72 | permission.
73 |
74 | 5) The Font Software, modified or unmodified, in part or in whole,
75 | must be distributed entirely under this license, and must not be
76 | distributed under any other license. The requirement for fonts to
77 | remain under this license does not apply to any document created
78 | using the Font Software.
79 |
80 | TERMINATION
81 | This license becomes null and void if any of the above conditions are
82 | not met.
83 |
84 | DISCLAIMER
85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93 | OTHER DEALINGS IN THE FONT SOFTWARE.
94 |
--------------------------------------------------------------------------------
/css/fonts/Metropolis/Metropolis-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/css/fonts/Metropolis/Metropolis-Regular.woff2
--------------------------------------------------------------------------------
/css/fonts/Metropolis/Metropolis-SemiBold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/css/fonts/Metropolis/Metropolis-SemiBold.woff2
--------------------------------------------------------------------------------
/css/fonts/Metropolis/README.md:
--------------------------------------------------------------------------------
1 | # Metropolis
2 |
3 | A modern, geometric typeface. Influenced by other popular geometric, minimalist sans-serif typefaces of the new millenium. Designed for optimal readability at small point sizes while beautiful at large point sizes.
4 |
5 | 
6 |
7 | ---
8 |
9 | 
10 |
11 | ### Where am I?
12 |
13 | See [Documentation](./Documentation/Documentation.md).
14 |
15 | ### The Unlicense
16 |
17 | Contributions welcome.
18 |
19 | ### Contact
20 |
21 | Reachable via chris.m.simpson [at] icloud.com or tweet @ChrisMSimpson.
22 |
23 | ### Support
24 |
25 | There is none. Oh, you meant support me? I dare you to click the sponsor button above.
26 |
--------------------------------------------------------------------------------
/css/fonts/Metropolis/UNLICENSE:
--------------------------------------------------------------------------------
1 | This is free and unencumbered software released into the public domain.
2 |
3 | Anyone is free to copy, modify, publish, use, compile, sell, or
4 | distribute this software, either in source code form or as a compiled
5 | binary, for any purpose, commercial or non-commercial, and by any
6 | means.
7 |
8 | In jurisdictions that recognize copyright laws, the author or authors
9 | of this software dedicate any and all copyright interest in the
10 | software to the public domain. We make this dedication for the benefit
11 | of the public at large and to the detriment of our heirs and
12 | successors. We intend this dedication to be an overt act of
13 | relinquishment in perpetuity of all present and future rights to this
14 | software under copyright law.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 | OTHER DEALINGS IN THE SOFTWARE.
23 |
24 | For more information, please refer to
25 |
--------------------------------------------------------------------------------
/css/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/css/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/css/logger-ui-inspector.css:
--------------------------------------------------------------------------------
1 | #domInspector {
2 | display: none;
3 | }
4 | #inspectors.dom #domInspector {
5 | display: flex;
6 | }
7 | #domInspector .permatoolbar .highlightMode.invert {
8 | transform: rotate(180deg);
9 | }
10 | #domInspector .vscrollable {
11 | overflow-x: auto;
12 | }
13 | #domInspector > ul:first-of-type {
14 | padding-left: 0.5em;
15 | }
16 | #domInspector ul {
17 | background-color: #fff;
18 | margin: 0;
19 | padding-left: 1em;
20 | }
21 | #domInspector li {
22 | list-style-type: none;
23 | white-space: nowrap;
24 | }
25 | #domInspector li.isCosmeticHide,
26 | #domInspector li.isCosmeticHide ul,
27 | #domInspector li.isCosmeticHide li {
28 | background-color: #fee;
29 | }
30 | #domInspector li > * {
31 | display: inline-block;
32 | line-height: 1.2;
33 | margin-right: 1em;
34 | vertical-align: middle;
35 | }
36 | #domInspector li > span {
37 | color: #aaa;
38 | }
39 | #domInspector li > span:first-child {
40 | color: #000;
41 | cursor: default;
42 | font-size: 1rem;
43 | margin-right: 0;
44 | opacity: 0.5;
45 | padding: 0 4px 0 1px;
46 | visibility: hidden;
47 | }
48 | #domInspector li > span:first-child:hover {
49 | opacity: 1;
50 | }
51 | #domInspector li > *:last-child {
52 | margin-right: 0;
53 | }
54 | #domInspector li > span:first-child:before {
55 | content: '\a0';
56 | }
57 | #domInspector li.branch > span:first-child:before {
58 | content: '\25b8';
59 | visibility: visible;
60 | }
61 | #domInspector li.branch.show > span:first-child:before {
62 | content: '\25be';
63 | }
64 | #domInspector li.branch.hasCosmeticHide > span:first-child:before {
65 | color: red;
66 | }
67 | #domInspector li > code {
68 | cursor: pointer;
69 | font-family: monospace;
70 | overflow: hidden;
71 | text-overflow: ellipsis;
72 | }
73 | #domInspector li > code.off {
74 | text-decoration: line-through;
75 | }
76 | #domInspector li > code.filter {
77 | color: red;
78 | }
79 |
80 | #domInspector li > ul {
81 | display: block;
82 | }
83 | #domInspector li:not(.hasCosmeticHide):not(.isCosmeticHide):not(.show) > ul {
84 | display: none;
85 | }
86 |
87 | #domInspector:not(.vExpanded) li:not(.hasCosmeticHide):not(.isCosmeticHide) {
88 | display: none;
89 | }
90 | #domInspector #domTree > li {
91 | display: block;
92 | }
93 | #domInspector:not(.vExpanded) ul {
94 | display: block;
95 | }
96 | #domInspector li > ul > li:not(.hasCosmeticHide):not(.isCosmeticHide) {
97 | display: none;
98 | }
99 | #domInspector li.show > ul > li:not(.hasCosmeticHide):not(.isCosmeticHide) {
100 | display: block;
101 | }
102 | #domInspector li:not(.hasCosmeticHide):not(.isCosmeticHide) {
103 | display: block;
104 | }
105 | #domInspector.hCompact li > code:first-of-type {
106 | max-width: 12em;
107 | }
108 |
109 | #cosmeticFilteringDialog .dialog {
110 | text-align: center;
111 | }
112 | #cosmeticFilteringDialog .dialog textarea {
113 | height: 40vh;
114 | white-space: pre;
115 | word-wrap: normal;
116 | }
117 |
--------------------------------------------------------------------------------
/css/settings.css:
--------------------------------------------------------------------------------
1 | .synopsis {
2 | font-size: 90%;
3 | }
4 | [href="advanced-settings.html"] {
5 | display: none;
6 | }
7 | body.advancedUser [href="advanced-settings.html"] {
8 | display: inline-flex;
9 | }
10 | #localData > div {
11 | margin-bottom: var(--default-gap-small);
12 | }
13 | #localData > div:last-of-type {
14 | align-items: flex-start;
15 | display: flex;
16 | flex-direction: column;
17 | }
18 | #localData > div:last-of-type > button {
19 | margin-bottom: var(--default-gap-small);
20 | min-width: 280px;
21 | }
22 |
23 | /* Mobile devices */
24 |
25 | :root.mobile #localData {
26 | max-width: 100vw;
27 | }
28 | :root.mobile #localData > div:last-of-type {
29 | align-items: stretch;
30 | }
31 | :root.mobile #localData > div:last-of-type > button {
32 | min-width: unset;
33 | }
34 |
--------------------------------------------------------------------------------
/css/shortcuts.css:
--------------------------------------------------------------------------------
1 | /**
2 | uBlock Origin - a browser extension to block requests.
3 | Copyright (C) 2018-present Raymond Hill
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see {http://www.gnu.org/licenses/}.
17 |
18 | Home: https://github.com/gorhill/uBlock
19 | */
20 |
21 | .commandEntries {
22 | margin: 2em;
23 | }
24 |
25 | .commandEntries td {
26 | padding: 0.5em 0.25em;
27 | }
28 |
29 | .commandEntries td.commandDesc {
30 | text-align: end;
31 | }
32 |
33 | .commandEntries td.commandShortcut {
34 | white-space: nowrap;
35 | }
36 |
37 | .commandEntries td.commandShortcut input {
38 | padding: 0.4em;
39 | }
40 |
41 | .commandEntries td.commandShortcut input:focus {
42 | outline: 2px solid blue;
43 | }
44 |
45 | .commandEntries td.commandShortcut input ~ .commandReset {
46 | cursor: pointer;
47 | font-size: 150%;
48 | padding: 0 0.2em;
49 | vertical-align: middle;
50 | }
51 |
52 | .commandEntries td.commandShortcut input:placeholder-shown ~ .commandReset,
53 | .commandEntries td.commandShortcut input:focus ~ .commandReset {
54 | display: none;
55 | }
56 |
--------------------------------------------------------------------------------
/css/whitelist.css:
--------------------------------------------------------------------------------
1 | html {
2 | height: 100vh;
3 | overflow: hidden;
4 | width: 100vw;
5 | }
6 | body {
7 | display: flex;
8 | flex-direction: column;
9 | height: 100%;
10 | justify-content: stretch;
11 | overflow: hidden;
12 | width: 100%;
13 | }
14 | .body {
15 | flex-shrink: 0;
16 | }
17 | .codeMirrorContainer {
18 | flex-grow: 1;
19 | }
20 | #whitelist {
21 | text-align: left;
22 | }
23 |
--------------------------------------------------------------------------------
/customblock.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/customblock.js
--------------------------------------------------------------------------------
/dashboard.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/default_filters.js:
--------------------------------------------------------------------------------
1 | defaultFilters = [
2 | "http://www.facebook.com/plugins/likebox.php?*",
3 | "*://*.doubleclick.net/*",
4 | "*://partner.googleadservices.com/*",
5 | "*://*.googlesyndication.com/*",
6 | "*://*.google-analytics.com/*",
7 | "*://creative.ak.fbcdn.net/*",
8 | "*://*.adbrite.com/*",
9 | "*://*.exponential.com/*",
10 | "*://*.quantserve.com/*",
11 | "*://*.scorecardresearch.com/*",
12 | "*://*.zedo.com/*",
13 | "*://ad.doubleclick.net/*",
14 | "*://zedo.com/*",
15 | "*://*.zedo.com/*",
16 | "*://*.trafficjunky.com/*",
17 | "*://trafficjunky.com/*",
18 | "*://gstatic.com/*"
19 | ]
--------------------------------------------------------------------------------
/document-blocked.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
22 |
23 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 | •
53 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/dyna-rules.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | uBlock — Dynamic filtering rules
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/icon_32off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/icon_32off.png
--------------------------------------------------------------------------------
/img/cloud.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/img/cloud.png
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/img/help16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/img/help16.png
--------------------------------------------------------------------------------
/img/icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/img/icon_128.png
--------------------------------------------------------------------------------
/img/icon_16-off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/img/icon_16-off.png
--------------------------------------------------------------------------------
/img/icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/img/icon_16.png
--------------------------------------------------------------------------------
/img/icon_32-off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/img/icon_32-off.png
--------------------------------------------------------------------------------
/img/icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/img/icon_32.png
--------------------------------------------------------------------------------
/img/icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/img/icon_64.png
--------------------------------------------------------------------------------
/img/material-design.svg:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/img/photon.svg:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/img/ublock-defs.svg:
--------------------------------------------------------------------------------
1 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/img/ublock.svg:
--------------------------------------------------------------------------------
1 |
2 |
13 |
15 |
18 |
21 |
24 |
25 |
26 |
29 |
36 |
39 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/is-webrtc-supported.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/js/about.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | 'use strict';
4 |
5 |
6 | (async ( ) => {
7 | document.querySelector(
8 | '[href="logger-ui.html"]'
9 | ).addEventListener(
10 | 'click',
11 | self.uBlockDashboard.openOrSelectPage
12 | );
13 |
14 | const appData = await vAPI.messaging.send('dashboard', {
15 | what: 'getAppData',
16 | });
17 | uDom('#aboutNameVer').text(appData.name + ' v' + appData.version);
18 | })();
19 |
--------------------------------------------------------------------------------
/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(document.getElementById('content'), {
34 | autofocus: true,
35 | lineNumbers: true,
36 | lineWrapping: true,
37 | matchBrackets: true,
38 | maxScanLines: 1,
39 | readOnly: true,
40 | styleActiveLine: true,
41 | });
42 |
43 | uBlockDashboard.patchCodeMirrorEditor(cmEditor);
44 |
45 | const details = await vAPI.messaging.send('default', {
46 | what : 'getAssetContent',
47 | url: assetKey,
48 | });
49 | cmEditor.setValue(details && details.content || '');
50 | if ( details.sourceURL ) {
51 | const a = document.querySelector('.cm-search-widget .sourceURL');
52 | a.setAttribute('href', details.sourceURL);
53 | a.setAttribute('title', details.sourceURL);
54 | }
55 | })();
56 |
--------------------------------------------------------------------------------
/js/console.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 | self.log = (function() {
25 | const noopFunc = function() {};
26 | const info = function(s) { console.log(`[uBO] ${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 | print: info,
34 | };
35 | })();
36 |
--------------------------------------------------------------------------------
/js/dashboard.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | 'use strict';
4 |
5 | /******************************************************************************/
6 |
7 | {
8 | // >>>>> start of local scope
9 |
10 | /******************************************************************************/
11 |
12 | const discardUnsavedData = function(synchronous = false) {
13 | const paneFrame = document.getElementById('iframe');
14 | const paneWindow = paneFrame.contentWindow;
15 | if (
16 | typeof paneWindow.hasUnsavedData !== 'function' ||
17 | paneWindow.hasUnsavedData() === false
18 | ) {
19 | return true;
20 | }
21 |
22 | if ( synchronous ) {
23 | return false;
24 | }
25 |
26 | return new Promise(resolve => {
27 | const modal = uDom.nodeFromId('unsavedWarning');
28 | modal.classList.add('on');
29 | modal.focus();
30 |
31 | const onDone = status => {
32 | modal.classList.remove('on');
33 | document.removeEventListener('click', onClick, true);
34 | resolve(status);
35 | };
36 |
37 | const onClick = ev => {
38 | const target = ev.target;
39 | if ( target.matches('[data-i18n="dashboardUnsavedWarningStay"]') ) {
40 | return onDone(false);
41 | }
42 | if ( target.matches('[data-i18n="dashboardUnsavedWarningIgnore"]') ) {
43 | return onDone(true);
44 | }
45 | if ( modal.querySelector('[data-i18n="dashboardUnsavedWarning"]').contains(target) ) {
46 | return;
47 | }
48 | onDone(false);
49 | };
50 |
51 | document.addEventListener('click', onClick, true);
52 | });
53 | };
54 |
55 | const loadDashboardPanel = function(pane, first) {
56 | const tabButton = uDom.nodeFromSelector(`[data-pane="${pane}"]`);
57 | if ( tabButton === null || tabButton.classList.contains('selected') ) {
58 | return;
59 | }
60 | const loadPane = ( ) => {
61 | self.location.replace(`#${pane}`);
62 | uDom('.tabButton.selected').toggleClass('selected', false);
63 | tabButton.classList.add('selected');
64 | tabButton.scrollIntoView();
65 | uDom.nodeFromId('iframe').setAttribute('src', pane);
66 | vAPI.localStorage.setItem('dashboardLastVisitedPane', pane);
67 | };
68 | if ( first ) {
69 | return loadPane();
70 | }
71 | const r = discardUnsavedData();
72 | if ( r === false ) { return; }
73 | if ( r === true ) {
74 | return loadPane();
75 | }
76 | r.then(status => {
77 | if ( status === false ) { return; }
78 | loadPane();
79 | });
80 | };
81 |
82 | const onTabClickHandler = function(ev) {
83 | loadDashboardPanel(ev.target.getAttribute('data-pane'));
84 | };
85 |
86 | // https://github.com/uBlockOrigin/uBlock-issues/issues/106
87 | vAPI.messaging.send('dashboard', {
88 | what: 'canUpdateShortcuts',
89 | }).then(response => {
90 | document.body.classList.toggle('canUpdateShortcuts', response === true);
91 | });
92 |
93 | vAPI.localStorage.getItemAsync('dashboardLastVisitedPane').then(value => {
94 | loadDashboardPanel(value !== null ? value : 'settings.html', true);
95 |
96 | uDom('.tabButton').on('click', onTabClickHandler);
97 |
98 | // https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event
99 | window.addEventListener('beforeunload', ( ) => {
100 | if ( discardUnsavedData(true) ) { return; }
101 | event.preventDefault();
102 | event.returnValue = '';
103 | });
104 | });
105 |
106 | /******************************************************************************/
107 |
108 | // <<<<< end of local scope
109 | }
110 |
--------------------------------------------------------------------------------
/js/fa-icons.js:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 |
3 | uBlock Origin - a browser extension to block 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 ( icon.firstChild === null || icon.firstChild.nodeType !== 3 ) {
30 | continue;
31 | }
32 | const name = icon.firstChild.nodeValue.trim();
33 | if ( name === '' ) { continue; }
34 | const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
35 | const use = document.createElementNS('http://www.w3.org/2000/svg', 'use');
36 | let file;
37 | if ( name.startsWith('ph-') ) {
38 | file = 'photon';
39 | } else if ( name.startsWith('md-') ) {
40 | file = 'material-design';
41 | } else {
42 | file = 'fontawesome/fontawesome-defs';
43 | }
44 | svg.classList.add('fa-icon_' + name);
45 | use.setAttribute('href', `/img/${file}.svg#${name}`);
46 | svg.appendChild(use);
47 | icon.replaceChild(svg, icon.firstChild);
48 | if ( icon.classList.contains('fa-icon-badged') ) {
49 | const badge = document.createElement('span');
50 | badge.className = 'fa-icon-badge';
51 | icon.insertBefore(badge, icon.firstChild.nextSibling);
52 | }
53 | }
54 | };
55 |
56 | faIconsInit();
57 |
--------------------------------------------------------------------------------
/js/is-webrtc-supported.js:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 |
3 | uBlock Origin - a browser extension to block requests.
4 | Copyright (C) 2015 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 | // https://github.com/gorhill/uBlock/issues/533#issuecomment-164292868
23 | // If WebRTC is supported, there won't be an exception if we
24 | // try to instanciate a peer connection object.
25 |
26 | // https://github.com/gorhill/uBlock/issues/533#issuecomment-168097594
27 | // Because Chromium leaks WebRTC connections after they have been closed
28 | // and forgotten, we need to test for WebRTC support inside an iframe, this
29 | // way the closed and forgottetn WebRTC connections are properly garbage
30 | // collected.
31 |
32 | (function() {
33 | 'use strict';
34 |
35 | var pc = null;
36 | try {
37 | var PC = self.RTCPeerConnection || self.webkitRTCPeerConnection;
38 | if ( PC ) {
39 | pc = new PC(null);
40 | }
41 | } catch (ex) {
42 | console.error(ex);
43 | }
44 | if ( pc !== null ) {
45 | pc.close();
46 | }
47 |
48 | window.top.postMessage(
49 | pc !== null ? 'webRTCSupported' : 'webRTCNotSupported',
50 | window.location.origin
51 | );
52 | })();
53 |
--------------------------------------------------------------------------------
/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 | µBlock.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 |
--------------------------------------------------------------------------------
/js/scriptlets/cosmetic-off.js:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 |
3 | uBlock Origin - a browser extension to block requests.
4 | Copyright (C) 2015-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/uBlock
20 | */
21 |
22 | 'use strict';
23 |
24 | /******************************************************************************/
25 |
26 | if ( typeof vAPI === 'object' && vAPI.domFilterer ) {
27 | vAPI.domFilterer.toggle(false);
28 | }
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | /*******************************************************************************
38 |
39 | DO NOT:
40 | - Remove the following code
41 | - Add code beyond the following code
42 | Reason:
43 | - https://github.com/gorhill/uBlock/pull/3721
44 | - uBO never uses the return value from injected content scripts
45 |
46 | **/
47 |
48 | void 0;
49 |
--------------------------------------------------------------------------------
/js/scriptlets/cosmetic-on.js:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 |
3 | uBlock Origin - a browser extension to block requests.
4 | Copyright (C) 2015-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/uBlock
20 | */
21 |
22 | 'use strict';
23 |
24 | /******************************************************************************/
25 |
26 | if ( typeof vAPI === 'object' && vAPI.domFilterer ) {
27 | vAPI.domFilterer.toggle(true);
28 | }
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | /*******************************************************************************
38 |
39 | DO NOT:
40 | - Remove the following code
41 | - Add code beyond the following code
42 | Reason:
43 | - https://github.com/gorhill/uBlock/pull/3721
44 | - uBO never uses the return value from injected content scripts
45 |
46 | **/
47 |
48 | void 0;
49 |
--------------------------------------------------------------------------------
/js/scriptlets/dom-survey-elements.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 | // https://github.com/uBlockOrigin/uBlock-issues/issues/756
27 | // Keep in mind CPU usage with large DOM and/or filterset.
28 |
29 | (( ) => {
30 | if ( typeof vAPI !== 'object' ) { return; }
31 |
32 | const t0 = Date.now();
33 |
34 | if ( vAPI.domSurveyElements instanceof Object === false ) {
35 | vAPI.domSurveyElements = {
36 | busy: false,
37 | hiddenElementCount: Number.NaN,
38 | surveyTime: t0,
39 | };
40 | }
41 | const surveyResults = vAPI.domSurveyElements;
42 |
43 | if ( surveyResults.busy ) { return; }
44 | surveyResults.busy = true;
45 |
46 | if ( surveyResults.surveyTime < vAPI.domMutationTime ) {
47 | surveyResults.hiddenElementCount = Number.NaN;
48 | }
49 | surveyResults.surveyTime = t0;
50 |
51 | if ( isNaN(surveyResults.hiddenElementCount) ) {
52 | surveyResults.hiddenElementCount = (( ) => {
53 | if ( vAPI.domFilterer instanceof Object === false ) { return 0; }
54 | const details = vAPI.domFilterer.getAllSelectors_(true);
55 | if (
56 | Array.isArray(details.declarative) === false ||
57 | details.declarative.length === 0
58 | ) {
59 | return 0;
60 | }
61 | return document.querySelectorAll(
62 | details.declarative.map(entry => entry[0]).join(',')
63 | ).length;
64 | })();
65 | }
66 |
67 | surveyResults.busy = false;
68 |
69 | // IMPORTANT: This is returned to the injector, so this MUST be
70 | // the last statement.
71 | return surveyResults.hiddenElementCount;
72 | })();
73 |
--------------------------------------------------------------------------------
/js/scriptlets/load-large-media-all.js:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 |
3 | uBlock Origin - a browser extension to block requests.
4 | Copyright (C) 2015-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/uBlock
20 | */
21 |
22 | /******************************************************************************/
23 |
24 | (function() {
25 |
26 | 'use strict';
27 |
28 | /******************************************************************************/
29 |
30 | // For all media resources which have failed to load, trigger a reload.
31 |
32 | var elems, i, elem, src;
33 |
34 | // and elements.
35 | // https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement
36 |
37 | elems = document.querySelectorAll('audio,video');
38 | i = elems.length;
39 | while ( i-- ) {
40 | elem = elems[i];
41 | if ( elem.error !== null ) {
42 | elem.load();
43 | }
44 | }
45 |
46 | // elements.
47 | // https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement
48 |
49 | elems = document.querySelectorAll('img');
50 | i = elems.length;
51 | while ( i-- ) {
52 | elem = elems[i];
53 | if ( elem.naturalWidth !== 0 && elem.naturalHeight !== 0 ) {
54 | continue;
55 | }
56 | if ( window.getComputedStyle(elem).getPropertyValue('display') === 'none' ) {
57 | continue;
58 | }
59 | src = elem.getAttribute('src');
60 | if ( src ) {
61 | elem.removeAttribute('src');
62 | elem.setAttribute('src', src);
63 | }
64 | }
65 |
66 | /******************************************************************************/
67 |
68 | })();
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | /*******************************************************************************
78 |
79 | DO NOT:
80 | - Remove the following code
81 | - Add code beyond the following code
82 | Reason:
83 | - https://github.com/gorhill/uBlock/pull/3721
84 | - uBO never uses the return value from injected content scripts
85 |
86 | **/
87 |
88 | void 0;
89 |
--------------------------------------------------------------------------------
/js/scriptlets/noscript-spoof.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 | // Code below has been imported from uMatrix and modified to fit uBO:
23 | // https://github.com/gorhill/uMatrix/blob/3f8794dd899a05e066c24066c6c0a2515d5c60d2/src/js/contentscript.js#L464-L531
24 |
25 | 'use strict';
26 |
27 | /******************************************************************************/
28 |
29 | // https://github.com/gorhill/uMatrix/issues/232
30 | // Force `display` property, Firefox is still affected by the issue.
31 |
32 | (function() {
33 | let noscripts = document.querySelectorAll('noscript');
34 | if ( noscripts.length === 0 ) { return; }
35 |
36 | let redirectTimer,
37 | reMetaContent = /^\s*(\d+)\s*;\s*url=(['"]?)([^'"]+)\2/i,
38 | reSafeURL = /^https?:\/\//;
39 |
40 | let autoRefresh = function(root) {
41 | let meta = root.querySelector('meta[http-equiv="refresh"][content]');
42 | if ( meta === null ) { return; }
43 | let match = reMetaContent.exec(meta.getAttribute('content'));
44 | if ( match === null || match[3].trim() === '' ) { return; }
45 | let url = new URL(match[3], document.baseURI);
46 | if ( reSafeURL.test(url.href) === false ) { return; }
47 | redirectTimer = setTimeout(( ) => {
48 | location.assign(url.href);
49 | },
50 | parseInt(match[1], 10) * 1000 + 1
51 | );
52 | meta.parentNode.removeChild(meta);
53 | };
54 |
55 | let morphNoscript = function(from) {
56 | if ( /^application\/(?:xhtml\+)?xml/.test(document.contentType) ) {
57 | let to = document.createElement('span');
58 | while ( from.firstChild !== null ) {
59 | to.appendChild(from.firstChild);
60 | }
61 | return to;
62 | }
63 | let parser = new DOMParser();
64 | let doc = parser.parseFromString(
65 | '' + from.textContent + ' ',
66 | 'text/html'
67 | );
68 | return document.adoptNode(doc.querySelector('span'));
69 | };
70 |
71 | for ( let noscript of noscripts ) {
72 | let parent = noscript.parentNode;
73 | if ( parent === null ) { continue; }
74 | let span = morphNoscript(noscript);
75 | span.style.setProperty('display', 'inline', 'important');
76 | if ( redirectTimer === undefined ) {
77 | autoRefresh(span);
78 | }
79 | parent.replaceChild(span, noscript);
80 | }
81 | })();
82 |
83 | /******************************************************************************/
84 |
--------------------------------------------------------------------------------
/js/scriptlets/should-inject-contentscript.js:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 |
3 | uBlock Origin - a browser extension to block 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 | 'use strict';
23 |
24 | // If content scripts are already injected, we need to respond with `false`,
25 | // to "should inject content scripts?"
26 | //
27 | // https://github.com/uBlockOrigin/uBlock-issues/issues/403
28 | // If the content script was not boostrapped, give it another try.
29 |
30 | (( ) => {
31 | try {
32 | let status = vAPI.uBO !== true;
33 | if ( status === false && vAPI.bootstrap ) {
34 | self.requestIdleCallback(( ) => vAPI && vAPI.bootstrap());
35 | }
36 | return status;
37 | } catch(ex) {
38 | }
39 | return true;
40 | })();
41 |
--------------------------------------------------------------------------------
/js/scriptlets/subscriber.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 | /* global HTMLDocument */
23 |
24 | 'use strict';
25 |
26 | /******************************************************************************/
27 |
28 | // Injected into specific web pages, those which have been pre-selected
29 | // because they are known to contains `abp:subscribe` links.
30 |
31 | /******************************************************************************/
32 |
33 | (( ) => {
34 |
35 | /******************************************************************************/
36 |
37 | // https://github.com/chrisaljoudi/uBlock/issues/464
38 | if ( document instanceof HTMLDocument === false ) {
39 | //console.debug('subscriber.js > not a HTLMDocument');
40 | return;
41 | }
42 |
43 | // Because in case
44 | if ( typeof vAPI !== 'object' ) {
45 | //console.debug('subscriber.js > vAPI not found');
46 | return;
47 | }
48 |
49 | /******************************************************************************/
50 |
51 | const processSubscription = async function(location, title) {
52 | const details = await vAPI.messaging.send('scriptlets', {
53 | what: 'subscriberData',
54 | });
55 |
56 | const confirmStr = details.confirmStr
57 | .replace('{{url}}', location)
58 | .replace('{{title}}', title);
59 | if ( window.confirm(confirmStr) === false ) { return; }
60 |
61 | await vAPI.messaging.send('scriptlets', {
62 | what: 'applyFilterListSelection',
63 | toImport: location,
64 | });
65 |
66 | vAPI.messaging.send('scriptlets', {
67 | what: 'reloadAllFilters',
68 | });
69 | };
70 |
71 | /******************************************************************************/
72 |
73 | const onMaybeAbpLinkClicked = function(ev) {
74 | if ( ev.button !== 0 ) { return; }
75 | // This addresses https://github.com/easylist/EasyListHebrew/issues/89
76 | // Also, as per feedback to original fix:
77 | // https://github.com/gorhill/uBlock/commit/99a3d9631047d33dc7a454296ab3dd0a1e91d6f1
78 | const target = ev.target;
79 | if (
80 | ev.isTrusted === false ||
81 | target instanceof HTMLAnchorElement === false
82 | ) {
83 | return;
84 | }
85 |
86 | const href = target.href || '';
87 | if ( href === '' ) { return; }
88 |
89 | let matches = /^(?:abp|ubo):\/*subscribe\/*\?location=([^&]+).*title=([^&]+)/.exec(href);
90 | if ( matches === null ) {
91 | matches = /^https?:\/\/.*?[&?]location=([^&]+).*?&title=([^&]+)/.exec(href);
92 | if ( matches === null ) { return; }
93 | }
94 |
95 | const location = decodeURIComponent(matches[1]);
96 | const title = decodeURIComponent(matches[2]);
97 |
98 | processSubscription(location, title);
99 |
100 | ev.stopPropagation();
101 | ev.preventDefault();
102 | };
103 |
104 | /******************************************************************************/
105 |
106 | // Only if at least one subscribe link exists on the page.
107 |
108 | setTimeout(function() {
109 | if (
110 | document.querySelector('link[rel="canonical"][href="https://filterlists.com/"]') !== null ||
111 | document.querySelector('a[href^="abp:"],a[href^="ubo:"],a[href^="https://subscribe.adblockplus.org/?"]') !== null
112 | ) {
113 | document.addEventListener('click', onMaybeAbpLinkClicked);
114 | }
115 | }, 997);
116 |
117 | /******************************************************************************/
118 |
119 | })();
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 | /*******************************************************************************
129 |
130 | DO NOT:
131 | - Remove the following code
132 | - Add code beyond the following code
133 | Reason:
134 | - https://github.com/gorhill/uBlock/pull/3721
135 | - uBO never uses the return value from injected content scripts
136 |
137 | **/
138 |
139 | void 0;
140 |
--------------------------------------------------------------------------------
/js/vapi.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | 'use strict';
4 |
5 |
6 | if ( self.browser instanceof Object ) {
7 | self.chrome = self.browser;
8 | } else {
9 | self.browser = self.chrome;
10 | }
11 |
12 | /******************************************************************************/
13 |
14 |
15 | var vAPI = self.vAPI; // jshint ignore:line
16 |
17 | if (
18 | (
19 | document instanceof HTMLDocument ||
20 | document instanceof XMLDocument &&
21 | document.createElement('div') instanceof HTMLDivElement
22 | ) &&
23 | (
24 | /^image\/|^text\/plain/.test(document.contentType || '') === false
25 | ) &&
26 | (
27 | self.vAPI instanceof Object === false || vAPI.uBO !== true
28 | )
29 | ) {
30 | vAPI = self.vAPI = { uBO: true };
31 | }
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | void 0;
42 |
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/js/wasm/biditrie.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/js/wasm/biditrie.wasm
--------------------------------------------------------------------------------
/js/wasm/hntrie.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/js/wasm/hntrie.wasm
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/codemirror/README.md:
--------------------------------------------------------------------------------
1 | # CodeMirror
2 |
3 | [](https://travis-ci.org/codemirror/CodeMirror)
4 | [](https://www.npmjs.org/package/codemirror)
5 | [](https://gitter.im/codemirror/CodeMirror)
6 |
7 | CodeMirror is a versatile text editor implemented in JavaScript for
8 | the browser. It is specialized for editing code, and comes with over
9 | 100 language modes and various addons that implement more advanced
10 | editing functionality. Every language comes with fully-featured code
11 | and syntax highlighting to help with reading and editing complex code.
12 |
13 | A rich programming API and a CSS theming system are available for
14 | customizing CodeMirror to fit your application, and extending it with
15 | new functionality.
16 |
17 | You can find more information (and the
18 | [manual](https://codemirror.net/doc/manual.html)) on the [project
19 | page](https://codemirror.net). For questions and discussion, use the
20 | [discussion forum](https://discuss.codemirror.net/).
21 |
22 | See
23 | [CONTRIBUTING.md](https://github.com/codemirror/CodeMirror/blob/master/CONTRIBUTING.md)
24 | for contributing guidelines.
25 |
26 | The CodeMirror community aims to be welcoming to everybody. We use the
27 | [Contributor Covenant
28 | (1.1)](http://contributor-covenant.org/version/1/1/0/) as our code of
29 | conduct.
30 |
31 | ### Installation
32 |
33 | Either get the [zip file](https://codemirror.net/codemirror.zip) with
34 | the latest version, or make sure you have [Node](https://nodejs.org/)
35 | installed and run:
36 |
37 | npm install codemirror
38 |
39 | **NOTE**: This is the source repository for the library, and not the
40 | distribution channel. Cloning it is not the recommended way to install
41 | the library, and will in fact not work unless you also run the build
42 | step.
43 |
44 | ### Quickstart
45 |
46 | To build the project, make sure you have Node.js installed (at least version 6)
47 | and then `npm install`. To run, just open `index.html` in your
48 | browser (you don't need to run a webserver). Run the tests with `npm test`.
49 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/codemirror/addon/hint/show-hint.css:
--------------------------------------------------------------------------------
1 | .CodeMirror-hints {
2 | position: absolute;
3 | z-index: 10;
4 | overflow: hidden;
5 | list-style: none;
6 |
7 | margin: 0;
8 | padding: 2px;
9 |
10 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
11 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
12 | box-shadow: 2px 3px 5px rgba(0,0,0,.2);
13 | border-radius: 3px;
14 | border: 1px solid silver;
15 |
16 | background: white;
17 | font-size: 90%;
18 | font-family: monospace;
19 |
20 | max-height: 20em;
21 | overflow-y: auto;
22 | }
23 |
24 | .CodeMirror-hint {
25 | margin: 0;
26 | padding: 0 4px;
27 | border-radius: 2px;
28 | white-space: pre;
29 | color: black;
30 | cursor: pointer;
31 | }
32 |
33 | li.CodeMirror-hint-active {
34 | background: #08f;
35 | color: white;
36 | }
37 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/diff/README.md:
--------------------------------------------------------------------------------
1 | # diff
2 |
3 | implementation of myers diff algorithm
4 |
5 | [](https://travis-ci.org/Swatinem/diff)
6 | [](https://coveralls.io/r/Swatinem/diff)
7 | [](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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/lz4/lz4-block-codec.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/lib/lz4/lz4-block-codec.wasm
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/publicsuffixlist/wasm/publicsuffixlist.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/lib/publicsuffixlist/wasm/publicsuffixlist.wasm
--------------------------------------------------------------------------------
/managed_storage.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/draft-03/schema#",
3 | "type": "object",
4 | "properties": {
5 | "adminSettings": {
6 | "title": "A valid JSON string compliant with uBO's backup format.",
7 | "description": "All entries present will overwrite local settings.",
8 | "type": "string"
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": "ProjHex",
3 | "background": {
4 | "scripts":[
5 | "js/console.js",
6 | "lib/lz4/lz4-block-codec-any.js",
7 | "lib/punycode.js",
8 | "lib/publicsuffixlist/publicsuffixlist.js",
9 | "js/webext.js",
10 | "js/vapi.js",
11 | "js/vapi-common.js",
12 | "js/vapi-background.js",
13 | "js/vapi-webrequest.js",
14 | "js/background.js",
15 | "js/traffic.js",
16 | "js/hntrie.js",
17 | "js/strie.js",
18 | "js/utils.js",
19 | "js/uritools.js",
20 | "js/lz4.js",
21 | "js/cachestorage.js",
22 | "js/assets.js",
23 | "js/filtering-context.js",
24 | "js/redirect-engine.js",
25 | "js/dynamic-net-filtering.js",
26 | "js/url-net-filtering.js",
27 | "js/static-filtering-parser.js",
28 | "js/static-net-filtering.js",
29 | "js/static-ext-filtering.js",
30 | "js/cosmetic-filtering.js",
31 | "js/scriptlet-filtering.js",
32 | "js/html-filtering.js",
33 | "js/hnswitches.js",
34 | "js/ublock.js",
35 | "js/messaging.js",
36 | "js/storage.js",
37 | "js/logger.js",
38 | "js/pagestore.js",
39 | "js/tab.js",
40 | "js/text-encode.js",
41 | "js/contextmenu.js",
42 | "js/reverselookup.js",
43 | "js/start.js",
44 | "js/commands.js",
45 | "default_filters.js",
46 | "block.js",
47 | "imagedata.js",
48 | "background.js"
49 | ],
50 | "persistent": true
51 | },
52 | "browser_action": {
53 | "default_icon": {
54 | "16": "img/icon_16.png",
55 | "32": "img/icon_32.png"
56 | },
57 | "default_popup": "popup-fenix.html",
58 | "default_title": "Barrier"
59 | },
60 | "commands": {
61 | "launch-element-picker": {
62 | "description": "__MSG_popupTipPicker__"
63 | },
64 | "launch-element-zapper": {
65 | "description": "__MSG_popupTipZapper__"
66 | },
67 | "launch-logger": {
68 | "description": "__MSG_popupTipLog__"
69 | },
70 | "open-dashboard": {
71 | "description": "__MSG_popupTipDashboard__"
72 | },
73 | "relax-blocking-mode": {
74 | "description": "__MSG_relaxBlockingMode__"
75 | }
76 | },
77 | "content_scripts": [
78 | {
79 | "all_frames": true,
80 | "js": [
81 | "/js/vapi.js",
82 | "/js/vapi-client.js",
83 | "/js/contentscript.js",
84 | "content.js"
85 | ],
86 | "matches": [
87 | "http://*/*",
88 | "https://*/*"
89 | ],
90 | "run_at": "document_start"
91 | },
92 | {
93 | "all_frames": false,
94 | "js": [
95 | "/js/scriptlets/subscriber.js"
96 | ],
97 | "matches": [
98 | "http://*/*",
99 | "https://*/*"
100 | ],
101 | "run_at": "document_idle"
102 | }
103 | ],
104 | "content_security_policy": "script-src 'self'; object-src 'self'",
105 | "default_locale": "en",
106 | "description": "__MSG_extShortDesc__",
107 | "icons": {
108 | "128": "img/icon_128.png",
109 | "16": "img/icon_16.png",
110 | "32": "img/icon_32.png",
111 | "64": "img/icon_64.png"
112 | },
113 | "incognito": "split",
114 | "manifest_version": 2,
115 | "minimum_chrome_version": "51.0",
116 | "name": "Barrier",
117 | "description": "The only all-in-one privacy extension.",
118 | "options_ui": {
119 | "open_in_tab": true,
120 | "page": "dashboard.html"
121 | },
122 | "permissions": [
123 | "contextMenus",
124 | "privacy",
125 | "storage",
126 | "tabs",
127 | "unlimitedStorage",
128 | "webNavigation",
129 | "webRequest",
130 | "webRequestBlocking",
131 | "cookies",
132 | "",
133 | "contentSettings"
134 | ],
135 | "short_name": "uBlock\u2080",
136 | "storage": {
137 | "managed_schema": "managed_storage.json"
138 | },
139 | "version": "1.0.0",
140 | "web_accessible_resources": [
141 | "/web_accessible_resources/*"
142 | ]
143 | }
144 |
--------------------------------------------------------------------------------
/onInstall.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/onInstall.js
--------------------------------------------------------------------------------
/p.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Barrier
12 |
13 |
14 |
15 |
16 |
Block Third Party Javascript
17 |
18 |
19 |
20 |
21 |
Witty One Line Description.
22 |
23 |
24 |
25 |
Block Third Party Cookies
26 |
27 |
28 |
29 |
30 |
Witty One Line Description.
31 |
32 |
33 |
34 |
35 |
Block All Advertisements
36 |
37 |
38 |
39 |
40 |
41 |
42 |
Witty One Line Description.
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/privacy.md:
--------------------------------------------------------------------------------
1 | Privacy Policy
2 | The Barrier Privacy Extension (referred to simply as “Barrier” from now on) does not track users at all. No usage statistics are collected.
3 |
4 | Barrier is a completely local application: A user’s whitelist is stored on the client browser’s local storage, never on a server. A user’s blocking configuration is stored on the client browser’s local storage, never on a server.
5 |
6 | Barrier’s source code is available on GitHub.com through GitHub Inc., a subsidiary of Microsoft. Barrier has no business ties to Github Inc. or Microsoft.
7 |
--------------------------------------------------------------------------------
/privacyExtension.code-workspace:
--------------------------------------------------------------------------------
1 | {
2 | "folders": [
3 | {
4 | "path": "."
5 | }
6 | ],
7 | "settings": {}
8 | }
--------------------------------------------------------------------------------
/shareIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/shareIcon.png
--------------------------------------------------------------------------------
/shortcuts.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | uBlock Origin — Keyboard shortcuts
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/styles.css:
--------------------------------------------------------------------------------
1 | .switch {
2 | position: relative;
3 | display: inline-block;
4 | width: 38.88px;
5 | height: 21.6px;
6 | }
7 |
8 | .switch input {
9 | opacity: 0;
10 | width: 0;
11 | height: 0;
12 | }
13 |
14 | .slider {
15 | position: absolute;
16 | cursor: pointer;
17 | top: 0;
18 | left: 0;
19 | right: 0;
20 | bottom: 0;
21 | background-color: red;
22 | -webkit-transition: .4s;
23 | transition: .4s;
24 | }
25 |
26 | .slider:before {
27 | position: absolute;
28 | content: "";
29 | height: 16.939px;
30 | width: 16.939px;
31 | left: 2.11px;
32 | bottom: 2.11px;
33 | background-color: white;
34 | -webkit-transition: .4s;
35 | transition: .4s;
36 | }
37 |
38 | input:checked + .slider {
39 | background-color: #2196F3;
40 | }
41 |
42 | input:focus + .slider {
43 | box-shadow: 0 0 1px #2196F3;
44 | }
45 |
46 | input:checked + .slider:before {
47 | -webkit-transform: translateX(16.939px);
48 | -ms-transform: translateX(16.939px);
49 | transform: translateX(16.939px);
50 | }
51 |
52 | .slider.round {
53 | border-radius: 30.6px;
54 | }
55 |
56 | .slider.round:before {
57 | border-radius: 50%;
58 | }
59 |
60 |
61 |
62 |
63 | .thirdPartyJSSection {
64 | white-space: nowrap;
65 | border-top: solid;
66 |
67 | }
68 |
69 | .thirdPartyJSLabel {
70 | position: relative;
71 | top:3px;
72 | margin-top:5px;
73 | display: inline-block;
74 | font-family: 'Roboto', sans-serif;
75 | font-size: 17px;
76 | margin-right: 3px;
77 | }
78 |
79 | .thirdPartyJSToggle {
80 | margin-bottom: 10px;
81 |
82 | display: inline-block;
83 |
84 | }
85 |
86 | .thirdPartyJSDescription {
87 | color:green;
88 | text-align: center;
89 | position: relative;
90 | top:-8px;
91 | font-size:15px;
92 | }
93 |
94 |
95 |
96 | .statusSection {
97 | white-space: nowrap;
98 |
99 | }
100 |
101 | .logo {
102 | margin-left: 20px;
103 | display: inline-block;
104 | }
105 |
106 | .logoText {
107 | position: absolute;
108 | margin-left: 30px;
109 | text-align: center;
110 | display: inline-block;
111 | top:15px;
112 | }
113 |
114 | .shareIcon {
115 | position: absolute;
116 | right:5px;
117 |
118 | }
119 |
120 |
121 |
122 | .thirdPartyCookiesSection {
123 | white-space: nowrap;
124 | }
125 |
126 | .thirdPartyCookiesLabel {
127 | display: inline-block;
128 | font-family: 'Roboto', sans-serif;
129 | font-size: 17px;
130 | margin-right:21px;
131 | position: relative;
132 | top:-12px;
133 | }
134 |
135 | .thirdPartyCookiesToggle {
136 | display: inline-block;
137 | position: relative;
138 | top: -16px;
139 |
140 |
141 | }
142 |
143 | .thirdPartyCookiesDescription {
144 | position: relative;
145 | color:green;
146 | font-size:15px;
147 | text-align: center;
148 | top:-16px; ;
149 | }
150 |
151 |
152 |
153 |
154 | .advertisementBlockerSection {
155 | white-space: nowrap;
156 | border-bottom: solid;
157 | height:75px;
158 | }
159 |
160 | .advertisementBlockerLabel {
161 | display: inline-block;
162 | font-family: 'Roboto', sans-serif;
163 | font-size: 17px;
164 | margin-right:26px;
165 | position: relative;
166 | top:-12px;
167 | }
168 |
169 | .advertisementBlockerToggle {
170 | display: inline-block;
171 | position: relative;
172 | top: -16px;
173 | }
174 |
175 | .advertisementBlockerDescription {
176 | position: relative;
177 | color:green;
178 | font-size:15px;
179 | text-align: center;
180 | top:-20px;
181 | }
182 |
183 |
184 |
185 | .arrow {
186 | border: solid black;
187 | border-width: 0 6px 6px 0;
188 | display: inline-block;
189 | padding: 6px;
190 |
191 | }
192 |
193 | .down {
194 | position: relative;
195 | font-size:18px;
196 | color:red;
197 | align-items: center;
198 | transform: rotate(45deg);
199 | -webkit-transform: rotate(45deg);
200 | }
201 |
202 | .seeMore {
203 | text-align: center;
204 | margin-left:10px;
205 |
206 | }
207 |
208 | #arrowLabel {
209 | background-color: Transparent;
210 | background-repeat:no-repeat;
211 | border: none;
212 | cursor:pointer;
213 | overflow: hidden;
214 | outline:none;
215 | position: relative;
216 | font-size:18px;
217 | color:black;
218 | left:-10px;
219 |
220 | }
221 |
222 |
223 |
224 |
225 | .footer {
226 | white-space: nowrap;
227 |
228 | }
229 |
230 | body {
231 | background-color: #fdfdfd;
232 |
233 | }
--------------------------------------------------------------------------------
/web_accessible_resources/1x1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/web_accessible_resources/1x1.gif
--------------------------------------------------------------------------------
/web_accessible_resources/2x2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/web_accessible_resources/2x2.png
--------------------------------------------------------------------------------
/web_accessible_resources/32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/web_accessible_resources/32x32.png
--------------------------------------------------------------------------------
/web_accessible_resources/3x2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/web_accessible_resources/3x2.png
--------------------------------------------------------------------------------
/web_accessible_resources/README.txt:
--------------------------------------------------------------------------------
1 | IMPORTANT
2 |
3 | Content of this folder cannot be accessed without the internal secret token
4 | created each time uBlock Origin is launched.
5 |
6 | Any fetch operation made without uBlock Origin's internal secret will result
7 | in failure. This means that despite the content of the folder here declared as
8 | "web accessible resources", it still cannot be seen by the outside world.
9 |
10 | Only uBlock Origin knows the secret token at runtime and hence only
11 | uBlock Origin can access the content of this folder.
12 |
--------------------------------------------------------------------------------
/web_accessible_resources/addthis_widget.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 | (function() {
23 | 'use strict';
24 | const noopfn = function() {
25 | };
26 | window.addthis = {
27 | addEventListener: noopfn,
28 | button: noopfn,
29 | init: noopfn,
30 | layers: noopfn,
31 | ready: noopfn,
32 | sharecounters: {
33 | getShareCounts: noopfn
34 | },
35 | toolbox: noopfn,
36 | update: noopfn
37 | };
38 | })();
39 |
--------------------------------------------------------------------------------
/web_accessible_resources/amazon_ads.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 | (function() {
23 | 'use strict';
24 | if ( amznads ) {
25 | return;
26 | }
27 | var w = window;
28 | var noopfn = function() {
29 | ;
30 | }.bind();
31 | var amznads = {
32 | appendScriptTag: noopfn,
33 | appendTargetingToAdServerUrl: noopfn,
34 | appendTargetingToQueryString: noopfn,
35 | clearTargetingFromGPTAsync: noopfn,
36 | doAllTasks: noopfn,
37 | doGetAdsAsync: noopfn,
38 | doTask: noopfn,
39 | detectIframeAndGetURL: noopfn,
40 | getAds: noopfn,
41 | getAdsAsync: noopfn,
42 | getAdForSlot: noopfn,
43 | getAdsCallback: noopfn,
44 | getDisplayAds: noopfn,
45 | getDisplayAdsAsync: noopfn,
46 | getDisplayAdsCallback: noopfn,
47 | getKeys: noopfn,
48 | getReferrerURL: noopfn,
49 | getScriptSource: noopfn,
50 | getTargeting: noopfn,
51 | getTokens: noopfn,
52 | getValidMilliseconds: noopfn,
53 | getVideoAds: noopfn,
54 | getVideoAdsAsync: noopfn,
55 | getVideoAdsCallback: noopfn,
56 | handleCallBack: noopfn,
57 | hasAds: noopfn,
58 | renderAd: noopfn,
59 | saveAds: noopfn,
60 | setTargeting: noopfn,
61 | setTargetingForGPTAsync: noopfn,
62 | setTargetingForGPTSync: noopfn,
63 | tryGetAdsAsync: noopfn,
64 | updateAds: noopfn
65 | };
66 | w.amznads = amznads;
67 | w.amzn_ads = w.amzn_ads || noopfn;
68 | w.aax_write = w.aax_write || noopfn;
69 | w.aax_render_ad = w.aax_render_ad || noopfn;
70 | })();
71 |
--------------------------------------------------------------------------------
/web_accessible_resources/amazon_apstag.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 | // https://www.reddit.com/r/uBlockOrigin/comments/ghjqph/
23 | // https://github.com/NanoMeow/QuickReports/issues/3717
24 |
25 | (function() {
26 | 'use strict';
27 | const w = window;
28 | const noopfn = function() {
29 | ; // jshint ignore:line
30 | }.bind();
31 | const apstag = {
32 | fetchBids: function(a, b) {
33 | if ( b instanceof Function ) {
34 | b([]);
35 | }
36 | },
37 | init: noopfn,
38 | setDisplayBids: noopfn,
39 | targetingKeys: noopfn,
40 | };
41 | w.apstag = apstag;
42 | })();
43 |
--------------------------------------------------------------------------------
/web_accessible_resources/ampproject_v0.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 | (function() {
23 | 'use strict';
24 | const head = document.head;
25 | if ( !head ) { return; }
26 | const style = document.createElement('style');
27 | style.textContent = [
28 | 'body {',
29 | ' animation: none !important;',
30 | ' overflow: unset !important;',
31 | '}'
32 | ].join('\n');
33 | head.appendChild(style);
34 | })();
35 |
--------------------------------------------------------------------------------
/web_accessible_resources/chartbeat.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 | (function() {
23 | 'use strict';
24 | const noopfn = function() {
25 | };
26 | window.pSUPERFLY = {
27 | activity: noopfn,
28 | virtualPage: noopfn
29 | };
30 | })();
31 |
--------------------------------------------------------------------------------
/web_accessible_resources/disqus_embed.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 | (function() {
23 | 'use strict';
24 | const p = document.getElementById(window.disqus_container_id || 'disqus_thread');
25 | if ( p === null ) { return; }
26 | const b = document.createElement('button');
27 | b.textContent = 'Disqus blocked by uBlock Origin: click to unblock';
28 | b.type = 'button';
29 | p.appendChild(b);
30 | const loadDisqus = function(ev) {
31 | b.remove();
32 | let disqusScript =
33 | document.querySelector('script[src$=".disqus.com/embed.js"]');
34 | let newScript;
35 | if ( disqusScript !== null ) {
36 | disqusScript.remove();
37 | newScript = document.createElement('script');
38 | if ( disqusScript.hasAttributes() ) {
39 | const attrs = disqusScript.attributes;
40 | for ( let i = 0; i < attrs.length; i++ ) {
41 | const attr = attrs[i];
42 | newScript.setAttribute(attr.name, attr.value);
43 | }
44 | }
45 | } else if ( typeof self.disqus_shortname === 'string' ) {
46 | newScript = document.createElement('script');
47 | newScript.async = true;
48 | newScript.src = `//${self.disqus_shortname}.disqus.com/embed.js`;
49 | }
50 | if ( newScript === undefined ) { return; }
51 | const t = Date.now().toString();
52 | newScript.src += '?_=1457540' + t.slice(-6);
53 | document.body.appendChild(newScript);
54 | ev.preventDefault();
55 | ev.stopPropagation();
56 | };
57 | b.addEventListener('click', loadDisqus, { once: true });
58 | })();
59 |
--------------------------------------------------------------------------------
/web_accessible_resources/disqus_forums_embed.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 | Completely experimental: load Disqus on demand only. Purpose is to avoid
22 | connecting to Disqus' servers, unless the user explicitly asks for the
23 | comments to be loaded.
24 | Works with following filters:
25 | ||disqus.com/forums/*embed.js$script,redirect=disqus.com/forums/*embed.js
26 | ||disqus.com/embed.js$script,redirect=disqus.com/embed.js
27 | ||disqus.com/count.js$script
28 | @@||disqus.com/embed.js?_=1457540*$script
29 | If you want a site you regularly visit to always have the comment loaded,
30 | just use an exception static filter. Example for wired.com:
31 | @@||wired.disqus.com/embed.js
32 |
33 | */
34 |
35 | (function() {
36 | 'use strict';
37 | const ee = document.getElementsByTagName('script');
38 | let i = ee.length, src;
39 | while ( i-- ) {
40 | src = ee[i].src || '';
41 | if ( src === '' ) {
42 | continue;
43 | }
44 | if ( src.lastIndexOf('disqus.com/embed.js') === (src.length - 19) ) {
45 | return;
46 | }
47 | }
48 | const e = document.createElement('script');
49 | e.async = true;
50 | e.src = '//' + window.disqus_shortname + '.disqus.com/embed.js';
51 | document.body.appendChild(e);
52 | })();
53 |
--------------------------------------------------------------------------------
/web_accessible_resources/doubleclick_instream_ad_status.js:
--------------------------------------------------------------------------------
1 | window.google_ad_status = 1;
2 |
--------------------------------------------------------------------------------
/web_accessible_resources/empty:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/web_accessible_resources/empty
--------------------------------------------------------------------------------
/web_accessible_resources/google-analytics_analytics.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 | (function() {
23 | 'use strict';
24 | // https://developers.google.com/analytics/devguides/collection/analyticsjs/
25 | const noopfn = function() {
26 | };
27 | const noopnullfn = function() {
28 | return null;
29 | };
30 | //
31 | const Tracker = function() {
32 | };
33 | const p = Tracker.prototype;
34 | p.get = noopfn;
35 | p.set = noopfn;
36 | p.send = noopfn;
37 | //
38 | const w = window;
39 | const gaName = w.GoogleAnalyticsObject || 'ga';
40 | const gaQueue = w[gaName];
41 | const ga = function() {
42 | const len = arguments.length;
43 | if ( len === 0 ) { return; }
44 | const args = Array.from(arguments);
45 | let fn;
46 | let a = args[len-1];
47 | if ( a instanceof Object && a.hitCallback instanceof Function ) {
48 | fn = a.hitCallback;
49 | } else {
50 | const pos = args.indexOf('hitCallback');
51 | if ( pos !== -1 && args[pos+1] instanceof Function ) {
52 | fn = args[pos+1];
53 | }
54 | }
55 | if ( fn instanceof Function === false ) { return; }
56 | try {
57 | fn();
58 | } catch (ex) {
59 | }
60 | };
61 | ga.create = function() {
62 | return new Tracker();
63 | };
64 | ga.getByName = noopnullfn;
65 | ga.getAll = function() {
66 | return [];
67 | };
68 | ga.remove = noopfn;
69 | // https://github.com/uBlockOrigin/uAssets/issues/2107
70 | ga.loaded = true;
71 | w[gaName] = ga;
72 | // https://github.com/gorhill/uBlock/issues/3075
73 | const dl = w.dataLayer;
74 | if ( dl instanceof Object && dl.hide instanceof Object && typeof dl.hide.end === 'function' ) {
75 | dl.hide.end();
76 | }
77 | // empty ga queue
78 | if ( gaQueue instanceof Function && Array.isArray(gaQueue.q) ) {
79 | for ( const entry of gaQueue.q ) {
80 | ga(...entry);
81 | }
82 | }
83 | })();
84 |
--------------------------------------------------------------------------------
/web_accessible_resources/google-analytics_cx_api.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 | (function() {
23 | 'use strict';
24 | const noopfn = function() {
25 | };
26 | window.cxApi = {
27 | chooseVariation: function() {
28 | return 0;
29 | },
30 | getChosenVariation: noopfn,
31 | setAllowHash: noopfn,
32 | setChosenVariation: noopfn,
33 | setCookiePath: noopfn,
34 | setDomainName: noopfn
35 | };
36 | })();
37 |
--------------------------------------------------------------------------------
/web_accessible_resources/google-analytics_inpage_linkid.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 | (function() {
23 | 'use strict';
24 | window._gaq = window._gaq || {
25 | push: function() {
26 | }
27 | };
28 | })();
29 |
--------------------------------------------------------------------------------
/web_accessible_resources/googlesyndication_adsbygoogle.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 | (function() {
23 | 'use strict';
24 | window.adsbygoogle = window.adsbygoogle || {
25 | length: 0,
26 | loaded: true,
27 | push: function Si() {
28 | /*
29 | client = client || google_ad_client || google_ad_client;
30 | slotname = slotname || google_ad_slot;
31 | tag_origin = tag_origin || google_tag_origin
32 | */
33 | this.length += 1;
34 | }
35 | };
36 | const phs = document.querySelectorAll('.adsbygoogle');
37 | const css = 'height:1px!important;max-height:1px!important;max-width:1px!important;width:1px!important;';
38 | for ( let i = 0; i < phs.length; i++ ) {
39 | const fr = document.createElement('iframe');
40 | const id = `aswift_${(i+1)}`;
41 | if ( document.querySelector(`iframe#${id}`) !== null ) { continue; }
42 | fr.id = id;
43 | fr.style = css;
44 | const cfr = document.createElement('iframe');
45 | cfr.id = `google_ads_frame${i}`;
46 | fr.appendChild(cfr);
47 | document.body.appendChild(fr);
48 | }
49 | })();
50 |
--------------------------------------------------------------------------------
/web_accessible_resources/googletagmanager_gtm.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 | (function() {
23 | 'use strict';
24 | const noopfn = function() {
25 | };
26 | const w = window;
27 | w.ga = w.ga || noopfn;
28 | const dl = w.dataLayer;
29 | if ( dl instanceof Object === false ) { return; }
30 | if ( dl.hide instanceof Object && typeof dl.hide.end === 'function' ) {
31 | dl.hide.end();
32 | }
33 | if ( typeof dl.push === 'function' ) {
34 | dl.push = function(o) {
35 | if (
36 | o instanceof Object &&
37 | typeof o.eventCallback === 'function'
38 | ) {
39 | setTimeout(o.eventCallback, 1);
40 | }
41 | };
42 | }
43 | })();
44 |
--------------------------------------------------------------------------------
/web_accessible_resources/hd-main.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 | (function() {
23 | 'use strict';
24 | const l = {};
25 | const noopfn = function() {
26 | };
27 | const props = [
28 | "$j","Ad","Bd","Cd","Dd","Ed","Fd","Gd","Hd","Id","Jd","Nj","Oc","Pc","Pe",
29 | "Qc","Qe","Rc","Re","Ri","Sc","Tc","Uc","Vc","Wc","Wg","Xc","Xg","Yc","Yd",
30 | "ad","ae","bd","bf","cd","dd","ed","ef","ek","fd","fg","fh","fk","gd","hd",
31 | "ig","ij","jd","kd","ke","ld","md","mi","nd","od","oh","pd","pf","qd","rd",
32 | "sd","td","ud","vd","wd","wg","xd","xh","yd","zd",
33 | "$d","$e","$k","Ae","Af","Aj","Be","Ce","De","Ee","Ek","Eo","Ep","Fe","Fo",
34 | "Ge","Gh","Hk","Ie","Ip","Je","Ke","Kk","Kq","Le","Lh","Lk","Me","Mm","Ne",
35 | "Oe","Pe","Qe","Re","Rp","Se","Te","Ue","Ve","Vp","We","Xd","Xe","Yd","Ye",
36 | "Zd","Ze","Zf","Zk","ae","af","al","be","bf","bg","ce","cp","df","di","ee",
37 | "ef","fe","ff","gf","gm","he","hf","ie","je","jf","ke","kf","kl","le","lf",
38 | "lk","mf","mg","mn","nf","oe","of","pe","pf","pg","qe","qf","re","rf","se",
39 | "sf","te","tf","ti","ue","uf","ve","vf","we","wf","wg","wi","xe","ye","yf",
40 | "yk","yl","ze","zf","zk"
41 | ];
42 | for ( let i = 0; i < props.length; i++ ) {
43 | l[props[i]] = noopfn;
44 | }
45 | window.L = window.J = l;
46 | })();
47 |
--------------------------------------------------------------------------------
/web_accessible_resources/ligatus_angular-tag.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 | (function() {
23 | 'use strict';
24 | self.adProtect = true;
25 | Object.defineProperties(window, {
26 | uabpdl: { value: true },
27 | uabDetect: { value: true }
28 | });
29 | })();
30 |
--------------------------------------------------------------------------------
/web_accessible_resources/monkeybroker.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 | (function() {
23 | 'use strict';
24 | const noopfn = function() {
25 | };
26 | window.pbjs = { libLoaded: true };
27 | const mb = window.MonkeyBroker || {
28 | addAttribute: noopfn,
29 | addSlot: function(a) {
30 | this.slots[a.slot] = {};
31 | },
32 | defineSlot: noopfn,
33 | fillSlot: noopfn,
34 | go: noopfn,
35 | inventoryConditionalPlacement: noopfn,
36 | registerSizeCallback: noopfn,
37 | registerSlotCallback: noopfn,
38 | slots: {},
39 | version: ''
40 | };
41 | mb.regSlotsMap = mb.slots;
42 | window.MonkeyBroker = mb;
43 | })();
44 |
--------------------------------------------------------------------------------
/web_accessible_resources/nobab.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 | (function() {
23 | 'use strict';
24 | const signatures = [
25 | [ 'blockadblock' ],
26 | [ 'babasbm' ],
27 | [ /getItem\('babn'\)/ ],
28 | [
29 | 'getElementById',
30 | 'String.fromCharCode',
31 | 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',
32 | 'charAt',
33 | 'DOMContentLoaded',
34 | 'AdBlock',
35 | 'addEventListener',
36 | 'doScroll',
37 | 'fromCharCode',
38 | '<<2|r>>4',
39 | 'sessionStorage',
40 | 'clientWidth',
41 | 'localStorage',
42 | 'Math',
43 | 'random'
44 | ],
45 | ];
46 | const check = function(s) {
47 | for ( let i = 0; i < signatures.length; i++ ) {
48 | const tokens = signatures[i];
49 | let match = 0;
50 | for ( let j = 0; j < tokens.length; j++ ) {
51 | const token = tokens[j];
52 | const pos = token instanceof RegExp
53 | ? s.search(token)
54 | : s.indexOf(token);
55 | if ( pos !== -1 ) { match += 1; }
56 | }
57 | if ( (match / tokens.length) >= 0.8 ) { return true; }
58 | }
59 | return false;
60 | };
61 | window.eval = new Proxy(window.eval, { // jshint ignore: line
62 | apply: function(target, thisArg, args) {
63 | const a = args[0];
64 | if ( typeof a !== 'string' || !check(a) ) {
65 | return target.apply(thisArg, args);
66 | }
67 | if ( document.body ) {
68 | document.body.style.removeProperty('visibility');
69 | }
70 | let el = document.getElementById('babasbmsgx');
71 | if ( el ) {
72 | el.parentNode.removeChild(el);
73 | }
74 | }
75 | });
76 | window.setTimeout = new Proxy(window.setTimeout, {
77 | apply: function(target, thisArg, args) {
78 | const a = args[0];
79 | if (
80 | typeof a !== 'string' ||
81 | /\.bab_elementid.$/.test(a) === false
82 | ) {
83 | return target.apply(thisArg, args);
84 | }
85 | }
86 | });
87 | })();
88 |
--------------------------------------------------------------------------------
/web_accessible_resources/noeval-silent.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 | (function() {
23 | 'use strict';
24 | window.eval = new Proxy(window.eval, { // jshint ignore: line
25 | apply: function() {
26 | }
27 | });
28 | })();
29 |
--------------------------------------------------------------------------------
/web_accessible_resources/noeval.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 | (function() {
23 | 'use strict';
24 | const log = console.log.bind(console);
25 | window.eval = new Proxy(window.eval, { // jshint ignore: line
26 | apply: function(target, thisArg, args) {
27 | log(`Document tried to eval... ${args[0]}\n`);
28 | }
29 | });
30 | })();
31 |
--------------------------------------------------------------------------------
/web_accessible_resources/nofab.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 | (function() {
23 | 'use strict';
24 | const noopfn = function() {
25 | };
26 | const Fab = function() {};
27 | Fab.prototype.check = noopfn;
28 | Fab.prototype.clearEvent = noopfn;
29 | Fab.prototype.emitEvent = noopfn;
30 | Fab.prototype.on = function(a, b) {
31 | if ( !a ) { b(); }
32 | return this;
33 | };
34 | Fab.prototype.onDetected = function() {
35 | return this;
36 | };
37 | Fab.prototype.onNotDetected = function(a) {
38 | a();
39 | return this;
40 | };
41 | Fab.prototype.setOption = noopfn;
42 | const fab = new Fab(),
43 | getSetFab = {
44 | get: function() { return Fab; },
45 | set: function() {}
46 | },
47 | getsetfab = {
48 | get: function() { return fab; },
49 | set: function() {}
50 | };
51 | if ( window.hasOwnProperty('FuckAdBlock') ) { window.FuckAdBlock = Fab; }
52 | else { Object.defineProperty(window, 'FuckAdBlock', getSetFab); }
53 | if ( window.hasOwnProperty('BlockAdBlock') ) { window.BlockAdBlock = Fab; }
54 | else { Object.defineProperty(window, 'BlockAdBlock', getSetFab); }
55 | if ( window.hasOwnProperty('SniffAdBlock') ) { window.SniffAdBlock = Fab; }
56 | else { Object.defineProperty(window, 'SniffAdBlock', getSetFab); }
57 | if ( window.hasOwnProperty('fuckAdBlock') ) { window.fuckAdBlock = fab; }
58 | else { Object.defineProperty(window, 'fuckAdBlock', getsetfab); }
59 | if ( window.hasOwnProperty('blockAdBlock') ) { window.blockAdBlock = fab; }
60 | else { Object.defineProperty(window, 'blockAdBlock', getsetfab); }
61 | if ( window.hasOwnProperty('sniffAdBlock') ) { window.sniffAdBlock = fab; }
62 | else { Object.defineProperty(window, 'sniffAdBlock', getsetfab); }
63 | })();
64 |
--------------------------------------------------------------------------------
/web_accessible_resources/noop-0.1s.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/web_accessible_resources/noop-0.1s.mp3
--------------------------------------------------------------------------------
/web_accessible_resources/noop-1s.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karlkanhai/privacyExtension/aa4325510100132b9ec4f22f16860d7222452c5f/web_accessible_resources/noop-1s.mp4
--------------------------------------------------------------------------------
/web_accessible_resources/noop.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/web_accessible_resources/noop.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | 'use strict';
3 | })();
4 |
--------------------------------------------------------------------------------
/web_accessible_resources/noop.txt:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/web_accessible_resources/outbrain-widget.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 | (function() {
23 | 'use strict';
24 | const noopfn = function() {
25 | };
26 | const obr = {};
27 | const methods = [
28 | 'callClick', 'callLoadMore', 'callRecs', 'callUserZapping',
29 | 'callWhatIs', 'cancelRecommendation', 'cancelRecs', 'closeCard',
30 | 'closeModal', 'closeTbx', 'errorInjectionHandler', 'getCountOfRecs',
31 | 'getStat', 'imageError', 'manualVideoClicked', 'onOdbReturn',
32 | 'onVideoClick', 'pagerLoad', 'recClicked', 'refreshSpecificWidget',
33 | 'refreshWidget', 'reloadWidget', 'researchWidget', 'returnedError',
34 | 'returnedHtmlData', 'returnedIrdData', 'returnedJsonData', 'scrollLoad',
35 | 'showDescription', 'showRecInIframe', 'userZappingMessage', 'zappingFormAction'
36 | ];
37 | obr.extern = {
38 | video: {
39 | getVideoRecs: noopfn,
40 | videoClicked: noopfn
41 | }
42 | };
43 | methods.forEach(function(a) {
44 | obr.extern[a] = noopfn;
45 | });
46 | window.OBR = window.OBR || obr;
47 | })();
48 |
--------------------------------------------------------------------------------
/web_accessible_resources/popads-dummy.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 | (function() {
23 | 'use strict';
24 | delete window.PopAds;
25 | delete window.popns;
26 | Object.defineProperties(window, {
27 | PopAds: { value: {} },
28 | popns: { value: {} }
29 | });
30 | })();
31 |
--------------------------------------------------------------------------------
/web_accessible_resources/popads.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 | (function() {
23 | 'use strict';
24 | const magic = String.fromCharCode(Date.now() % 26 + 97) +
25 | Math.floor(Math.random() * 982451653 + 982451653).toString(36);
26 | const oe = window.onerror;
27 | window.onerror = function(msg, src, line, col, error) {
28 | if ( typeof msg === 'string' && msg.indexOf(magic) !== -1 ) { return true; }
29 | if ( oe instanceof Function ) {
30 | return oe(msg, src, line, col, error);
31 | }
32 | }.bind();
33 | const throwMagic = function() { throw magic; };
34 | delete window.PopAds;
35 | delete window.popns;
36 | Object.defineProperties(window, {
37 | PopAds: { set: throwMagic },
38 | popns: { set: throwMagic }
39 | });
40 | })();
41 |
--------------------------------------------------------------------------------
/web_accessible_resources/scorecardresearch_beacon.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 | (function() {
23 | 'use strict';
24 | window.COMSCORE = {
25 | purge: function() {
26 | window._comscore = [];
27 | },
28 | beacon: function() {
29 | }
30 | };
31 | })();
32 |
--------------------------------------------------------------------------------
/web_accessible_resources/window.open-defuser.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 | (function() {
23 | 'use strict';
24 | let arg1 = '{{1}}';
25 | if ( arg1 === '{{1}}' ) { arg1 = ''; }
26 | let arg2 = '{{2}}';
27 | if ( arg2 === '{{2}}' ) { arg2 = ''; }
28 | let arg3 = '{{3}}';
29 | if ( arg3 === '{{3}}' ) { arg3 = ''; }
30 | const log = arg3 !== ''
31 | ? console.log.bind(console)
32 | : ( ) => { };
33 | const newSyntax = /^[01]?$/.test(arg1) === false;
34 | let pattern = '';
35 | let targetResult = true;
36 | let autoRemoveAfter = -1;
37 | if ( newSyntax ) {
38 | pattern = arg1;
39 | if ( pattern.startsWith('!') ) {
40 | targetResult = false;
41 | pattern = pattern.slice(1);
42 | }
43 | autoRemoveAfter = parseInt(arg2);
44 | if ( isNaN(autoRemoveAfter) ) {
45 | autoRemoveAfter = -1;
46 | }
47 | } else {
48 | pattern = arg2;
49 | if ( arg1 === '0' ) {
50 | targetResult = false;
51 | }
52 | }
53 | if ( pattern === '' ) {
54 | pattern = '.?';
55 | } else if ( /^\/.+\/$/.test(pattern) ) {
56 | pattern = pattern.slice(1,-1);
57 | } else {
58 | pattern = pattern.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
59 | }
60 | const rePattern = new RegExp(pattern);
61 | window.open = new Proxy(window.open, {
62 | apply: function(target, thisArg, args) {
63 | log('window.open:', ...args);
64 | const url = args[0];
65 | if ( rePattern.test(url) !== targetResult ) {
66 | return target.apply(thisArg, args);
67 | }
68 | if ( autoRemoveAfter < 0 ) { return null; }
69 | const iframe = document.createElement('iframe');
70 | iframe.src = url;
71 | iframe.style.setProperty('display','none', 'important');
72 | iframe.style.setProperty('height','1px', 'important');
73 | iframe.style.setProperty('width','1px', 'important');
74 | document.body.appendChild(iframe);
75 | setTimeout(( ) => iframe.remove(), autoRemoveAfter * 1000);
76 | if ( arg3 === '' ) { return iframe.contentWindow; }
77 | return new Proxy(iframe.contentWindow, {
78 | get: function(target, prop) {
79 | log('window.open / get', prop, '===', target[prop]);
80 | return target[prop];
81 | },
82 | set: function(target, prop, value) {
83 | log('window.open / set', prop, '=', value);
84 | target[prop] = value;
85 | },
86 | });
87 | }
88 | });
89 | })();
90 |
--------------------------------------------------------------------------------
/whitelist.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | uBlock — Whitelist
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 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------