├── 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 | 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 | 22 | 23 | 24 |
25 | 26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | 34 |
35 |
36 |
37 |
38 |
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 |
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 | -------------------------------------------------------------------------------- /aboutBarrier.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 |

About Barrier

14 |
15 | 16 |
17 | 18 | 19 | 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 |
20 |

21 |

22 |   23 |

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 | 9 | 10 | 11 | 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 | ![Metropolis](./Specimens/Metro-1.png) 6 | 7 | --- 8 | 9 | ![Metropolis](./Specimens/Metro-2.png) 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 |
16 |

17 | 21 |
22 | 23 |
24 |

25 |

26 | 27 |
28 | 29 |
30 | 31 | 32 |
33 | 34 |
35 |

36 |

37 | 38 | 39 |

40 |
41 | 42 | 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 |
22 |
23 |

24 |
25 |
26 |
27 |
28 | 29 | 30 |
31 |
32 |
33 | 34 | 35 | 36 |
37 |
38 |
39 |
40 |
41 |
42 | 43 | 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 | //