Closed Dither closed 7 years ago
Hi @Dither, I agree about :contains and would love to see your improvements. Would you mind forking the repo, updating and sending me a pull request? That would definitely make it easier to see the changes you've made and incorporate them while keeping your ownership in them.
I am not proficient in python as in javascript so if you can't apply ideas from my javascript port (see the link in the first message) then I can't do much. >_>
The main ideas that applicable here are:
|
tag/following-sibling
in the main navigation block -> +
tag[1]
- >:first-of-type
tag[last()]
-> :last-of-type
PS: I don't mind if you not mention my contribution because I believe that "copyrighting" small chunks of code is out of place practice.
oops, sorry. Didn't notice you actually made a full javascript port. Good job! I'll check it out and see the important changes I can pull to the python version.
:contains
pseudo-class is very incompatible with browsers (also deprecated in CSS3) so I've removed it from the script but some more xpathes can be safely converted. See my port for example.