diff --git a/bower.json b/bower.json index 6f20eb6..b86ba55 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "gist", - "version": "0.0.1", + "version": "0.0.2", "authors": [ "Simon Vieille " ], diff --git a/web/app/js/app.js b/web/app/js/app.js index 797bab0..5ed69b0 100644 --- a/web/app/js/app.js +++ b/web/app/js/app.js @@ -69,6 +69,12 @@ var editorEvents = function() { $('.show-diff').click(function() { $($(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() {