revision diff link

This commit is contained in:
Simon Vieille 2015-05-11 18:40:27 +02:00
parent 6294a20c7b
commit 85ffb3a12e
2 changed files with 7 additions and 1 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "gist", "name": "gist",
"version": "0.0.1", "version": "0.0.2",
"authors": [ "authors": [
"Simon Vieille <simon@deblan.fr>" "Simon Vieille <simon@deblan.fr>"
], ],

View file

@ -69,6 +69,12 @@ var editorEvents = function() {
$('.show-diff').click(function() { $('.show-diff').click(function() {
$($(this).data('target')).toggle(); $($(this).data('target')).toggle();
}); });
if ((document.location.href).indexOf('#diff-') !== -1) {
var anchor = '#' + (document.location.href).toString().split('#')[1];
$('.show-diff[href="' + anchor + '"]').click();
document.location.href = anchor;
}
} }
var mainEditorEvents = function() { var mainEditorEvents = function() {