setTimeout(function(){
if(!(window.location.href.indexOf('/item/')>-1) && window.location.href.indexOf('/catalog')>-1 && document.querySelectorAll('.hubbox').length==0){
var div = document.createElement('div');
div.classList.add('hubbox')
if (window.location.toString().indexOf('?lng=en')>-1){
thecontent = `
Alle Informationen zum Event (Zeitplan, Tickets, uvm.) finden Sie unter
pzvba.de
`
}else{
thecontent = `
Alle Informationen zum Event (Zeitplan, Tickets, uvm.) finden Sie unter
pzvba.de
`
}
div.innerHTML = thecontent + `
`
if (document.querySelectorAll('.hubbox').length == 0 ){
div2 = div.cloneNode(true)
document.querySelector('#page-title.hidden-lg').append(div)
document.querySelector('#page-title.hidden-xs').append(div2)
// Run extra code
var allData = {};
fetch('https://hsr-auktion.de/horstlistRedirect/nd_getData.php',{method:'GET'})
.then(response => response.json())
.then(response => {
allData = JSON.parse(JSON.stringify(response))
if(!(window.location.href.indexOf('/item/')>-1) && window.location.href.indexOf('/catalog')>-1){
setTimeout(function(){
updateCatalog()
},1000)
}else{
setTimeout(function(){
updateSingle()
},1000)
}
})
setInterval(function(){
fetch('https://hsr-auktion.de/horstlistRedirect/nd_getUpdated.php',{method:'GET'})
.then(response => response.json())
.then(response => {
if (response.lastUpdate != allData.lastUpdate){
fetch('https://hsr-auktion.de/horstlistRedirect/nd_getData.php',{method:'GET'})
.then(response => response.json())
.then(response => {
allData = JSON.parse(JSON.stringify(response))
if(!(window.location.href.indexOf('/item/')>-1) && window.location.href.indexOf('/catalog')>-1){
updateCatalog()
}else{
updateSingle()
}
})
}
})
},5000)
function cleanHubiAdded(){
document.querySelectorAll('.hubiadded').forEach(function(hubiadded){
hubiadded.remove()
})
}
function updateSingle(){
cleanHubiAdded()
for (var i =0;i-1) && window.location.href.indexOf('/catalog')>-1 && document.querySelectorAll('.hubbox').length==0){
var div = document.createElement('div');
div.classList.add('hubbox')
var allData = {};
fetch('https://hsr-auktion.de/horstlistRedirect/nd_getData.php',{method:'GET'})
.then(response => response.json())
.then(response => {
allData = JSON.parse(JSON.stringify(response))
if(!(window.location.href.indexOf('/item/')>-1) && window.location.href.indexOf('/catalog')>-1){
setTimeout(function(){
updateCatalog()
},1000)
}else{
setTimeout(function(){
updateSingle()
},1000)
}
})
setInterval(function(){
fetch('https://hsr-auktion.de/horstlistRedirect/nd_getUpdated.php',{method:'GET'})
.then(response => response.json())
.then(response => {
if (response.lastUpdate != allData.lastUpdate){
fetch('https://hsr-auktion.de/horstlistRedirect/nd_getData.php',{method:'GET'})
.then(response => response.json())
.then(response => {
allData = JSON.parse(JSON.stringify(response))
if(!(window.location.href.indexOf('/item/')>-1) && window.location.href.indexOf('/catalog')>-1){
updateCatalog()
}else{
updateSingle()
}
})
}
})
},5000)
function cleanHubiAdded(){
document.querySelectorAll('.hubiadded').forEach(function(hubiadded){
hubiadded.remove()
})
}
function updateSingle(){
cleanHubiAdded()
for (var i =0;i.gekoert{
position: absolute;
top: 0;
right: 0;
width:100%;
padding: 0.2rem 0.5rem;
background: #A41B35;
text-align:center;
font-size:1.2em;
color: white;
}
.ngekoert{
position: absolute;
top: 0;
right: 0;
width:100%;
padding: 0.2rem 0.5rem;
background: #aaa;
text-align:center;
font-size.1.2em;
color: white;
}
.verkauf{
position: absolute;
background:rgba(164,27,53,.7);
color:white;
bottom:0;
left:0;
width: 100%;
height:1.5em;
z-index: 1000;
font-size: 1.5rem;
line-height: 1.5em;
text-align: center;
}
.nverkauf{
position: absolute;
background:rgba(200,200,200,.7);
color:black;
bottom:0;
left:0;
width: 100%;
height:1.5em;
z-index: 1000;
font-size: 1.5rem;
line-height: 1.5em;
text-align: center;
}`
div2 = div.cloneNode(true)
document.querySelector('#page-title.hidden-lg').append(div)
document.querySelector('#page-title.hidden-xs').append(div2)
}else if ((window.location.href.indexOf('/auction.php')>-1) && document.querySelectorAll('.hubbox').length==0){
var div = document.createElement('div');
div.classList.add('hubbox')
div.innerHTML = ``
div2 = div.cloneNode(true)
document.querySelector('#page-title.hidden-lg').append(div)
document.querySelector('#page-title.hidden-xs').append(div2)
var allData = {};
fetch('https://hsr-auktion.de/horstlistRedirect/nd_getData.php',{method:'GET'})
.then(response => response.json())
.then(response => {
allData = JSON.parse(JSON.stringify(response))
console.log('alldataLoaded')
setInterval(function(){
var cat_nr = document.querySelector('#cat_nr').innerText.split(' ').pop();
for (var i =0;i response.json())
.then(response => {
if (response.lastUpdate != allData.lastUpdate){
fetch('https://hsr-auktion.de/horstlistRedirect/nd_getData.php',{method:'GET'})
.then(response => response.json())
.then(response => {
console.log('alldataUpdated')
})
}
})
},10000)
function cleanHubiAdded(){
document.querySelectorAll('.hubiadded').forEach(function(hubiadded){
hubiadded.remove()
})
}
}
},2000)