uBlock Origin 1.13: Element Zapper and CSP Filter - gHacks Tech News

uBlock Origin 1.13: Element Zapper and CSP Filter

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: An update was released to uBlock Origin 1.13.2 which fixes the issue experienced on Chrome.

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.

Summary
software image
Author Rating
1star1star1star1star1star
5 based on 9 votes
Software Name
uBlock Origin
Software Category
Browser
Landing Page
Advertisement

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:


Previous Post: «
Next Post: »

Comments

  1. Heimen Stoffels said on June 21, 2017 at 10:32 am
    Reply

    What’s the difference between Element Zapper and right click on web page –> Block Element ?

    1. Martin Brinkmann said on June 21, 2017 at 11:10 am
      Reply

      Block element creates a rule making the change permanent.

      1. Heimen Stoffels said on June 21, 2017 at 11:50 am
        Reply

        Thanks :)

      2. Gibraltar said on June 21, 2017 at 6:12 pm
        Reply

        The Zapper is clearly more efficient than using Firefox’s built in method for that, accessed through pressing F12 and selecting the Dev tool’s element picker thing. Since that tool’s purpose is a bunch of things and not only temporarily deleting a page element, I’m glad uBlock introduced the zapper.

    2. Riri0 said on June 21, 2017 at 11:10 am
      Reply

      Did you read the article?

      1. Heimen Stoffels said on June 21, 2017 at 11:50 am
        Reply

        Yes, I did. But it only said something about creating rules, not about the Block Element feature in the context menu.

  2. Taomyn said on June 21, 2017 at 11:15 am
    Reply

    FYI, v1.13 is broken for many people under Chrome, which reports the extension as corrupted.

    1. Richard said on June 21, 2017 at 11:31 am
      Reply

      @Martin
      Have this problem now. Using Comodo AdBlocker instead until uBlock Origin 1.14 is released.

      You might want to pull this article until this issue is fixed by the developer.

    2. Ahirudesu said on June 21, 2017 at 11:54 am
      Reply

      Same failure with 1.13 and Chrome Version 59.0.3071.109 (Official Build) (64-bit).
      On another PC I still have uBlock Origin 1.12.4 and it continues to work fine with the same Chrome build.

    3. Gavin said on June 21, 2017 at 12:00 pm
      Reply

      I’m having this issue also (Chrome Beta on Win 10 Pro).

    4. mikolajek said on June 21, 2017 at 1:36 pm
      Reply

      You can fix it by using Developer Mode and installing unpacked extension version. Obviously it’s a temporary workaround but works great!

    5. Jed said on June 21, 2017 at 7:37 pm
      Reply

      I don’t have this problem, it’s on 1.13 and it’s running fine.

      1. Tom Hawack said on June 21, 2017 at 8:34 pm
        Reply

        Jed, 1.13 on Chrome?

      2. Jed said on June 21, 2017 at 9:04 pm
        Reply
      3. Tom Hawack said on June 21, 2017 at 10:06 pm
        Reply

        @Jed, that’s 1.13.2 not 1.13 (on your picture) — 1.13.2 fixed the problem.

  3. Johnny said on June 21, 2017 at 11:21 am
    Reply

    Yup, I can’t install it, because as soon as I installe it gets corrupted and disabled!

  4. Johnny said on June 21, 2017 at 12:27 pm
    Reply

    Manual install works but it’s cumbersome!

  5. Tom Hawack said on June 21, 2017 at 12:40 pm
    Reply

    uBlock Origin 1.13 running 5/5 here on Firefox ESR 52.2.0 (64-bit).

    ALT-L -> Logger, easier ( also available with chrome://ublock0/content/logger-ui.html )
    ALT-X -> Element Picker, easier!
    ALT-Z -> Zapper : fast ‘n’ fun, great indeed for one of those touch’n’go sites which include fatness but aren’t aimed by the user at being put on an Element Picker diet!

    I read also on uBO’s AMO page about the 1.13.0 version,

    “Improved compatibility with Adguard’s filter lists
    See #2624. I do plan to add Adguard’s English filter lists to uBO’s stock filter lists for the next stable release.
    Given that both Adguard and uBO support advanced filter syntax not supported by ABP (which advanced syntax benefit end users and make a filter list maintainer’s life easier), and given that EasyList maintainers are limiting themselves to support no more than what ABP can support, enabling Adguard’s filter lists as default list in their respective locale is something I am considering.”

    Interesting, meaning that Adblock filters used with uBO is comparable to using a car rather than a dragster. Adblock is somehow elementary in blocking given its architecture, in a way what was once a leading product is falling into history in this that it basically basic.

    Me like u’Block Origin’ very much, true love :)

  6. Yuliya said on June 21, 2017 at 12:42 pm
    Reply

    I noticed the new icon yesterday on uB0 for FireFox. Very, very useful, especially if you want to get rid of those pesky overlays on some random website that you may not visit again (:

    Edit: if only there was a way to exit the elemnt zapper UI in case I change my mind. I can’t seem to find it if there is one.

    1. Tom Hawack said on June 21, 2017 at 1:25 pm
      Reply

      >if only there was a way to exit the elemnt zapper UI in case I change my mind.

      Be it the zapper or the element picker mode, the [ESC] key exits those modes immediately.

      1. Yuliya said on June 21, 2017 at 1:37 pm
        Reply

        Thanks. Of course the key that quits most instances also exist uB0’s picker. I always forget about it :)

  7. Matt said on June 21, 2017 at 1:25 pm
    Reply

    I need an article on how to repair this broken extension after following this article’s advice on updating, lol.

  8. greg said on June 21, 2017 at 1:42 pm
    Reply

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

    How does one create these shortcuts? I’ve always wanted shortcuts for uB0. How does one go about creating them in Firefox?

    1. Yuliya said on June 21, 2017 at 1:48 pm
      Reply

      You need them only if you want to edit or remove those shortcuts.
      Anyway, go to about:config then right click > new. I assume they’d have to be string values in this case.

  9. Nik said on June 21, 2017 at 1:45 pm
    Reply

    v1.13.2 released. this fixes the corruption and disable problem.

    1. Tom Hawack said on June 21, 2017 at 1:54 pm
      Reply

      Concerns Chrome uses only I guess since FF encountered no issue with uBO 13.0

    2. chesscanoe said on June 21, 2017 at 5:17 pm
      Reply

      I just checked Chrome Version 60.0.3112.32 (Official Build) beta (64-bit) under Windows 10 CU Home, and uBlock version 1.13.2 was automatically previously installed with no issues.

  10. Tom Hawack said on June 21, 2017 at 1:51 pm
    Reply

    For those who are more mouse than keyboard, and who run the ‘Firegestures’ Firefox add-on, they can call uBO’s Element Picker and Zapper modes with two mouse gestures associated scripts :

    Name : Call uBO Element Picker
    Script :
    // press ‘Alt+X’ to call uBO Element Picker
    FireGestures.sendKeyEvent({ alt: true, key: “X” });

    Name : Call uBO Zapper
    Script :
    // press ‘Alt+Z’ to call uBO Zapper
    FireGestures.sendKeyEvent({ alt: true, key: “Z” });

    I’m a mouse fan, friends could call me Micky :)

  11. Gerard said on June 21, 2017 at 2:48 pm
    Reply

    UPDATE: There is a bug fix, version 1.13.2

  12. Jeff-FL said on June 21, 2017 at 2:53 pm
    Reply

    Chrome 59, x64 here, hotkeys aren’t working for me. Anyone have a suggestion?

    1. Tom Hawack said on June 21, 2017 at 3:10 pm
      Reply

      Maybe are they (ALT-X and ALT-Z) reserved by another extension?

      1. Jeff-FL said on June 21, 2017 at 3:20 pm
        Reply

        Merci, Tom. I found the issue. They weren’t set by default in Chrome’s kb shortcuts. fixed now.

  13. greg said on June 21, 2017 at 3:00 pm
    Reply

    Same, how does one create those hotkeys in Chrome? Under Extensions, there’s a Keyboard Shortcuts link, but it only has one option to activate the extension. Nothing about opening Log, etc.

  14. Doc said on June 21, 2017 at 5:48 pm
    Reply

    “The update corrups the extension…” I think you meant *corrupts*, Martin…

    1. Tom Hawack said on June 21, 2017 at 6:05 pm
      Reply

      Darn evidence that some people really aren’t acquainted with the word … :)

  15. Anonymous said on June 21, 2017 at 5:50 pm
    Reply

    Since few updates with the Element Zapper the Echap button no longer works for me, now I have to click out of the page before, JFI… please don’t tell me to open an account on Github for feedback!

    1. Tom Hawack said on June 21, 2017 at 6:13 pm
      Reply

      “Since few updates” … does that mean you’re on Chrome? If so, no idea why your Echap (Escape in English) key is on holidays.

      Why not open an account on Github? (et toc!).

      I know : what’s the point in answering when you ignore the explanation? Compassion, my friend. It don’t cost nothin’ to sympathize on one’s misfortunes, does it?

      1. Anonymous said on June 21, 2017 at 6:46 pm
        Reply

        Firefox 54 with only greasemonkey, umatrix and ublock origin, few updates of ublock origin. Github is for geeks, not for people like me.

      2. Anonymous said on June 21, 2017 at 7:00 pm
        Reply

        Just tried with the Firefox Nightly version, same behavior, with element picker of uBlock Origin v1.13.0 the escape key no longer works correctly.

  16. Anonymous said on June 21, 2017 at 5:53 pm
    Reply

    Picker not “zapper” sorry

  17. Gibraltar said on June 21, 2017 at 6:16 pm
    Reply

    What exactly does injecting CSP rules allow that was previously not possible, in concrete terms ?

  18. Brothel said on August 4, 2017 at 6:39 pm
    Reply

    @Gibraltar By CSP, you get native blocking instead of extension blocking scripts individually.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.