You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
I have had this problem for 3-4 months now. Before it was working.
I was really baffled why it didn't work, until I started disabling extensions one-by-one.
Basically I cannot comment on 9gag when https-everywhere is enabled.
I am using firefox 40 on Windows 7.
https-everywhere is 5.1.0
Apparently it fails because of missing tests, but I can't figure out how to add the tests correctly, they're never counted as valid tests for the exclusion clause. Can someone help with that?
The "?!" is a negative lookahead assertion, which meanus "match everything that is not followed by this pattern. But since this is an exclusion pattern, it's saying "rewrite m.9gag.com/about, m.9gag.com/advertise, www.9gag.com/about, etc."
I generally recommend resolving that double negative by turning exclusion rules into positive rules, i.e. rewrite only those paths. However, since the other paths would then fall through to the default http->https rewrite, that would be incorrect. You'd additionally have to add an explicit rewrite for all the other hosts, and remove the default http->https rewrite.
What I understood is that we need to add an explicit rule for each subdomain/page, or to be specific, for all the functioning subdomains as well as the specific pages/directories listed in the exclusion pattern. And then we need to remove the http to https rule (I think you mistakenly wrote remote instead of remove. If you did actually mean "remote", then I'd be grateful if someone could explain that bit as well). Is that correct?
I'm quite sure that is incorrect because it doesn't even push, but I'm stuck. Travis reports that error.
../src/chrome/content/rules/9gag.xml:54: element rule: Relax-NG validity error : Element rule failed to validate attributes
Relax-NG validity error : Extra element rule in interleave
As far as I can see, two things are happening. First of all, the error is caused by the escaped slashes. You want / in place of / throughout.
Then, for the rules to apply correctly, (?: should be replaced by ( (since otherwise, the subdomain isn't captured).
By the way, I tested with http://m.9gag.com/privacy which gives a 404. Of course, rewriting a 404 to a https 404 is fine but it suggests that going through the rules might not be a bad idea.
Activity
TheNavigat commentedon Aug 27, 2015
I tried fixing this. The following works, but I can't push it.
Apparently it fails because of missing tests, but I can't figure out how to add the tests correctly, they're never counted as valid tests for the exclusion clause. Can someone help with that?
jsha commentedon Aug 27, 2015
The exclusion pattern is a bit confusing:
^http://(?:m\.|www\.)?9gag\.com/+(?!(?:about|advertise|faq|login|privacy|recover|signup|tos)(?:$|[?/])|favicon\.ico|img/)The "?!" is a negative lookahead assertion, which meanus "match everything that is not followed by this pattern. But since this is an exclusion pattern, it's saying "rewrite m.9gag.com/about, m.9gag.com/advertise, www.9gag.com/about, etc."
I generally recommend resolving that double negative by turning exclusion rules into positive rules, i.e. rewrite only those paths. However, since the other paths would then fall through to the default http->https rewrite, that would be incorrect. You'd additionally have to add an explicit rewrite for all the other hosts, and remove the default http->https rewrite.
TheNavigat commentedon Aug 28, 2015
That is a little bit too confusing for me.
What I understood is that we need to add an explicit rule for each subdomain/page, or to be specific, for all the functioning subdomains as well as the specific pages/directories listed in the exclusion pattern. And then we need to remove the http to https rule (I think you mistakenly wrote remote instead of remove. If you did actually mean "remote", then I'd be grateful if someone could explain that bit as well). Is that correct?
jsha commentedon Aug 28, 2015
Your understanding is correct. And you're right, I meant "remove." I edited the post to fix it.
TheNavigat commentedon Aug 28, 2015
Here,
I'm quite sure that is incorrect because it doesn't even push, but I'm stuck. Travis reports that error.
Line 54 corresponds to that line.
I do understand what the error says, but I'm not sure how to fix it.
TheNavigat commentedon Aug 30, 2015
@fuglede Can you please help with that?
fuglede commentedon Sep 6, 2015
As far as I can see, two things are happening. First of all, the error is caused by the escaped slashes. You want
/in place of/throughout.Then, for the rules to apply correctly,
(?:should be replaced by((since otherwise, the subdomain isn't captured).By the way, I tested with http://m.9gag.com/privacy which gives a 404. Of course, rewriting a 404 to a https 404 is fine but it suggests that going through the rules might not be a bad idea.
OlleNeiman commentedon Nov 5, 2016
This still doesn't work, btw.
Update and rename 9gag.xml to 9gag.com.xml, Fix #2657 (#7795)