sajari-website
Advanced tools
Comparing version 0.11.0 to 0.12.0
{ | ||
"name": "sajari-website", | ||
"version": "0.11.0", | ||
"version": "0.12.0", | ||
"description": "Website extensions for the Sajari API. Automatically index site content, add user profiles, render search and recommendations, etc.", | ||
@@ -5,0 +5,0 @@ "author": { |
(function(){function overlay(it | ||
/**/) { | ||
var out='<div class="sj-search"> <div id="sj-o-shade" class="sj-shade"></div> <div class="sj-search-modal sj-cf"> <div id="sj-o-close" class="sj-close"> × </div> <form class="sj-search-form"> <div id="sj-search-bar"> <span id="sj-icon-search"></span> <input data-sj-search-query type="search" placeholder="search this site" /> <button data-sj-search-query-go type="submit" class="sj-search-go '+(it.themeColor)+'">Search</button> </div> </form> <div data-sj-search-results class="sj-results" '+(it.resultsExtra)+'></div> </div></div>';return out; | ||
/*``*/) { | ||
var out='<div class="sj-search"> <div id="sj-o-shade" class="sj-shade"></div> <div class="sj-search-modal sj-cf"> <div id="sj-o-close" class="sj-close"> × </div> <form class="sj-search-form"> <div id="sj-search-bar"> <span id="sj-icon-search"></span> <input aria-label="Search" data-sj-search-query type="search" placeholder="search this site" /> <button data-sj-search-query-go type="submit" class="sj-search-go '+(it.themeColor)+'">Search</button> </div> </form> <div data-sj-search-results class="sj-results" '+(it.resultsExtra)+'></div> </div></div>';return out; | ||
}var itself=overlay;if(typeof module!=='undefined' && module.exports) module.exports=itself;else if(typeof define==='function')define(function(){return itself;});else {window.render=window.render||{};window.render['overlay']=itself;}}()); |
(function(){function result(it | ||
/**/) { | ||
/*``*/) { | ||
var out='<div class="sj-result-item">';if(it.showThumb){if(res.meta.image){out+='<div class="sj-thumb-wrapper"><div class="sj-result-thumb" style="background-image:url('+(res.meta.image)+'"></div></div>';}else if(true){}}out+='<div class="sj-result-wrapper"><div class="sj-result-title" data-docid="'+(res.docId)+'"> <a class="sj-result-link" href="'+(res.meta.url)+'" data-query-id="'+(it.queryID)+'" data-slot="'+(index+1)+'" ';if(res.meta.injected){out+='data-injected="'+(res.meta.injected)+'"';}out+=' ';if(res.meta._token){out+=' onmousedown="this.href=\''+(it.tokenEndpoint)+'/token/'+(res.meta._token)+'\';"';}out+='>'+(res.meta.title)+'</a></div>';if(it.showDesc){out+='<p class="sj-result-meta"><span class="sj-result-meta-desc">'+(res.meta.description)+'</span></p>';}if(it.showMeta.length){var arr1=it.showMeta;if(arr1){var m,i1=-1,l1=arr1.length-1;while(i1<l1){m=arr1[i1+=1];out+='<p class="sj-result-meta"><span class="sj-result-meta-wrapper" data-sj-meta-key="'+(m)+'"><span class="sj-result-meta-name">'+(m)+'</span> <span class="sj-result-meta-value">'+(res.meta[m])+'</span></span></p>';} } }if(it.showUrl){out+='<p class="sj-result-meta"><span class="sj-result-meta-url">'+(res.meta.url)+'</span></p>';}out+='</div></div>';return out; | ||
}function results(it | ||
/**/) { | ||
/*``*/) { | ||
var out='';if(it.results.length){if(it.renderType == "search"){out+='<p class="sj-search-info">Showing 1-'+(it.results.length)+' of '+(it.totalmatches)+' results ('+(it.formattedMsecs)+' seconds)</p>';if(it.fuzzyStr){out+='<p class="sj-search-info sj-search-fuzzy">Showing results for <strong>'+(it.fuzzyStr)+'</strong></p>';}else if(true){}}var arr1=it.results;if(arr1){var res,index=-1,l1=arr1.length-1;while(index<l1){res=arr1[index+=1];out+='<div class="sj-result-item">';if(it.showThumb){if(res.meta.image){out+='<div class="sj-thumb-wrapper"><div class="sj-result-thumb" style="background-image:url('+(res.meta.image)+'"></div></div>';}else if(true){}}out+='<div class="sj-result-wrapper"><div class="sj-result-title" data-docid="'+(res.docId)+'"> <a class="sj-result-link" href="'+(res.meta.url)+'" data-query-id="'+(it.queryID)+'" data-slot="'+(index+1)+'" ';if(res.meta.injected){out+='data-injected="'+(res.meta.injected)+'"';}out+=' ';if(res.meta._token){out+=' onmousedown="this.href=\''+(it.tokenEndpoint)+'/token/'+(res.meta._token)+'\';"';}out+='>'+(res.meta.title)+'</a></div>';if(it.showDesc){out+='<p class="sj-result-meta"><span class="sj-result-meta-desc">'+(res.meta.description)+'</span></p>';}if(it.showMeta.length){var arr2=it.showMeta;if(arr2){var m,i2=-1,l2=arr2.length-1;while(i2<l2){m=arr2[i2+=1];out+='<p class="sj-result-meta"><span class="sj-result-meta-wrapper" data-sj-meta-key="'+(m)+'"><span class="sj-result-meta-name">'+(m)+'</span> <span class="sj-result-meta-value">'+(res.meta[m])+'</span></span></p>';} } }if(it.showUrl){out+='<p class="sj-result-meta"><span class="sj-result-meta-url">'+(res.meta.url)+'</span></p>';}out+='</div></div>';} } }else if(true){if(it.renderType == "search"){out+='<p class="sj-noresults">No results found.</p>';}if(it.errors){out+='<p class="sj-error">Oops! An error occured while searching. Please try again.</p>';}}return out; | ||
}var itself=results;itself.result=result;if(typeof module!=='undefined' && module.exports) module.exports=itself;else if(typeof define==='function')define(function(){return itself;});else {window.render=window.render||{};window.render['results']=itself;}}()); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
495160
2