Commit 50f5cb04 authored by Karl Hasselbring's avatar Karl Hasselbring
Browse files

Quicktips nutzen jetzt Opensearch relevance extension

parent 9ac895e8
......@@ -566,6 +566,7 @@ function loadQuicktips (search, locale, sprueche) {
}
const QUICKTIP_SERVER = 'https://quicktips.metager3.de';
//const QUICKTIP_SERVER = 'http://localhost:63825';
/**
* Requests quicktips from the quicktip server and passes them to the loadedHandler
......@@ -589,7 +590,7 @@ function getQuicktips (search, locale, blacklist, loadedHandler) {
summary: $(this).children('summary').text(),
url: $(this).children('url').text(),
gefVon: $(this).children('gefVon').text(),
priority: $(this).children('priority').text(),
score: $(this).children('relevance\\:score').text(),
details: $(this).children('details').map(function () {
return {
title: $(this).children('title').text(),
......@@ -632,7 +633,7 @@ function getQuicktips (search, locale, blacklist, loadedHandler) {
function createQuicktips (quicktips, sprueche) {
var quicktipsDiv = $('#quicktips');
quicktips.sort(function (a, b) {
return b.priority - a.priority;
return b.score - a.score;
}).forEach(function (quicktip) {
var mainElem;
if (quicktip.details.length > 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment