Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Userscript - make specific long files in github online diff view shorter, since you don't need to check them.
// ==UserScript==
// @name GitHub Suppress Diffs
// @version 2013.10.29
// @namespace FET
// @description Suppress style.css
// @include http*://*
// ==/UserScript==
// Files to suppress:
// Call resize on the specified files:
function suppressFiles(path){
for (var url in path) {
resizeDiff(document.querySelector('.meta[data-path="' + path[url] + '"]').nextElementSibling);
// Resize the diff area in github:
function resizeDiff(obj) { = "200px"; = "auto";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment