Funkcjonalność tej witryny będzie ograniczona w czasie konserwacji. Jeśli artykuł nie rozwiązuje twojego problemu i chcesz zadać pytanie, to nasza społeczność wsparcia jest dostępna na @FirefoxSupport na Twitterze i /r/firefox na Reddicie.

Przeszukaj pomoc

Unikaj oszustw związanych z pomocą.Nigdy nie będziemy prosić Cię o dzwonienie na numer telefonu, wysyłanie SMS-ów ani o udostępnianie danych osobowych. Zgłoś podejrzaną aktywność, korzystając z opcji „Zgłoś nadużycie”.

Więcej informacji

How to Block Elements using Ublock Origin?

  • 10 odpowiedzi
  • 2 osoby mają ten problem
  • 4 wyświetlenia
  • Ostatnia odpowiedź od Phoxuponyou

more options

A lot of sites hit me with Javascript-based animation, while requiring Javascript to work. I have sensory processing issues, so animation and flashing is painful, and can trigger my migraines; outside it can also be disorienting and dangerous.

I have Ublock Origin, but can't find out how to block elements with it.

Obviously if I'm trying to block an element, I've *already* been hit by it. But it would sometimes help to be able to freeze it. And *then* I would be able to consider further steps. If I can't freeze an animated element, I have to get away from it. If I try to scroll away from it, a highlighted area shifts left as I scroll down. If I mouse over the text box, it flashes.

I tried AdBlockPlus but deactivated it because it broke copy/paste.

A lot of sites hit me with Javascript-based animation, while requiring Javascript to work. I have sensory processing issues, so animation and flashing is painful, and can trigger my migraines; outside it can also be disorienting and dangerous. I have Ublock Origin, but can't find out how to block elements with it. Obviously if I'm trying to block an element, I've *already* been hit by it. But it would sometimes help to be able to freeze it. And *then* I would be able to consider further steps. If I can't freeze an animated element, I have to get away from it. If I try to scroll away from it, a highlighted area shifts left as I scroll down. If I mouse over the text box, it flashes. I tried AdBlockPlus but deactivated it because it broke copy/paste.

Wszystkie odpowiedzi (10)

more options

Select the UBO icon in your toolbar, then select the eye dropper icon next to "on this page". You can also go into UBO settings from the gear icon (top left corner under the main icon), tick the box for Advanced User and use colour-coded blanket rules for domains (see example and colour legend here: https://discourse.mozilla-community.org/t/support-ublock-origin/6746/2).

ABP probably just needed the right domain unblocked to enable copypaste. I prefer ABP because the rules are more straightforward to edit in it compared to UBO.

more options

I tried that. It didn't work. Now I've got a worse headache, because of the animation where I tried that.

more options

There were buttons for "create," "pick," and "quit,"

I have tried "pick," and "create," and neither would block the animation, then or after reloading.

I honestly think Javascript-based animation should be phased out because it is so much harder to block than other types, and all autoplaying animation should be phased out.

more options

I'm with you on banning autoplaying animation and other needless nuisances, bar video on sites specifically made for video content delivery. Devs today don't seem to recall or know what a bad idea GIFs and MIDIs were - then again it could be their clients ordering the content.

If you could not block an element, chances are your rule blocked something else, perhaps a layer on top of the element. Point me to said element and I'll see what I can do.

In the picker view, Create creates the rule, Pick lets your repick the element you want to base your rule on and Quit quits the picker. It works, just tested it on one of the pictures on UBO's Mozilla page.

more options

That seems to work, but "block element" only blocks one at a time - it doesn't block similar elements.

Where can I find a list of the rules mine has added from my attempts to block elements?

more options

Okay, it's hidden away in Add-Ons Manager > Ublock Origin > Dashboard.

more options

The rule creation starts with just the element you selected; if you want to expand the rule, you'll have to modify it.

It looks like UBO uses the ABP syntax for its filters, so these instructions should apply to both: https://adblockplus.org/filters. All I ever use is the wildcard, *, to mark dynamic URL sections, e.g. "|http://*.olark.com/*.js*" will block any subdomains of olark.com that would start Javascript entities with the .js extensions.

PS. I tried to look for ready-made blocklists for people with SPD, but couldn't find any. It's all advertising and malware related. What I did find was the Dynamic Filtering guide for UBO: https://github.com/gorhill/uBlock/wiki/Dynamic-filtering:-quick-guide. The feature seems really handy, if you can get to grips with it.

Zmodyfikowany przez Phoxuponyou w dniu

more options

If it is a JavaScript animation then you might be better of with NoScript and possibly ask advice at the NoScript forum.

more options

Okay thanks.

One more idea: is disabling webGL a way to disable Javascript-based animation without breaking other Javascript-based functions?

more options

From what I could find out, no. HTML5 has something called "Canvas", https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API, that can be used to make animations with Javascript.