From 53f676bf2ef2e26885ab0ade3f7c506f5213b748 Mon Sep 17 00:00:00 2001 From: bootstraponline Date: Fri, 6 Jul 2012 12:21:55 -0600 Subject: [PATCH] Do not load data on github.com. --- .../livepreview/js/livepreview/livepreview.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/gollum/frontend/public/gollum/livepreview/js/livepreview/livepreview.js b/lib/gollum/frontend/public/gollum/livepreview/js/livepreview/livepreview.js index 39026ca2..bd9500ad 100644 --- a/lib/gollum/frontend/public/gollum/livepreview/js/livepreview/livepreview.js +++ b/lib/gollum/frontend/public/gollum/livepreview/js/livepreview/livepreview.js @@ -343,14 +343,16 @@ var applyTimeout = function () { }; /* Load markdown from /data/page into the ace editor. */ - jQuery.ajax( { - type: 'GET', - url: '/data/' + $.key( 'page' ), - success: function( data ) { - editorSession.setValue( data ); - } - }); - + if (location.host.indexOf('github.com') === -1) { + jQuery.ajax( { + type: 'GET', + url: '/data/' + $.key( 'page' ), + success: function( data ) { + editorSession.setValue( data ); + } + }); + } + $( '#save' ).click( function() { $.save(); });