cleanup(search): drop some bind leftovers

The only usage of these functions was here, we dropped it when switching to PageFind

9d2317aa15 (diff-f355db8e18a5352f796b8030582fdf862ec9a7ea193ca4cf71de7df9e7386db1L69-L70)
pull/47113/head
Thomas P 2024-07-08 11:47:39 +02:00 committed by GitHub
parent 37c062c574
commit 83f5a31fc8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 22 deletions

View File

@ -19,28 +19,6 @@
s.parentNode.insertBefore(gcse, s);
}
window.getPaginationAnchors = (pages) => {
var pageAnchors = '', searchTerm = window.location.search.split("=")[1].split("&")[0].replace(/%20/g, ' ');
var currentPage = window.location.search.split("=")[2];
currentPage = (!currentPage) ? 1 : currentPage.split("&")[0];
for(var i = 1; i <= 10; i++){
if(i > pages) break;
pageAnchors += '<a class="bing-page-anchor" href="/search/?q='+searchTerm+'&page='+i+'">';
pageAnchors += (currentPage == i) ? '<b>'+i+'</b>' : i;
pageAnchors += '</a>';
}
return pageAnchors;
}
window.getResultMarkupString = (ob) => {
return '<div class="bing-result">'
+ '<div class="bing-result-name"><a href="'+ob.url+'">'+ob.name+'</a></div>'
+ '<div class="bing-result-url">'+ob.displayUrl+'</div>'
+ '<div class="bing-result-snippet">'+ob.snippet+'</div>'
+'</div>';
}
window.renderPageFindSearchResults = () => {
let urlParams = new URLSearchParams(window.location.search);
let searchTerm = urlParams.get("q") || "";