From d262c9f8532484aca5a9c7035645035f5ffd541b Mon Sep 17 00:00:00 2001 From: John Crepezzi Date: Fri, 25 Nov 2011 10:28:26 -0500 Subject: [PATCH] use compressed application.js --- TODO.md | 1 + static/application.min.js | 2 ++ static/index.html | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 static/application.min.js diff --git a/TODO.md b/TODO.md index 2d40912..97b7331 100644 --- a/TODO.md +++ b/TODO.md @@ -8,6 +8,7 @@ * test new interface in browsers * compress assets * fix issues with deploy +* get staticCache back in # shared version only diff --git a/static/application.min.js b/static/application.min.js new file mode 100644 index 0000000..9893a7a --- /dev/null +++ b/static/application.min.js @@ -0,0 +1,2 @@ +///// represents a single document +var haste_document=function(){this.locked=!1};haste_document.prototype.load=function(a,b,c){var d=this;$.ajax("/documents/"+a,{type:"get",dataType:"json",success:function(e){d.locked=!0,d.key=a,d.data=e.data;try{var f=c?hljs.highlight(c,e.data):hljs.highlightAuto(e.data)}catch(g){f={value:e.data,language:null}}b({value:f.value,key:a,language:f.language||c})},error:function(a){b(!1)}})},haste_document.prototype.save=function(a,b){if(this.locked)return!1;this.data=a;var c=this;$.ajax("/documents",{type:"post",data:a,dataType:"json",success:function(d){c.locked=!0,c.key=d.key;var e=hljs.highlightAuto(a);b({value:e.value,key:d.key,language:e.language})}})};var haste=function(a,b){this.appName=a,this.baseUrl=window.location.href,this.$textarea=$("textarea"),this.$box=$("#box"),this.$code=$("#box code"),this.options=b,this.configureShortcuts(),this.configureButtons(),b.twitter||$("#key .box2 .twitter").hide()};haste.prototype.setTitle=function(a){var b=a?this.appName+" - "+a:this.appName;document.title=b},haste.prototype.lightKey=function(){this.configureKey(["new","save"])},haste.prototype.fullKey=function(){this.configureKey(["new","duplicate","twitter","link"])},haste.prototype.configureKey=function(a){var b,c=0;$("#key .box2 .function").each(function(){b=$(this);for(c=0;c - +