Commits

zamtools committed 01aa15c

Fixed absolute path to minified CSS

  • Participants
  • Parent commits abf0068

Comments (0)

Files changed (2)

File jquery.stacktack.js

                 // necessary for IE to dynamically load stylesheet
                 if (document.createStyleSheet)
                 {
-                    document.createStyleSheet('stacktack.css');
+                    document.createStyleSheet('http://app.stacktack.com/stacktack.min.css');
                 }
                 else
                 {

File jquery.stacktack.min.js

-(function(a){a.fn.stacktack=function(d){var b=a.extend(a.fn.stacktack.defaults,d);var e=["width","onlyshowacceptedanswer","answerlimit","filteranswers","showtags"];if(b.stylesheet){if(a("link[href="+b.stylesheet+"]").length===0){if(document.createStyleSheet){document.createStyleSheet("stacktack.css")}else{a('<link rel="stylesheet" type="text/css" href="'+b.stylesheet+'" />').appendTo("head")}}}function c(f){return'<div class="stacktack-profile"><img src="http://www.gravatar.com/avatar/'+f.email_hash+'?d=identicon&s=32" class="stacktack-gravatar" /><a href="http://www.'+b.site+"/users/"+f.user_id+'" target="_blank">'+f.display_name+"</a><br/>"+f.reputation+"</div>"}return this.each(function(){var f=a(this);f.filter("[id^=stacktack]").add(f.find("[id^=stacktack]")).each(function(l,o){var p=a(o);var g=/\d+$/.exec(o.id);var r=a.extend({},b);if(p.attr("class").length){classes=p.attr("class").split(" ");for(var k=0;k<classes.length;k++){clas=classes[k];classTokens=clas.split("-");if(classTokens.length>1){for(var h=1;h<classTokens.length;h++){classToken=classTokens[h].toLowerCase();if(classToken==="true"||classToken==="false"){classTokens[h]==Boolean(classToken);continue}classTokens[h]=classToken.replace(/percent/i,"%")}if(e.indexOf(classTokens[0].toLowerCase())>-1){if(classTokens.length>2){r[classTokens[0]]=classTokens.slice(1)}else{r[classTokens[0]]=classTokens[1]}}}}}var q=a('<div class="stacktack-container"></div>');if(r.width){q.css("width",r.width)}var n=a('<div class="stacktack-content"><a href="http://www.stacktack.com/" target="_blank" title="StackTack" class="stacktack-logo"><h2>StackTack</h2></a></div>');q.append(n);var m=a('<p class="stacktack-loading">Loading Question ID '+g+"</p>");n.append(m);a.ajax({dataType:"jsonp",data:{apikey:"kz4oNmbazUGoJIUyUbSaLg",body:"true"},url:"http://api."+b.site+"/"+b.apiVersion+"/questions/"+g[0]+"?jsonp=?",success:function(z){m.remove();var v=z.questions[0];var x=a('<div class="stacktack-question"> <div class="stacktack-question-header clearfix">'+c(v.owner)+'<h3><a href="http://www.'+b.site+"/questions/"+v.question_id+'" target="_blank">'+v.title+'</a></h3><div class="stacktack-votes">'+v.score+' Votes</div></div><div class="stacktack-question-body">'+v.body+"</div></div>");n.append(x);if(r.showTags){var w=a('<ul class="stacktack-tags"></ul>');for(var A=0;A<v.tags.length;A++){var s=a("<li>"+v.tags[A]+"</li>");w.append(s)}x.append(w)}var y=a('<div class="stacktack-answers"></div>');n.append(y);var j=[];if(v.answers.length>0){if(r.onlyShowAcceptedAnswer){for(var A=0;A<v.answers.length;A++){if(v.answers[A].accepted){j.push(A)}}}else{if(r.filterAnswers.length>0){for(var A=0;A<v.answers.length;A++){if(a.inArray(v.answers[A].answer_id.toString(),r.filterAnswers)>-1){j.push(A)}}}else{if(r.answerLimit>0){for(var A=0;A<r.answerLimit;A++){j.push(A)}}}}}for(var A=0;A<v.answers.length;A++){var B=v.answers[A];var u=a('<div class="stacktack-answer"><div class="stacktack-answer-header clearfix">'+c(B.owner)+'<h4><a href="http://www.'+b.site+"/questions/"+v.question_id+"#"+B.answer_id+'" target="_blank">Answer '+(A+1)+'</a></h4><div class="stacktack-votes">'+B.score+' Votes</div></div><div class="stacktack-answer-body">'+B.body+"</div></div>");if(B.accepted){u.addClass("stacktack-answer-accepted");u.find(".stacktack-answer-header h4").prepend('<span alt="Accepted" title="Accepted" class="stacktack-answer-check"></span>');u.find(".stacktack-votes").append(" | Accepted")}if(j.length>0){if(a.inArray(A,j)==-1){u.hide()}}y.append(u)}q.find("a").attr("target","_blank");if(j.length>0){var t=a('<a href="#" class="stacktack-answers-more">+ More Answers</a>"');t.click(function(){a(this).hide();y.find(".stacktack-answer:hidden").slideDown("fast");return false});y.append(t)}}});p.append(q)})})};a.fn.stacktack.defaults={site:"stackoverflow.com",apiVersion:0.8,stylesheet:"stacktack.css",answerLimit:0,onlyShowAcceptedAnswer:false,filterAnswers:[],showTags:true,width:null}})(jQuery);
+(function(a){a.fn.stacktack=function(d){var b=a.extend(a.fn.stacktack.defaults,d);var e=["width","onlyshowacceptedanswer","answerlimit","filteranswers","showtags"];if(b.stylesheet){if(a("link[href="+b.stylesheet+"]").length===0){if(document.createStyleSheet){document.createStyleSheet("http://app.stacktack.com/stacktack.min.css")}else{a('<link rel="stylesheet" type="text/css" href="'+b.stylesheet+'" />').appendTo("head")}}}function c(f){return'<div class="stacktack-profile"><img src="http://www.gravatar.com/avatar/'+f.email_hash+'?d=identicon&s=32" class="stacktack-gravatar" /><a href="http://www.'+b.site+"/users/"+f.user_id+'" target="_blank">'+f.display_name+"</a><br/>"+f.reputation+"</div>"}return this.each(function(){var f=a(this);f.filter("[id^=stacktack]").add(f.find("[id^=stacktack]")).each(function(l,o){var p=a(o);var g=/\d+$/.exec(o.id);var r=a.extend({},b);if(p.attr("class").length){classes=p.attr("class").split(" ");for(var k=0;k<classes.length;k++){clas=classes[k];classTokens=clas.split("-");if(classTokens.length>1){for(var h=1;h<classTokens.length;h++){classToken=classTokens[h].toLowerCase();if(classToken==="true"||classToken==="false"){classTokens[h]==Boolean(classToken);continue}classTokens[h]=classToken.replace(/percent/i,"%")}if(e.indexOf(classTokens[0].toLowerCase())>-1){if(classTokens.length>2){r[classTokens[0]]=classTokens.slice(1)}else{r[classTokens[0]]=classTokens[1]}}}}}var q=a('<div class="stacktack-container"></div>');if(r.width){q.css("width",r.width)}var n=a('<div class="stacktack-content"><a href="http://www.stacktack.com/" target="_blank" title="StackTack" class="stacktack-logo"><h2>StackTack</h2></a></div>');q.append(n);var m=a('<p class="stacktack-loading">Loading Question ID '+g+"</p>");n.append(m);a.ajax({dataType:"jsonp",data:{apikey:"kz4oNmbazUGoJIUyUbSaLg",body:"true"},url:"http://api."+b.site+"/"+b.apiVersion+"/questions/"+g[0]+"?jsonp=?",success:function(z){m.remove();var v=z.questions[0];var x=a('<div class="stacktack-question"> <div class="stacktack-question-header clearfix">'+c(v.owner)+'<h3><a href="http://www.'+b.site+"/questions/"+v.question_id+'" target="_blank">'+v.title+'</a></h3><div class="stacktack-votes">'+v.score+' Votes</div></div><div class="stacktack-question-body">'+v.body+"</div></div>");n.append(x);if(r.showTags){var w=a('<ul class="stacktack-tags"></ul>');for(var A=0;A<v.tags.length;A++){var s=a("<li>"+v.tags[A]+"</li>");w.append(s)}x.append(w)}var y=a('<div class="stacktack-answers"></div>');n.append(y);var j=[];if(v.answers.length>0){if(r.onlyShowAcceptedAnswer){for(var A=0;A<v.answers.length;A++){if(v.answers[A].accepted){j.push(A)}}}else{if(r.filterAnswers.length>0){for(var A=0;A<v.answers.length;A++){if(a.inArray(v.answers[A].answer_id.toString(),r.filterAnswers)>-1){j.push(A)}}}else{if(r.answerLimit>0){for(var A=0;A<r.answerLimit;A++){j.push(A)}}}}}for(var A=0;A<v.answers.length;A++){var B=v.answers[A];var u=a('<div class="stacktack-answer"><div class="stacktack-answer-header clearfix">'+c(B.owner)+'<h4><a href="http://www.'+b.site+"/questions/"+v.question_id+"#"+B.answer_id+'" target="_blank">Answer '+(A+1)+'</a></h4><div class="stacktack-votes">'+B.score+' Votes</div></div><div class="stacktack-answer-body">'+B.body+"</div></div>");if(B.accepted){u.addClass("stacktack-answer-accepted");u.find(".stacktack-answer-header h4").prepend('<span alt="Accepted" title="Accepted" class="stacktack-answer-check"></span>');u.find(".stacktack-votes").append(" | Accepted")}if(j.length>0){if(a.inArray(A,j)==-1){u.hide()}}y.append(u)}q.find("a").attr("target","_blank");if(j.length>0){var t=a('<a href="#" class="stacktack-answers-more">+ More Answers</a>"');t.click(function(){a(this).hide();y.find(".stacktack-answer:hidden").slideDown("fast");return false});y.append(t)}}});p.append(q)})})};a.fn.stacktack.defaults={site:"stackoverflow.com",apiVersion:0.8,stylesheet:"stacktack.css",answerLimit:0,onlyShowAcceptedAnswer:false,filterAnswers:[],showTags:true,width:null}})(jQuery);