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

fix: handle chrome's pretty print button #341

Closed

Conversation

bukowskiadam
Copy link

@bukowskiadam bukowskiadam commented Sep 15, 2023

Trying to fix #340

I tested it locally, and it works.

A way to build that worked for me:

  1. use node v10 - fnm use 10 or nvm use 10
  2. npm i and ignore node-gyp errors
  3. npm run release (builds minified files) and load unpacked like stated in the readme file

@bukowskiadam
Copy link
Author

Now I see that the second version of the code breaks some pages. It removed the first div from any page opened 😂

@RandTrawick
Copy link

RandTrawick commented Sep 15, 2023

@bukowskiadam,
I tested your update and it works perfectly for me in Chrome Version 117.0.5938.62 (Official Build) (arm64).

It definitely would be good to update the sass version at some point to get rid of that crusty old node-gyp dependency that caused so many years of pain.

@tulios
Copy link
Owner

tulios commented Sep 15, 2023

Thanks for the PR. Im planning to address the issue this weekend

@chinhoe
Copy link

chinhoe commented Sep 19, 2023

@bukowskiadam would it be possible to retrieve the 'pre' node using a for loop? just in case there are more elements in the future.

@bukowskiadam
Copy link
Author

@chinhoe I think there is more to improve in the code. Now, with my fixed code, I get two scrollbars like this 👇🏻
image

Looping over elements might break some pages as I did blindly removing the first element if it's not a PRE. Every direct child (body > pre) would be then a victim.

Copy link

@sant3001 sant3001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@emrearslan
Copy link

we understand again in these few days that the plugin is very useful 😄 when will the pr be merged?

Copy link

@sant3001 sant3001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request doesn't seem relevant anymore. The extension is working again in the last version of Chrome.

@bukowskiadam
Copy link
Author

True story, closing. I confirm that the newest stable chrome is back to normal because they got rid of the checkbox. Thank you all for the attention!

@bukowskiadam bukowskiadam deleted the fix-chromes-pretty-print branch October 4, 2023 06:37
@chulapitta
Copy link

I think the Pretty Print checkbox is back in the latest Chrome update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extension no longer works in Chrome dev channel
7 participants