PageSourceSearch

https://spinalcord.org/wp-content/plugins/searchford/public/js/searchford.min.js?ver=7.1.2

js spinalcord.org collected 2026-09-24 19:40:00 UTC 3,478 bytes, 8 lines download raw bytes

1/*
2 * Searchford Plugin
3 * http://archtheme.com/searchford
4 *
5 * Advanced WordPress Search Plugin. Boost in-site search immediately and add live search previews.
6 *
7 */
8(function(g,d,a,h){var f="searchford",c={min_chars:3},e={srcNode:"li",margin:"0",resizable:true,transition:"none",};function b(k,j,i){var m=this;this.element=k;this.$element=g(k);this.$form=this.$element.closest("form");this.$input=this.$element.find('input[name="s"]');this._settings=c;this._grid_options=g.extend({},e,i);this.not_found=false;this.req;var l=m.$element.find('input[name="sf"]'),n=l.length>0?l.val():"";if(n.length>0){if(m.$element.hasClass("searchford-live")){m.$box=g("#searchford_box"+n);m.$box.detach().appendTo("body");m._box_width=m.$box.outerWidth();m.init(m)}}else{g.post(searchford_vars.ajaxurl,{action:"searchford_box"},function(o){if(typeof(o)!="undefined"){m._grid_options=g.extend({},m._grid_options,o.grid_options);m.$box=g(o.html);g("body").append(m.$box);m._box_width=m.$box.outerWidth();m.init(m)}},"json")}}b.prototype={init:function(i){var j;i.$form.attr("autocomplete","off");i.$input.on("keyup input",function(){if(g(this).val().length>=i._settings.min_chars){if(i.not_found){i.load()}i.open(i);if(j){clearTimeout(j)}j=setTimeout(function(){var k=i.$form.serialize();i.req=g.post(searchford_vars.ajaxurl,k+"&action=searchford_ajax_query",function(l){if(l.results){i.success(l.results,l.style,i.$form.attr("action")+"?"+k)}else{if(l.suggestion){i.no_results(l.suggestion)}else{i.no_results()}}},"json")},500)}else{i.close()}})},success:function(i,j,k){this.not_found=false;this.$box.find(".searchford-load").hide();this.$box.find(".searchford-content").html(i).addClass("with-"+j);this.$box.find(".searchford-foot").html('<a href="'+k+'">'+searchford_vars.search_results+"</a>");this.$box.find(".searchford-masonry").gridify(this._grid_options)},load:function(){this.$box.find(".searchford-content").html("");this.$box.find(".searchford-load").show();this.$box.find(".searchford-foot").html(searchford_vars.searching)},no_results:function(i){var j=typeof(i)=="undefined"?searchford_vars.no_posts:i;this.not_found=true;this.$box.find(".searchford-load").hide();this.$box.find(".searchford-content").html('<div class="searchford-none"><em>'+j+"</em></div>");this.$box.find(".searchford-foot").html(searchford_vars.no_results)},open:function(i){if(i.$box.is(":hidden")){var k=i.$input.offset(),j=i.$box.data("searchford-align");input_width=i.$input.outerWidth(),window_width=g(d).width(),x=j=="left"?k.left:window_width-k.left-input_width,css={},css.top=(k.top+i.$input.outerHeight())+"px",css[j]=x+"px";css.width=k.left+i._box_width>window_width?input_width+"px":"";i.$box.css(css).show();i._bindClick(i)}},close:function(){if(this.req!=null){this.req.abort()}if(this.$box.is(":visible")){this._unbindClick();this.$box.hide();this.$box.find(".searchford-content").html("");this.$box.find(".searchford-load").show();this.$box.find(".searchford-foot").html(searchford_vars.searching)}},_bindClick:function(i){g(a).on("click.searchford",function(j){if(!i.$form.is(j.target)&&i.$form.has(j.target).length===0&&!i.$box.is(j.target)&&i.$box.has(j.target).length===0){i.close()}})},_unbindClick:function(){g(a).off("click.searchford")}};g.fn[f]=function(i){return this.each(function(){if(!g.data(this,"plugin_"+f)){var j=g(this).data(f);g.data(this,"plugin_"+f,new b(this,i,j))}})};jQuery(d).load(function(){g("form").has('input[name="s"]').searchford()})})(jQuery,window,document);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.