sindresorhus/refined-github

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Use `alt+click` to toggle all rich/source diff #2615

mfulton26 posted onGitHub

I like how I can alt+click the collapse/expand button when viewing files changed in a pull request. I would like to also be able to alt+click the "Display the source diff" and the "Display the rich diff" buttons to quickly switch diff viewers for all files on the page (where applicable).


We actually have a feature that default to the rich diff, but it caused the URL to change and the page to scroll unexpectedly. https://github.com/sindresorhus/refined-github/issues/2041

I think if someone fixes that feature you wouldn't need this one.

posted by fregante over 5 years ago

In our case, that would be amazing to visualize screenshot diffs for visual testing in a PR. Right now they are all closed by default, need to click on each one...

posted by soundstep about 5 years ago

This can be added, but it can't just .click() all the elements because it would cause https://github.com/sindresorhus/refined-github/issues/2041

It'd have to load the page manually (with fetchDom) and change the selected button. More info in https://github.com/sindresorhus/refined-github/issues/2041#issuecomment-493492294

posted by fregante almost 5 years ago

Interesting. I've been using the following snippet as a custom search engine in chrome (mapped to the ghrd keyword) and I haven't seen any issues. I use it a good amount, even on large PRs with lots of images.

javascript: document.querySelectorAll('.js-rendered').forEach(button => button.click());
posted by mfulton26 almost 5 years ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests