wikitree / wikitree-browser-extension

Browser extension that adds advanced features to WikiTree.com.
MIT License
27 stars 23 forks source link

Recognition of Profile pages. #26

Closed Lesko987 closed 2 years ago

Lesko987 commented 2 years ago

I noticed that pageProfile is set to true also on some nonprofile pages. For instance on https://www.wikitree.com/wiki/Space:Data_Doctors_Report_2022-10-02 it causes the timeline to display.

The problem is in regex: /(\/wiki\/)\w.-[0-9]/g where "." should be "[^:]". This regex /(\/wiki\/)\w[^:]-[0-9]/g should exclude all other namespaces.

Aleš

harrislineage commented 2 years ago

I'll take this one, I created the initial common.js for pages.

Lesko987 commented 2 years ago

I corected the regex, you got it wrong. dot means any character and [^:] equaly means any character except semicolon. * means any number of repetitions and must be after the dot or [^:] expression.

harrislineage commented 2 years ago

I corected the regex, you got it wrong.

Thanks, I missed that.