(function() { var TeaspoonInterface, bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; TeaspoonInterface = (function() { function TeaspoonInterface() { this.filter = bind(this.filter, this); this.files = $u("#teaspoon-suite-list .file a"); this.input = $u("#teaspoon-filter-input")[0]; this.input.value = ""; this.input.onkeyup = this.filter; } TeaspoonInterface.prototype.filter = function() { var file, i, len, ref, results; ref = this.files; results = []; for (i = 0, len = ref.length; i < len; i++) { file = ref[i]; if (LiquidMetal.score(file.innerHTML, this.input.value) > 0) { results.push(file.parentNode.style.display = "block"); } else { results.push(file.parentNode.style.display = "none"); } } return results; }; return TeaspoonInterface; })(); window.onload = function() { return new TeaspoonInterface(); }; /*! * LiquidMetal * Copyright (c) 2009, Ryan McGeary (ryanonjavascript -[at]- mcgeary [*dot*] org) */ var LiquidMetal=function(){var l=0.0;var m=1.0;var n=0.8;var o=0.9;var p=0.85;return{score:function(a,b){if(b.length==0)return n;if(b.length>a.length)return l;var c=this.buildScoreArray(a,b);var d=0.0;for(var i=0;i