Created
July 28, 2008 22:03
-
-
Save dustym/2962 to your computer and use it in GitHub Desktop.
This file contains 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 Fix tabs in gist paste. | |
// @namespace Gist | |
// @description nukes tabs | |
// @include http://gist.github.com/ | |
// ==/UserScript== | |
var jQuery = unsafeWindow.jQuery; | |
$ = jQuery | |
$('.paste').prepend('<a href="#" id="fix_the_fucking_tabs">fix the fucking tabs</a>'); | |
$('#fix_the_fucking_tabs').click(function() { | |
$("textarea[name^=file_contents]").each(function(i) { | |
$(this).val($(this).val().replace(/\t/g,' ')); | |
}); | |
return false; | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment