Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclutter breaks Chrome's PDF viewer #1

Closed
marcocipriani01 opened this issue Mar 18, 2022 · 7 comments
Closed

Unclutter breaks Chrome's PDF viewer #1

marcocipriani01 opened this issue Mar 18, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@marcocipriani01
Copy link

marcocipriani01 commented Mar 18, 2022

Description

When trying to view an online PDF in Chrome, Unclutter displays an error message ("page broken") and the PDF doesn't load. If I toggle the unclutter switch on the top right, the PDF remains hidden under an empty page or is just barely visible on the top (just a few pixels of the PDF can be seen).

A solution

Do not unclutter any page that ends with .pdf or contains Chrome's PDF viewer (note: some pages embed the viewer, so that has to be taken into account too).

Example websites

Literally any online PDF

Tested on

Chrome OS with Chrome 99

@phgn0
Copy link
Contributor

phgn0 commented Mar 19, 2022

Thank you for raising the issue!

I just added the "ends with .pdf" check in ed84ee2. Do you have an example of a site with an embedded pdf viewer?

As an immediate workaround, does the pdf viewer work after excluding the domain with the switch in the top right, then reloading the page?

@phgn0 phgn0 added the bug Something isn't working label Mar 21, 2022
@phgn0
Copy link
Contributor

phgn0 commented Mar 21, 2022

@marcocipriani01 The fix for .pdf files was just released (which takes a while in the Chrome store)!

Please let me know if the extension still breaks for embedded pdf viewers.

@marcocipriani01
Copy link
Author

Thank you, unfortunately the issue is still present in the latest release (I think it's 0.5.6, right?). If I enable "automatically unclutter articles" and open an online PDF, I still get a blank page. Toggling the switch and reloading the page works as a temporary workaround.

Here's an example of a PDF viewer embedded in a page. Unclutter seems work as intended in this case.

@phgn0
Copy link
Contributor

phgn0 commented Mar 22, 2022

Ahh, you are right. I must have mixed up the versions.

I just released 0.6.0 which definitely fixes this issue and also includes other improvements to the article detection (see article-detection.md). Hopefully it's approved by tomorrow morning in the store.

Thanks for the link on the pdf embed. I agree that it looks reasonable enough, let's leave it like that for now.

@marcocipriani01
Copy link
Author

OK, I'll let you know tomorrow if the issue is fixed!

@marcocipriani01
Copy link
Author

I can confirm that v0.6.0 fixes the bug. However, if I manually click on the Unclutter icon, the PDF page gets uncluttered, and therefore becomes blank like before. I'm nitpicking here, but an error message would be nice for new users (something like "Unclutter doesn't work on PDFs").

Anyway, I think that the latest release is much more polished, and even manages to clean pages WAY better than Chrome's Reader Mode. Wikipedia becomes a ugly mess with Reader Mode, while Unclutter makes a damn good job. Keep up the good work!

@phgn0
Copy link
Contributor

phgn0 commented Mar 25, 2022

Thank you for the nice feedback! ❤️

With fc93626 the extension now refuses to activate on .pdf, .jpg and other non-article file extensions even if you click the extension icon. This should be released early next week. An error message would indeed be nice, I added this to the tasks in #9.

Thank you again for reporting this! Please let me know of other issues that you find. There's now a "Report bug" icon within the extension itself that hopefully makes creating an issue here easier.

@phgn0 phgn0 closed this as completed Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants