On Fri, Nov 02, 2018 at 08:28:30PM +0200, Viacheslav Chimishuk wrote: > > How would the line to block Youtube ads look like? > > > > FWIW I'm against introducing another URL pattern format, and I'd rather > > use the existing URL pattern class which is also used for ":set -u" > > (aka "per-domain settings"). See: > > https://github.com/qutebrowser/qutebrowser/issues/4188 > > I was thinking more about simple substring matching, which is much > faster then regular expressions we use for options. And should be > enough for blocking.
Options/URL patterns don't use regular expressions. > I propose to treat `~` prefix as a substring instead of domain > name. For example, next file parses to substrings list. Again, use URL patterns. I will not accept any contributions inventing yet another URL format, no matter how simple. Let's be consistent with what the rest of qutebrowser uses. With URL patterns, I think they should even be backwards-compatible with the "one host per line" format. > As a part of this change it would be great to support `file://` > protocol in `content.host_blocking.lists` list, so user can serve the > file from the disk without running web-server (if it is not > implemented already, haven't checked it). It already is. > > Note that I'm busy with university work on qutebrowser at least until > > christmas, so my time to look at PRs is quite limited currently: > > https://lists.schokokeks.org/pipermail/qutebrowser-announce/2018-September/000051.html > > https://lists.schokokeks.org/pipermail/qutebrowser-announce/2018-October/000053.html > > Yeah... Maybe other people can help you with that and accept PRs? :) I > can see Jay Kamat is very active in the project. In this case QB can > progress and grow faster. That's already the case, but it won't change that there'll be conflicts when I'm refactoring things (like moving the adblocker to a plugin) while people are contributing stuff. I won't be able to accommodate for that. On Fri, Nov 02, 2018 at 08:54:58PM +0200, Viacheslav Chimishuk wrote: > I can see ublock uses regexp for its list. Implementing regexp support > we can reuse their files, which will get us a huge > benefit. Unfortunately their format is not compatible with UrlPattern > we use and looks much more complicated than a simple regexp. IMHO, it > is better to start with simple substring match for now. > > https://github.com/gorhill/uBlock/wiki/Static-filter-syntax Yeah, the existing uBlock/ABP syntax would be great to support: https://github.com/qutebrowser/qutebrowser/issues/29 I agree that's probably a bigger undertaking though. Florian -- https://www.qutebrowser.org | m...@the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc I love long mails! | https://email.is-not-s.ms/
Description: PGP signature