Skip to content

Instantly share code, notes, and snippets.

@aldenks
Last active August 9, 2021 12:44
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aldenks/f0f0a5ea754bbe5feb2a to your computer and use it in GitHub Desktop.
Save aldenks/f0f0a5ea754bbe5feb2a to your computer and use it in GitHub Desktop.
Wide github diffs on demand
/**
* Put this in a bookmark, click it when you want to make github pull request diffs extra wide!
* There's a million extensions that do this, but this is only on demand and small enough you
* you can understand it and trust it with access to your github.
*/
javascript: document.body.classList.toggle('full-width');
@mmcalli
Copy link

mmcalli commented Feb 6, 2017

This doesn't seem to work for me anymore.

OSX 10.12.2
Chrome on OSX, Version 55.0.2883.95 (64-bit)
Github Enterprise 2.8.6

@williamdenton
Copy link

this works now, its not perfect, but it is simple

javascript: document.body.classList.toggle('full-width');

@jijojv
Copy link

jijojv commented Nov 13, 2017

@wsams
Copy link

wsams commented Jul 11, 2018

Thanks for the tip @williamdenton. This also works well as a bookmarklet.

@kirenotneb
Copy link

Content Security Policy (CSP) prevents using this as a Bookmarklet in Firefox (see this GitHub blog post), but it does function from the console.

@moonlight16
Copy link

@williamdenton niiiccceee! thx

@aldenks
Copy link
Author

aldenks commented Aug 31, 2020

Thanks @williamdenton and noted @kirenotneb. updated w/ the current code @williamdenton shared and renamed to widehub.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment