uBlockOrigin / uBlock-issues

This is the community-maintained issue tracker for uBlock Origin
https://github.com/gorhill/uBlock
944 stars 80 forks source link

Ublock 1.24.2 does not work properly on Thunderbird 68.2.2 (64-bit) #825

Closed WPFilmmaker closed 7 months ago

WPFilmmaker commented 4 years ago

Prerequisites

Description

I could manually download ublock file from FF addon page and install it. I can go into options and do stuff like update lists. It also seem to block ads on rss feeds (however I am unable to verify this as I have js disabled so it might be because of that). However several functions are broken as detailed below.

A specific URL where the issue occurs

///

Steps to Reproduce

Download and install Ublock 1.24.2 on Thunderbird 68.2.2 (64-bit)

Expected behavior:

Ublock works like in Firefox

Actual behavior:

Ublock is downloadable and shown up in TB addon list and from there one can access ublock's options (tbh it is a big improvements since a few months ago it would not even work to that point). As I said it also seem to remove ads (but this can't be verified atm), but it has several issues:

Your environment:

Ublock 1.24.2 on Thunderbird 68.2.2 (64-bit) on Lubuntu 18.04

gwarser commented 4 years ago

No ublock icon like in FF shown on the feeds bar

What is "feeds bar"? Screenshot? uBO button is added in main toolbar. I don't think WebExtensions will be able to put buttons anywhere they want.

The only way to interact with ublock on a feed page is to rich click on an object and the popup 'block element' appears however it does not do anything.

I don't see uBO entry in any menu. Only button in toolbar. And, what exactly you mean by "feed page"?

TB 68.3.1, uBO 1.24.0

Ublock 1.24.2 does not work properly on Thunderbird

Because support for WebExtensions in Thunderbird is still a mess. https://github.com/uBlockOrigin/uBlock-issues/issues/194

WPFilmmaker commented 4 years ago

@gwarser Thanks for the reply, I meant that bar (orange square): https://imgur.com/cul2S9l

Adblock plus used it in TB pre-60 and was very handy, I supposed (expected?I could be wrong) that webextensions could still use it, if it is the cause IMHO ublock should be there, if not then it is another story.

krystian3w commented 4 years ago

Hook up, is there support for filtering embedded graphics/texts/nodes in emails?


Currently, you can only filter an addon store "page" or a domain opened in a new tab with:

https://addons.thunderbird.net/en-US/thunderbird/addon/open-tab/

WPFilmmaker commented 4 years ago

@krystian3w only for rss feeds displayed as webpages afaik.

alta88 commented 4 years ago

An fyi: Tb Bug 1641345 has landed and will be on 78. It fixes web-ex tabs for the shared messagepane browser and makes uBlock badge work on multiple message tabs.

Of course, the toolbarbutton can only be seen on the main toolbar, so it isn't available on content tabs. See BrowseInTab to configure this, and for other useful link things.

alta88 commented 4 years ago

Tb Bug 1504475 - Add an API for running content scripts in message display browsers has landed on trunk. It seems it will enable element zapping/picking modes in messages. Perhaps just adding the "messagesModify" permission to uBlock will be sufficient to make it work.

Edit: it's highly likely special handling will be needed for mailnews urls, ie url schemes in ["imap", "mailbox", "news", "nntp", "snews"].

r-a-y commented 4 years ago

TB 78.4 landed with the messageDisplayScripts API to filter email content: https://thunderbird-webextensions.readthedocs.io/en/latest/messageDisplayScripts.html (ignore the part where it says the API was introduced in TB 82, it's in TB 78.4 as well)

Should be roughly the same as FF's contentScripts API, but this is for email content.

Update - To avoid confusion, uBO still needs to implement the messageDisplayScripts API before it will work on Thunderbird.

krystian3w commented 4 years ago

I see only in right click menu, but option no works, how test working networks filters?

because: ##body a do not hide links on all opened mails.


These addons are not popular to recover few function form old ThunderBrowse:

https://addons.thunderbird.net/en-us/thunderbird/addon/open-tab/ https://addons.thunderbird.net/en-us/thunderbird/addon/browseintab/

gwarser commented 3 years ago

Current stable Thunderbird is 91.1.1, and uBO 1.38 seems to work fine. uBO button is present, Element Picker work.


What else is not working?

gwarser commented 3 years ago

Filtering email content does not work:

this.browser is null ext-tabs-base.js:242
    get _uri chrome://extensions/content/parent/ext-tabs-base.js:242
    matches chrome://extensions/content/parent/ext-tabs-base.js:619
    matches chrome://messenger/content/parent/ext-mail.js:810
    query chrome://extensions/content/parent/ext-tabs-base.js:2074
    next self-hosted:1430
    from self-hosted:488
    query chrome://messenger/content/parent/ext-tabs.js:561
    query self-hosted:1175
    result resource://gre/modules/ExtensionParent.jsm:935
    withPendingBrowser resource://gre/modules/ExtensionParent.jsm:491
    result resource://gre/modules/ExtensionParent.jsm:935
    callAndLog resource://gre/modules/ExtensionParent.jsm:897
    recvAPICall resource://gre/modules/ExtensionParent.jsm:934
    InterpretGeneratorResume self-hosted:1482
    AsyncFunctionNext self-hosted:692
  /**
   * @property {nsIURI} _uri
   *        Returns the current URI of this tab.
   *        @readonly
   */
  get _uri() {
    return this.browser.currentURI;
  }
gwarser commented 3 years ago

New permission will need to be added to support content scripts in messages view: https://webextension-api.thunderbird.net/en/78/messageDisplayScripts.html


Does not work alone, maybe what alta88 said is needed:

Edit: it's highly likely special handling will be needed for mailnews urls, ie url schemes in ["imap", "mailbox", "news", "nntp", "snews"].

krystian3w commented 3 years ago

Also nice will be create file to auto-update addon like this:

https://github.com/gorhill/uBlock/commit/826335178ac3978a55bef393f70fadf3e7d060b2

Gorhill no reccomend put addon on domain:

https://addons.thunderbird.net/thunderbird/ (https://addons.thunderbird.net/en-US/thunderbird/addon/ublock-origin/)

alta88 commented 3 years ago

this.browser is null ext-tabs-base.js:242

I've made numerous comments about fixing the Tb tab implementation, for precisely this reason of seamless operation with Fx extensions, and it's been useless so far. See Bug 1649035, for example.

In actuality, this error is likely to be on a 'special' tab type (calendar, chat) or in a transitional situation that may or may not be fatal.

mailnews urls

But this is uBlock's todo, if Tb support is a goal.