uBlock | uBlock : a fast , lightweight , and lean blocker for Chrome | Privacy library
kandi X-RAY | uBlock Summary
kandi X-RAY | uBlock Summary
Some users might want to check out uBlock Origin: a noteworthy personal fork of uBlock from @gorhill with a slightly different featureset. uBlock is a general-purpose content blocker, which means it can be used to block ads as well as other forms of content on webpages. uBlock can also be used to help users neutralize privacy-invading trackers. uBlock blocks ads through its support of the Adblock Plus filter syntax. uBlock extends the syntax and is designed to work with custom rules and filters. ** Please note recent news about the status of the uBlock project as of June 22, 2018.**. Acknowledgment: uBlock comes with several filter lists ready to use out-of-the-box (including but not limited to: EasyList, Peter Lowe's, several malware filter lists). We deeply appreciate the people working hard to maintain those lists which are available to use by all for free.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Encode a string into an array
- Decode sequences of basic ASCII characters .
- Parses the given text .
- Start app process
- Modify the given store .
- Aborts inline script in inline code .
- Search for the specified hostname .
- Remove any wildcards .
- Drop - to filter the import - to - file rules .
- Convert a Uint8Array to a string .
uBlock Key Features
uBlock Examples and Code Snippets
Community Discussions
Trending Discussions on uBlock
QUESTION
There is a uBlock filter floating around which hides all video thumbnails, if the time span of the associated text is shorter than 70 seconds:
...ANSWER
Answered 2022-Jan-03 at 23:06I've found a working solution by myself, I wasn't aware of the fact that I have to do the search in javascript rather than in CSS selector. This line of code does exactly what I want:
QUESTION
I trying to blur or hide runner thumbnails on various streaming sites (PrimeVideo for example) I use Amino: Live CSS Editor chrome extension in most cases or uBlock Origin when I hide or blur certain elements from websites. But I can't understand how to blur that element. I mean these runner thumbnails don't even have divs
, they just appear when you hover your mouse over progress bar and then disappear. With this css:
ANSWER
Answered 2022-Jan-25 at 18:31go to the img you want to blur, find a way to select it, and add to it:
QUESTION
I am using fetch
in a NodeJS application. Technically, I have a ReactJS front-end calling the NodeJS backend (as a proxy), and then the proxy calls out to backend services on a different domain.
However, from logging errors from consumers (I haven't been able to reproduce this issue myself) I see that a lot of these proxy calls (using fetch
) throw an error that just says Network Request Failed
, which is of no help. Some context:
- This only occurs on a subset of all total calls (lets say 5% of traffic)
- Users that encounter this error can often make the same call again some time later (next couple minutes/hours/days) and it will go through
- From Application Insights, I can see no correlation between browsers, locations, etc
- Calls often return fast, like < 100 ms
- All calls are HTTPS, non are HTTP
- We have a fetch polyfill from
fetch-ponyfill
that will take over iffetch
is not available (Internet Explorer). I did test this package itself and the calls went through fine. I also mentioned that this error does occur on browsers that do supportfetch
, so I don't think this is the error. - Fetch settings for all requests
- Method is set per request, but I've seen it fail on different types (GET, POST, etc)
- Mode is set to 'same-origin'. I thought this was odd, since we were sending a request from one domain to another, but I tried to set it differently and it didn't affect anything. Also, why would some requests work for some, but not for others?
- Body is set per request, based on the data being sent.
- Headers is usually just
Accept
andContent-Type
, both set to JSON.
I have tried researching this topic before, but most posts I found referenced React native applications running on iOS, where you have to set some security permissions in the plist file to allow HTTP requests or something to do with transport security.
I have implement logging specific points for the data in Application Insights, and I can see that fetch()
was called, but then()
was never reached; it went straight to the .catch()
. So it's not even reaching code that parses the request, because apparently no request came back (we then parse the JSON response and call other functions, but like I said, it doesn't even reach this point).
Which is also odd, since the request never comes back, but it fails (often) within 100 ms.
My suspicions:
- Some consumers have some sort of add-on for there browser that is messing with the request. Although, I run with uBlock Origin and HTTPS Everywhere and I have not seen this error. I'm not sure what else could be modifying requests that would cause it to immediately fail.
- The call goes through, which then reaches an Azure Application Gateway, which might fail for some reason (too many connected clients, not enough ports, etc) and returns a response that immediately fails the
fetch
call without running the.then()
on the response.
For #2, I remember I had traced a network call that failed and returned Network Request Failed
: Made it through the proxy -> made it through the Application Gateway -> hit the backend services -> backend services sent a response. I am currently requesting access to backend service logs in order to verify this on some more recent calls (last time I did this, I did it through a screenshare with a backend developer), and hopefully clear up the path back to the client (the ReactJS application). I do remember though that it made it to the backend services successfully.
So I'm honestly not sure what's going on here. Does anyone have any insight?
...ANSWER
Answered 2022-Jan-25 at 15:48Based on your excellent description and detective work, it's clear that the problem is between your Node app and the other domain. The other domain is throwing an error and your proxy has no choice but to say that there's an error on the server. That's why it's always throwing a 500-series error, the Network Request Failed
error that you're seeing.
It's an intermittent problem, so the error is inconsistent. It's a waste of your time to continue to look at the browser because the problem will have been created beyond that, either in your proxy translating that request or on the remote server. You have to find that error.
Here's what I'd do...
Implement brute-force logging in your Node app. You can use Bunyan, or Winston or just require(fs)
and write out to some file when an error occurs. Then look at the results. Only log it out when the response code from the other server is in the 400 or 500 ranges. Log the request object and the response object.
Something like this with Bunyan:
QUESTION
I'm using MoonPay for crypto purchasing in my Vue app, but uBlock Origin is blocking its IP address detection which blocks it from loading.
It doesn't seem to be an issue on other adblockers, so I'd like to display a message to the user if the user has uBlock Origin installed, however the issue doesn't seem to occur with other adblockers.
Is there a way to detect any one single adblocker, or a package which can return a string of the adblocker currently active?
...ANSWER
Answered 2021-Oct-15 at 05:37as @ShadowRanger suggested, I've solve this by catching the Axios error from the blocked third-party resource fetch and displaying a modal to the user to alert them to the problem.
QUESTION
I'm trying to keep count of the visitors to my blog (I'm using a static site published on Github Pages) and for that purpose I'm using Google Analytics 4.
But I realized that ad blockers such as uBlock Origin block request to tag manager or analytics domains and even URL path segments like /gtm.js
or /gtag/js?
, see EasyPrivacy. So making the metric not very realistic as many people is using browser ad-blocking extensions.
I've been reading recent articles about server side tagging, and how it can be used to deploy an App Engine instance for Tag Manager, and bypass ad blocking (between other goals). But as far as I can understand, doing it this way could bypass the domain blocking (e.g. www.googletagmanager.com
), as tag manager becomes a first-party under your managed domain. But not to circumvent the blocking rules based on URL path. So,
Is there any way to configure the server side tag manager to serve the JS scripts in different custom paths so that become impossible to block? If so, how can it be configured?
In case it's possible, should I use directly the analytics script?
ANSWER
Answered 2021-Oct-03 at 23:18Seems like you're misunderstanding the concept of server-side GTM.
The idea here is that the endpoint of your server-side GTM (the G Engine instance) is never exposed on front-end.
So your back-end sends events to your App Engine instance, not the front-end. You typically don't need to deploy ANY code on the front-end. All logic is supposed to be set up solely on the backend. By your back-end developers. Your backend usually can listen to all the important events that are happening seemingly on the front-end. Like page navigations, form submissions, purchases, etc.
You still can send seemingly front-end events to your server-side GTM. But you have to be smart about it. You don't want to expose your real GTM endpoint exactly to avoid bots, "hackers" and adblockers.
So what you do instead, is:
- Build a custom "mirror" endpoint on your backend the main idea of which is to relay everything it gets to your App Engine GTM endpoint. Actually, it doesn't matter where you build the mirror endpoint. Your backend team would likely frown upon the idea of analytics contributing to "their" repos, so it may be a good idea to own your endpoint.
- Add protection, data enrichment, validation and logging to your mirror endpoint. It's optional, but it's good to have.
- Now use your new endpoint for the rare cases when you need to add front-end tracking to your existing back-end tracking. Addblockers will still block your front-end GTM, so you likely want to use something else (NOT a TMS) for your front-end code.
- Optionally, add some back-end logic to synchronize client ids between the backend events and your mirror endpoint events. And it's a lot easier if your mirror lives with your main back-end codebase, keep it in mind.
Yes, server-side brings a lot of elegant solutions to modern tracking. It, however, requires the implementation specialists to be full-stack web-devs. And it's not typical for the industry. In fact, it's rare for the implementators to have even mid-JS dev skills, not mentioning full-stack or REST API experience.
QUESTION
Twitter has started adding "follow topic" posts interspersed with the normal home timeline. I'd like to filter them out. Twitter actively obfuscates the timeline source to hinder efforts like this.
Here's what I understand about the theory: the rule should be able to identify a post containing a deeply nested child that has the text "Follow Topic" in it, like so:
then it should filter the post containing such a span, which would be this parent level
In practice I got as far as
...ANSWER
Answered 2021-Jun-01 at 22:07To filter a node that contains another node, you can use the xpath() function.
For example, to hide the article containing a recommended topic, I use:
QUESTION
ANSWER
Answered 2021-May-09 at 02:00You can use public services which are not blacklisted by ad blockers, like https://www.myexternalip.com/json but eventually it can also be blacklisted, it's not under your control.
The most reliable way to reduce the risk of using a service that can be blacklisted would be building your own server as suggested in descriptions or keeping an updated list of alternative services in case of failed requests. Probably you won't get rid of your "problem" without spending some money.
QUESTION
uBlock is blocking an ad from some website, but it leaves the large (in height) div which expands the site after loading and pushes the main text down. Using "Block is element" gives me
...ANSWER
Answered 2021-Mar-10 at 10:10#js-ad-container-XYZ
means you want to block the element with the id of js-ad-container-XYZ
. With your second attempt you say to only block the div
node(s) with that id. This will either do the same, worse case it would not match any nodes. I found you usually need to go expand the block to any number of parent nodes till you block the relevant container. For that you use the nth-ancestor()
:
QUESTION
I'm using firefox v84 (latest atm) and i also have ublock installed. Firefox is set to block popups in it's settings, but i still get them (although rarely) from some sites. They pop up as very small windows at the corner of the screen. Sometimes it shows "firefox blocked popup", sometimes it doesn't. I remember reading about javascript trickery to somehow create popup windows even though it's blocked in the browser (so somehow it's still possible).
Anyways, my main question is, how can a browser not be able to block the popups? I'm a programmer myself and i know that, for example, in windows environment, if you want to create a window, you need to call the windows api, and relevant functions (CreateWindowEx etc) to do that (even if you don't do it explicitly, that's what happens under the hood). Browser is also responsible for reading parsing and executing the javascript code. So just simply do NOT call the CreateWindow function, it should be that easy, is it not? Why is this still a problem, and why can't browser developers solve this?
...ANSWER
Answered 2021-Jan-08 at 11:09Popups opened by the browser can (mainly and basically) be of 2 types :
- Explicit javascript call to
window.open
- Implicit link with a
target
specified (i.e.:_blank
)
If you simply block both, then many legitimate websites will no longer work, for example (but not limited to) when using an OAuth mechanism to login.
There are some patterns and rules that can be detected by the browser and the plugins to attempt blocking illegitimate popups. Example: the browser will block automatically any window.open
that is not directly triggered by a user interaction (click on a button).
There starts the cat and mouse game with people trying to circumvent known limitations and create inventive scenarios to force a popup to happen. Plugins in turn will try to catch those mechanisms and provide an updated detection behavior,...
One common technique is indeed to combine the 2 popup methods and provide indirect page browsing. Example :
QUESTION
I want to stop a javascript .js to load on a specific website with greasemonkey/violentmonkey scrpit
...ANSWER
Answered 2020-Dec-26 at 06:33The second method below usually works but something seems to be interfering with it on your page for some reason. An ugly workaround is to put an empty hljs property on the window in advance, so that the page script, when run, thinks it already exists and does nothing:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install uBlock
Chrome: available on the Chrome Web Store or for manual installation.
Safari: available to install from the homepage.
MacOS App: available for install from the homepage or from the App Store.
Firefox: available on the Firefox Add-ons site, or for manual installation.
Opera: Opera shares Chrome's underlying engine, so you can install uBlock simply by grabbing the latest release for Chrome.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page