Last active
August 29, 2015 14:26
-
-
Save zbee/ca7286c8f69dc4cd0388 to your computer and use it in GitHub Desktop.
Click the code preview of Gists to view the full gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Click Gist code to view | |
// @namespace Gist-click-to-view | |
// @description Click the code preview of Gists to view the full gist | |
// @version 1 | |
// @grant none | |
// @include https://gist.github.com/* | |
// @require https://code.jquery.com/jquery-2.1.4.min.js | |
// ==/UserScript== | |
$(".gist-snippet").each(function(index, value) { | |
var url = $(this).find("strong").parent().attr("href") | |
$(this).attr("link", url) | |
}) | |
$(".gist-snippet > div:nth-child(2)").css("cursor", "pointer").click(function() { | |
window.location = $(this).parent().attr("link") | |
}) | |
//This was useful when GitHub thought it'd be cool to disable this feature; now I guess this is useless. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment