Add site.min.js to pre commit.

master
Nick Sergeant 2013-02-18 17:46:51 -05:00
parent bdcb84ebd6
commit 77a321926f
2 changed files with 3 additions and 1 deletions

View File

@ -59,3 +59,4 @@ git add /Users/Nick/Code/snipt/media/css/pro.css
git add /Users/Nick/Code/snipt/media/css/snipt.css
git add /Users/Nick/Code/snipt/media/js/snipt-all.min.js
git add /Users/Nick/Code/snipt/media/js/pro-all.min.js
git add /Users/Nick/Code/snipt/media/js/src/modules/site.min.js

View File

@ -10,5 +10,6 @@ if(!errors){$('.payment-errors').hide();$('.payment-loading').show();Stripe.crea
return false;});}
if(this.$body.hasClass('login')){$('input#id_username').focus();}
if(window.gittip_username){this.$aside_main.html(this.$aside_main.html().replace(/\[\[.*gittip.*\]\]/,'<iframe style="border: 0; margin: 0; padding: 0;" src="https://www.gittip.com/'+window.gittip_username+'/widget.html" width="48pt" height="22pt"></iframe>'));$('iframe',this.$aside_main).parent('p').prev('p').css('margin-bottom','10px');}
$('div.markdown pre code').each(function(i,e){hljs.highlightBlock(e);});if(this.$body.hasClass('homepage')){setTimeout(function(){$('div.faces img').show();},700);}
$('div.markdown pre code').each(function(i,e){hljs.highlightBlock(e);});if(this.$body.hasClass('homepage')){setTimeout(function(){var $facesInner=$('div.faces div.inner');var $faces=$('a',$facesInner);for(var i=0;i<$faces.length;i++){var $face=$faces.eq(i);var imageWidth=$('img',$face).width();if(imageWidth!=50){$face.remove();}}
$facesInner.hide();$facesInner.css('text-indent','0');$facesInner.fadeIn(400);},700);}
window.ui_halted=false;},events:{'showKeyboardShortcuts':'showKeyboardShortcuts','click a.mini-profile':'toggleMiniProfile'},keyboardShortcuts:function(){var $body=this.$body;var that=this;$search_queries=this.$search_queries;$search_page_query=this.$search_page_query;$search_query=this.$search_query;$document=$(document);$document.bind('keydown','/',function(e){if(!window.ui_halted){e.preventDefault();if($body.hasClass('search')){$search_page_query.focus();}else{$search_query.focus();}}});$document.bind('keydown','h',function(e){if(!window.ui_halted){window.ui_halted=true;$body.trigger('showKeyboardShortcuts');}else{if(that.$keyboard_shortcuts.is(':visible')){that.$keyboard_shortcuts.modal('hide');}}});$document.bind('keydown','t',function(e){if(!window.ui_halted){window.open('','_blank');}});$document.bind('keydown','r',function(e){if(!window.ui_halted){location.reload(true);}});$document.bind('keydown','Ctrl+h',function(e){if(!window.ui_halted){history.go(-1);}});$document.bind('keydown','Ctrl+l',function(e){if(!window.ui_halted){history.go(1);}});this.$search_queries.bind('keydown','esc',function(e){if(!window.ui_halted){e.preventDefault();this.blur();}});},showKeyboardShortcuts:function(){this.$keyboard_shortcuts.modal('toggle');},toggleMiniProfile:function(e){this.$aside_nav.toggleClass('open');return false;},inFieldLabels:function(){$('div.infield label',this.$body).inFieldLabels({fadeDuration:200});},stripeResponseHandler:function(status,response){var $form=$('form#pro-signup');if(response.error){$('button[type="submit"]',$form).removeAttr('disabled');$('.payment-loading').hide();$('.payment-errors').text(response.error.message).show();}else{var token=response.id;$('input#name').val('');$('input#number').val('');$('select#exp-month').val('');$('select#exp-year').val('');$('input#cvc').val('');$form.append("<input type='hidden' name='token' value='"+token+"'/>");$form.get(0).submit();}}});})(snipt.module('site'));