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
The Norwegian list has a new URL now #41
Comments
Wait till gorhill decides. |
Ah, okay. The old link will still work in the meantime, but will be less frequently updated. |
|
Ah, okay. I'll make sure to keep the old list around for at least another two weeks, then. |
Correction, I was confused: they would not loose their subscription, it's just that the attempt at downloading an up to date version would fail, with no other consequence than an out of date list. |
@gorhill uBO doesn't recognize |
Apparently I only became aware just now that uBO doesn't recognise hours as a unit of time, as per uBlockOrigin/uBlock-issues#41 (comment).
While I wouldn't want to upset anyone, I hope that this is a good time for me to admit that there have been some occasions where I've had problems finding sufficient documentation about various syntax features, sometimes even having had to look up GitHub comment threads or have had to randomly guess (The !#if and ! Redirect tags comes to mind up until just recently). So when Adblock Plus' explanation of the expiration feature explicitly mentions that hours are supported, it took me by surprise to learn from Jspenguin's comment that it wasn't supported in uBO. While I would be supportive of uBO supporting hours natively, I can make due with making hours round up instead (so that listing it as "12 hours" would mean 12h on ABP and 1 day on uBO/Nano), so I support Jspenguin's proposition. |
@DandelionSprout Yes, uBO's doc/wiki is known to be pretty horrible, a lot of details are buried in release notes which are not indexed. The code itself does have some useful comments embedded, and I use I am trying to write some docs for both uBO and my fork. I have some deep implementation details available here about the expire header parsing logic. Note that uBO will take the first valid expire header, so if you have:
uBO will take the 1 day. I'm not sure how ABP will act when there are duplicate headers though. Note that Nano does recognize hour as unit of time but will round it up to nearest day, so it will take the first line and treat it like 1 day. Also, redirect header does not work at all in uBO and all headers must be in the first 1024 characters of the file. I think I have documented all the quirks about publishing filter lists, I'm considering copying it to uBO's wiki but I haven't got around to do that yet. Also I don't want to put Nano's doc in uBO's wiki, so there's quite a bit of cleaning up to do. As an effort to document uBO, you can ask me any implementation details and I'll document them. As a side note, uBO is very tolerant when it comes to filters syntax and have no problem throwing out part of your filter if it doesn't like it. I patched the filter parser to expose all these quirks, this is one of the major feature of my fork and I find it a lot easier to write correct filters on the first shot. It does slow down filter parsing for all filter lists though, but just a tiny bit. |
The linked-to documentation does look pretty good to me, but it'd be even better if it also covered uses in Adblock Plus and Adguard, since although I estimate through a user survey that more than 90% of the users of my Norwegian list are using uBlock Origin, I wouldn't want to break compatibility with other blocker tools. As for the expire header, I decided to try with a And as for keeping the old list around, I suddenly realised an hour ago that "Wait a minute. Why don't I just make use of the !#include tag to link the old list to the new list?", and it seems to me to have worked out splendidly. |
@DandelionSprout I'm not familiar with internal working of ABP and Adguard, I can link to their documentation but I can't make a clear side-by-side comparison unless I investigate the code. There could be more than one way to interpret the documentation but there is only one way to interpret the code. If you are familiar with them, you are welcomed to contribute. Also documentation could contains simplifications, for example, I said you need to have subscribe links present in the document when And yes, |
Now that you mention it, there are a few things about list syntaxes that I've always been curious about: • Does the expire header have to use UTC, or does it support other timezones as well, e.g. CEST (Central European Summer Time)?
I don't imagine that I'd need to keep the old file around for more than a month, and my list isn't among the most popular lists in the world either, meaning that I doubt it'd hit some kind of request limit. So I hope it'll do fine for now. |
@gorhill As for the expires header in hour, I think the low cap being 1 day is healthy, it prevents abuse; but for things like 30 hours, I don't think having a float in the data object would break stuff, I haven't tested it though. I have a 60 day upper cap in Nano because if the expires delay overflows to |
Ah, okay. My first question was meant to be about the Last Modified header instead of the Expires header, but now that I know that it's not an actually important header anyway, I now know that the wording of Last Modified doesn't really matter anyway, which is kind-of why I asked all these questions so that I could learn about them properly. Thanks for teaching me about it. |
Incorporated things that I learned about from uBlockOrigin/uBlock-issues#41 (comment)
Yes, they are allowed, actually, anything is allowed after the time unit, so
Headers must follow the format shown in my doc, so no, adding a translation is not going to work. However, since Also make sure to test your filter list in ABP, I can't say how it will react to weird header syntax. I have opened a meta thread for all documentation related discussions: NanoAdblocker/NanoCore#167 I will probably open a new repo specifically for docs, as I find GitHub's wiki difficult to work with (especially for localization). |
Sure. Thanks. |
@DandelionSprout I have investigated ABP's code, it will take the last header, even if it is invalid, and validate it later. So if you have:
ABP will take the second header, and realize later that it is not good, and fallback to default expire time. So you want:
uBO will support As a side note, Nano on Edge behaves differently than uBlock Edge, some filters won't be compatible. uBlock Edge treats Nano doesn't have a special pre-parsing directive for now, so if you run into difficulties, let me know. |
@nikrolls fyi
|
I give my gratitudes to uBlockOrigin/uBlock-issues#41 (comment) for figuring this out.
Hello again. I decided to change the URL of Dandelion Sprouts norske filtre from https://raw.githubusercontent.com/DandelionSprout/adfilt/master/ExperimentalNorwegianList.txt to https://raw.githubusercontent.com/DandelionSprout/adfilt/master/NorwegianList.txt, since the list has definitely progressed beyond merely being experimental.
Would it possible to update its URL in uBO's default lists accordingly, or?
The text was updated successfully, but these errors were encountered: