Commit 6f991b86 authored by Karl Hasselbring's avatar Karl Hasselbring
Browse files

Merge branch 'development' into 589-umsetzung-erstes-neudesign-fur-ergebnisseite

parents 70727999 bdcd0327
......@@ -15,23 +15,27 @@ $(document).ready(function () {
} else {
var sprueche = getURLParameter('sprueche') === 'on'; // load the sprueche url parameter
}
var search = getMetaTag('q');
var locale = getMetaTag('l');
var search = getMetaTag('q') || '';
var locale = getMetaTag('l') || 'de';
loadQuicktips(search, locale, sprueche); // load the quicktips
});
/*
function readLocaleFromUrl(defaultLocale) {
return location.pathname.substr(1, location.pathname.indexOf('/meta', 0) - 1) || 'de';
return location.pathname.substr(1, location.pathname.indexOf('/meta', 0) - 1) || 'de'
}
*/
function getURLParameter(name) {
function getURLParameter (name) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\+/g, '%20')) || null;
}
function getMetaTag(name) {
return $('meta[name="' + name + '"')[0].content;
function getMetaTag (name) {
if (typeof $('meta[name="' + name + '"')[0] !== 'undefined') {
return $('meta[name="' + name + '"')[0].content || null;
} else {
return null;
}
}
function activateJSOnlyContent () {
......@@ -597,7 +601,7 @@ function getQuicktips (search, locale, blacklist, loadedHandler) {
title: $(this).children('title').text(),
text: $(this).children('text').text(),
url: $(this).children('url').text()
}
};
}).toArray()
};
}).toArray();
......@@ -662,7 +666,7 @@ function createQuicktips (quicktips, sprueche) {
detailElem
.append(detailHeadlineElem)
.append('<p>' + detail.text + '</p>');
mainElem.append(detailElem);
mainElem.append(detailElem);
});
} else {
mainElem = $('<div class="quicktip-summary">');
......
......@@ -27,7 +27,7 @@ return [
'sponsors.head.1' => 'Weitere Informationen',
'sponsors.head.2' => 'Sponsoren',
'sponsors.woxikon' => '<a href="http://www.suchmaschinenoptimierung.jetzt" class="mutelink" target="_blank" rel="noopener">Suchmaschinenoptimierung</a>',
'sponsors.woxikon' => '<a href="http://www.tagesgeld.jetzt" class="mutelink" target="_blank" rel="noopener">Tagesgeld jetzt!</a>',
'sponsors.gutscheine' => '<a href="http://www.gutschein-magazin.de/" class="mutelink" target="_blank" rel="noopener">Aktuelle Gutscheine auf Gutschein-Magazin.de</a>',
'sponsors.kredite' => '<a href="https://www.finanzcheck.de/" class="mutelink" target="_blank" rel="noopener">Günstige Kredite auf FINANZCHECK.de vergleichen</a>',
......
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