Created
April 6, 2011 07:39
-
-
Save zolotov/905279 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
function highlight(stackTraceDiv) { | |
//replace filenames to link | |
var text = stackTraceDiv.html(); | |
var highlighted = text.replace(/[0-9a-z_A-Z\-\.\/]+:\d+/g, '<a class="ide-link" href="/?message=$&">$&</a>'); | |
stackTraceDiv.html(highlighted); | |
//bind links click event | |
$('a.ide-link').click(function(e) { | |
e.preventDefault(); | |
var url = $(this).attr("href"); | |
$.getJSON('http://localhost:8091' + url + '&callback=?', function(json) { | |
//do nothing | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment