simov / markdown-viewer

Markdown Viewer / Browser Extension
MIT License
1.05k stars 133 forks source link

Exclusion mechanism isn't very user friendly #133

Closed rjwut closed 1 year ago

rjwut commented 3 years ago

Thank you for creating Markdown Viewer; I find it very useful. However, I recently ran into an issue, and while I was eventually able to resolve it, it took a lot longer than it seems like it should. If a user wants to exclude a domain or path from being processed by Markdown Viewer, the way to do so is not super obvious. Here is my experience with this:

  1. Went to a page for a Markdown file on GitHub and got a blank screen.
  2. Reloaded the page, same result.
  3. Realized that Markdown Viewer was probably the culprit.
  4. Tried toggling the HTML/Markdown button without luck.
  5. Spent the next several minutes scouring the options looking for a way to exclude GitHub.
  6. Failed to find any such option, resorted to disabling the Markdown Viewer extension temporarily.
  7. Ran into the problem again a few days later.
  8. Looked through the options again to see if there was something I had missed.
  9. Spent several minutes reading over documentation.
  10. Finally found the "Exclude Origin" section.
  11. Googled to figure out how to write a regex that will never match.
  12. Added *://github.com - $a to the allowed origins. Now it finally works.

Putting something under "Allowed Origins" to exclude it is unintuitive, and requiring users to invent or find an unmatchable regex is not user friendly. It would be nice to change the options to have explicit inclusion and exclusion rules. To be super user friendly, you could add something to the main popup view that allows the user to quickly include/exclude the origin or path for the current tab.

simov commented 3 years ago

Hi @rjwut, thanks for your feedback.

Yes I agree that excluding an origin can be unintuitive. Initially when I decided to remove the default access to all origins that I was requesting, and when I created the UI for managing the origins, I didn't even had the Allow All button there. Because the point was to add origins one by one explicitly.

But then someone pointed out that adding every origin manually is not user friendly either. And so the decision was made to add that button, which in itself created the exclude issue.

bixycler commented 2 years ago

I think the solution is simple:

  1. Replace the label Allowed Origins by Origin Settings;
  2. In each origin settings' MATCH, add a button Match nothing to automatically set the regex to $a.
simov commented 1 year ago

This was fixed in v5.1, now the extension has a much better chance of determining the content to render automatically. Have a look at the updated Advanced Options page.

What was causing this was the fact that the extension was checking for the correct content-type OR the correct path matching regexp, where now it checks for both using logical AND instead.

This fixes virtually all issues present in the previous implementation. Another change is that the header detection now includes the text/plain content type.

So just to reiterate - excluding origins is no longer needed, it is still there and it still works as before, but in 99% of the cases you simply won't need it.

Let me know if you find any issues though.