Jump to content

uBlock Origin 1.13: Element Zapper and CSP Filter


Batu69

Recommended Posts

UBlock Origin 1.13.0 is a new version of the popular content blocking extension for Firefox and Google Chrome web browsers.

It introduces two new features to the extension: Element Zapper and CSP filtering. The latest version of uBlock Origin is already listed on the official Chrome Web Store and Mozilla AMO website.

 

Interested users can download it from the extension stores, existing users may use the automatic update functionality of the browser to update to the new version.

The new version of the content blocker ships with two new features that will benefit users of the extension.

 

Update: Chrome users here on Ghacks have reported issues with the new version. The update corrups the extension so that it is deactivated automatically in Chrome. You may want to wait for a patch before you make the update.

Element Zapper

ublock origin element zapper

 

Element Zapper has been designed to remove elements on web pages that you open temporarily. While you can hide elements on web pages temporarily using Developer Tools, the main benefit that Element Zapper offers is that it simplifies this process.

 

Click on the uBlock Origin icon in the browser's address bar, and select the new Element Zapper icon (the lightning icon) to make use of it.

This enables the element picker mode. Move the mouse cursor over the element that you want to remove from the page -- an overlay, annoying advertisement, auto-playing video, an image, or any other element -- and click on it. The element is removed right away, and it stays hidden until you reload the page.

 

remove element

 

You can exit the mode at any time without removing an element by pressing Esc. There are also two options to remove multiple elements without exiting Element Zapper mode.

 

You can hold down the Shift-key before you click on elements to remove them, or may hover over elements and hit the Del-key instead. Element Zapper mode remains active when you do this, so that you can remove multiple elements on a web page without having to activate the mode each time.

 

Element Zapper mode has been designed for situations where rule creation does not make sense. This can be the case for web resources that you won't visit again for instance, or for testing functionality before you add a permanent rule to uBlock Origin's set of rules.

Sometimes we visit a page on a site for which we do not intend to become a regular visitor, and many sites nowadays will throw nuisance visual elements preventing you from accessing the content. However oftentimes we would rather not go through the process of creating one or more filters for just that one visit. This is where the element-zapper mode is useful: you can quickly get rid of the nuisance visual element without having to pollute your filter set for this one single visit.

The second new feature enables you to inject any Content Security Policy (csp) header in pages that match the filter.

Currently all the following modifiers are supported when used with csp=: third-party, domain=, important, badfilter.

Additionally, exception filters for csp= can be crafted two ways:

Must be exact csp= match, i.e. @@||example.com/nice$csp=frame-src 'none' will cancel only whatever filter tries to inject exactly a csp=frame-src 'none' filter, but not a csp=frame-src 'self' filter; OR
@@...$csp will cancel all CSP injection for URLs which match the filter.
All this required refactoring on my side, as the semantic for csp= filters is that all matching filters must be found (and furthermore applied according to important and @@), while normal filters only the first hit is returned.

The latest version of uBlock Origin supports the following keyboard shortcuts:

  • Alt-Z to open the Element Zapper mode.
  • Alt-X to open the Element Picker mode.
  • Alt-L to open the Logger.

Chrome users can customize shortcuts by loading chrome://extensions/ and clicking on the "keyboard shortcuts" link on the page.

Firefox users need to create the following three preferences using about:config

  • extensions.ublock0.shortcuts.launch-element-zapper
  • extensions.ublock0.shortcuts.launch-element-picker
  • extensions.ublock0.shortcuts.launch-logger

Setting a value to - disables the shortcut in Firefox, and resetting them restores the initial values.

You find additional information about the release on the project's GitHub webpage.

 

Article source

Link to comment
Share on other sites


  • Replies 6
  • Views 1.8k
  • Created
  • Last Reply

Element Zapper looks like a clone of the "Element Hiding Helper for Adblock Plus" addon.

Link to comment
Share on other sites


7 hours ago, Karlston said:

Element Zapper looks like a clone of the "Element Hiding Helper for Adblock Plus" addon.

no, it helps in temporary. like u visit site, see overlay and just zap it. good for sites u not visit regularly

Link to comment
Share on other sites


stylemessiah

Kinda pointless adding code to an addon for manipulating "temporary" pages

 

This is where code bloat starts....

 

Really who goes to a one off page and then fricking worries too much about elements on it....

Link to comment
Share on other sites


27 minutes ago, stylemessiah said:

Really who goes to a one off page and then fricking worries too much about elements on it....

 

Lots of people, myself (and obviously, gorhill) included. :rolleyes:

Link to comment
Share on other sites


  • Administrator

Hiding elements by rule already exists in it. Read this. Just right click a thing and then click on Block Element > Create. Another way is to click the addon icon and click on the dropper thing.

 

It's easy as that.

Link to comment
Share on other sites


Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...