Hosts: Add `! Title:` to the filter lists so that they can show pretty names when added to e.g. uBlock

Created on 5 Aug 2018  路  9Comments  路  Source: StevenBlack/hosts

STR: add https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts as a custom filter to uBlock Origin

AR: It shows the full url instead of saying Unified hosts:

capture

Relevant: https://github.com/gorhill/uBlock/issues/2501

enhancement

Most helpful comment

I confirm that uBO will accept

# Title:

All 9 comments

Hello! Thank you for opening your first issue in this repo. It鈥檚 people like you who make these host files better!

This would be a prepend in write_opening_header().

It would be good to .join(header_params["extensions"]) into the title.

Hi @FatOrangutan I'm not deep into that but I can write the patch into the python3only branch.

My question is which of the following is okay for you ?

# ! Title: StevenBlack/hosts
0.0.0.0 github.com
0.0.0.0 git.io
! Title: StevenBlack/hosts
0.0.0.0 github.com
0.0.0.0 git.io

I'm asking because your referenced issue is talking about the filter list. But this repository only produce the hosts file or am I missing something else in between ?

Have a nice day/night.

I wouldn't mind adding this feature directly into my list if that would be useful

Hi @funilrys, ! Title: StevenBlack/hosts is the one that uBlock (and I think other adblockers) can recognise.

I'm asking because your referenced issue is talking about the filter list. But this repository only produce the hosts file

That's a good point that I hadn't considered. Given this, I would expect my issue to be out of scope, but then StevenBlack seemed to be interested so I don't know..

Hi @FatOrangutan,
Daniel @lightswitch05,
Steve @StevenBlack,

To answer @lightswitch05

You can if you want (and you don't have to ask) but my understanding make this impossible to me if you manage hosts file.

For the context

I do not use or generate filter list (yet !? :thinking: ) so I'm not familiar with the expected behavior.
So I asked @FatOrangutan if the expected line should be in a hosts file comment like :

# ! Title: StevenBlack/hosts (Note the presence of # at the beginning)

or a filter comment (is that actually a comment ? :thinking: ) like :

! Title: StevenBlack/hosts (Note the non-presence of # at the beginning)

From @FatOrangutan's answer to @StevenBlack and other(s)

If the expected line (we may need someone else to confirm that point) should be like:

! Title: StevenBlack/hosts (Note the non-presence of # at the beginning)

Then this issue is out of scope as it does not respect the hosts file format.

But if someone can confirm that

# ! Title: StevenBlack/hosts (Note the presence of # at the beginning)

Also works for as expected, then this issue is not out of scope and I'm ready to write the code (or someone else if I take my time :joy_cat: )!

Conclusion

We need someone or another 4 eyes who live with filter list (also known as adblock filter list isn't that right or I'm lost again ? :thinking: ) to confirm the scope of this issue.

Have a nice day/night.

I tested this in my filter lists, and # Title: works too. # ! Title: doesn't work though. Would be great if somebody else could confirm.

I confirm that uBO will accept

# Title:

Let's reopen this and close #843 Steve @StevenBlack ... Will write the code when I have a bit of time today or tomorrow.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

OkazakiLeir picture OkazakiLeir  路  20Comments

tgy picture tgy  路  42Comments

vixie picture vixie  路  51Comments

dcramer picture dcramer  路  26Comments

jonozzz picture jonozzz  路  20Comments