Skip to content

Instantly share code, notes, and snippets.

@sgolemon
Last active April 12, 2024 09:22
Show Gist options
  • Save sgolemon/d5009d7bd98a045c75cbc73497dd826e to your computer and use it in GitHub Desktop.
Save sgolemon/d5009d7bd98a045c75cbc73497dd826e to your computer and use it in GitHub Desktop.
Bookmarklet for expanding GitHub file tree view to a larger size (600px)
// To use, paste this into a Bookmark, from there, just click the bookmark whenever you're on a page and the file tree isn't quite wide enough.
// The original, non-encoded version of this bookmarklet is: document.evaluate("//div[@data-target='diff-layout.sidebarContainer']", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.style.width = '600px'
// Exact width can be modified by editing the '###px' value at the end.
javascript:(function()%7Bdocument.evaluate(%22%2F%2Fdiv%5B%40data-target%3D'diff-layout.sidebarContainer'%5D%22%2C%20document%2C%20null%2C%20XPathResult.FIRST_ORDERED_NODE_TYPE%2C%20null).singleNodeValue.style.width%20%3D%20'0px'%7D)()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment