Commit 09f37c7b authored by Karl Hasselbring's avatar Karl Hasselbring
Browse files

Fixed layout of donation quicktip

Fixed passing of locale parameter
parent 62aa5f64
......@@ -14,9 +14,14 @@ $(document).ready(function () {
if (localStorage.hasOwnProperty('param_sprueche')) {
sprueche = localStorage.getItem('param_sprueche') === 'on'; // check for sprueche local storage parameter
}
loadQuicktips('test', 'de', sprueche); // load the quicktips
var locale = readLocaleFromUrl('de');
loadQuicktips('test', locale, sprueche); // load the quicktips
});
function readLocaleFromUrl(defaultLocale) {
return location.pathname.substr(1, location.pathname.indexOf('/meta', 0) - 1) || 'de';
}
function getURLParameter(name) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\+/g, '%20')) || null;
}
......@@ -552,7 +557,7 @@ function loadQuicktips (search, locale, sprueche) {
getQuicktips(search, locale, blacklist, createQuicktips);
}
const QUICKTIP_SERVER = 'http://localhost:63825';
const QUICKTIP_SERVER = 'http://quicktips.metager3.de:63825';
/**
* Requests quicktips from the quicktip server and passes them to the loadedHandler
......
......@@ -687,8 +687,9 @@ a {
.quicktip-summary {
display: flex;
justify-content: space-between;
align-items: center;
h1 {
margin-right: 15px;
margin: 0px;
}
p {
margin: 5px;
......
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