simov / markdown-viewer

Markdown Viewer / Browser Extension
MIT License
1.08k stars 135 forks source link

if ALLOW ALL in ADVANCED OPTIONS will change page that end with ".md" #194

Closed DIYer22 closed 1 year ago

DIYer22 commented 1 year ago

ALLOW ALL in ADVANCED OPTIONS

image

Then, I it will change any page that end with .md, for example: https://github.com/simov/markdown-viewer/blob/main/README.md

image

Which the page should be : image

simov commented 1 year ago

Yes, have a look at the documentation https://github.com/simov/markdown-viewer#path-matching-priority

Also, do note that:

It is recommended to explicitly allow only the origins that you want the extension to have access to.

DIYer22 commented 1 year ago

Thank you for the amaze works and reply. I have been using this extension for several years, and it has been working fine before, this problem happend a few days ago, so I openned the issue.

DIYer22 commented 1 year ago

By the way, I fix my problem by write a regular expression for ADVANCED OPTIONS that matches all URLs with a domain name is an IP address and ".md" at the end.

https?://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}:?[\w\./-]*\.(?:markdown|mdown|mkdn|md|mkd|mdwn|mdtxt|mdtext|text)(?:#.*|\?.*)?$
simov commented 1 year ago

Interesting, not sure why it could fail because of the latest update, though note that this was a significant update too, among other things it was the migration from manifest v2 to manifest v3 for chrome extensions. I'm glad that it worked out for you in the end. Though again, you really don't need to enable the extension for all origins, it's always better to enable it only for the origins and paths that you expect to read markdown files on.