Commit 3d2f6abc authored by Karl Hasselbring's avatar Karl Hasselbring
Browse files

Changed Quicktips to work with opensearch relevance extension

parent 1fc53a37
......@@ -558,7 +558,8 @@ function loadQuicktips (search, locale, sprueche) {
getQuicktips(search, locale, blacklist, createQuicktips);
}
const QUICKTIP_SERVER = 'https://quicktips.metager3.de';
//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
......@@ -582,7 +583,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(),
......@@ -625,7 +626,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