function AGBs() {
console.log('AGBs aufgerufen');
document.getElementById('AGBs').style.visibility = 'visible';
document.getElementById('AGBs').style.opacity = "1";
document.getElementById('AGBs').style.display = "block";
}
function AGBs2() {
document.getElementById('AGBs').style.visibility = 'hidden';
document.getElementById('AGBs').style.opacity = "0";
document.getElementById('AGBs').style.display = "none";
}
function IEneinDanke() {
console.log('IE-Popup geöffnet');
document.getElementById('IEneinDanke').style.visibility = 'visible';
document.getElementById('IEneinDanke').style.opacity = '1';
document.getElementById('IEneinDanke').style.display = "block";
}
function IEneinDanke2() {
document.getElementById('IEneinDanke').style.visibility = 'hidden';
document.getElementById('IEneinDanke').style.opacity = '0';
document.getElementById('IEneinDanke').style.display = "none";
}
function Kontakt() {
console.log('Kontaktseite aufgerufen');
document.getElementById('Kontakt').style.visibility = 'visible';
document.getElementById('Kontakt').style.opacity = '1';
document.getElementById('Kontakt').style.display = "block";
}
function Kontakt2() {
document.getElementById('Kontakt').style.visibility = 'hidden';
document.getElementById('Kontakt').style.opacity = '0';
document.getElementById('Kontakt').style.display = "none";
}
function PGP() {
console.log('PGP-Seite aufgerufen');
document.getElementById('PGP').style.visibility = 'visible';
document.getElementById('PGP').style.opacity = '1';
document.getElementById('PGP').style.display = "block";
$('body').css({ 'overflow': 'hidden' });
}
function PGP2() {
document.getElementById('PGP').style.visibility = 'hidden';
document.getElementById('PGP').style.opacity = '0';
document.getElementById('PGP').style.display = "none";
$('body').css({ 'overflow': 'visible' });
}
function Impressum() {
console.log('Impressum aufgerufen');
document.getElementById('Impressum').style.visibility = 'visible';
document.getElementById('Impressum').style.opacity = '1';
document.getElementById('Impressum').style.display = "block";
}
function Impressum2() {
document.getElementById('Impressum').style.visibility = 'hidden';
document.getElementById('Impressum').style.opacity = '0';
document.getElementById('Impressum').style.display = "none";
}
function Sicherheitspopup() {
document.getElementById('Sicherheitspopup').style.visibility = 'visible';
document.getElementById('Sicherheitspopup').style.opacity = '1';
document.getElementById('Sicherheitspopup').style.display = "block";
}
function Sicherheitspopup2() {
document.getElementById('Sicherheitspopup').style.visibility = 'hidden';
document.getElementById('Sicherheitspopup').style.opacity = '0';
document.getElementById('Sicherheitspopup').style.display = "none";
}
function mehrdazupopup() {
document.getElementById('Erklärungspopup').style.visibility = 'visible';
}
function mehrdazupopup2() {
document.getElementById('Erklärungspopup').style.visibility = 'hidden';
}
function Datenschutz() {
document.getElementById('DatenschutzGoogle').style.visibility = 'visible';
document.getElementById('DatenschutzGoogle').style.opacity = '1';
document.getElementById('DatenschutzGoogle').style.display = "block";
}
function Datenschutz2() {
document.getElementById('DatenschutzGoogle').style.visibility = 'hidden';
document.getElementById('DatenschutzGoogle').style.opacity = '0';
document.getElementById('DatenschutzGoogle').style.display = "none";
}
function MobileMenu() {
document.getElementById('MobilesMenuNeu').style.visibility = 'visible';
document.getElementById('MobilesMenuNeu').style.opacity = '1';
document.getElementById('MobilesMenuNeu').style.display = "block";
$('#kopfzeile').addClass('displaynone');
$('body').css({ 'overflow': 'hidden' });
}
function MobileMenu2() {
document.getElementById('MobilesMenuNeu').style.visibility = 'hidden';
document.getElementById('MobilesMenuNeu').style.opacity = '0';
document.getElementById('MobilesMenuNeu').style.display = "none";
$('#kopfzeile').removeClass('displaynone');
$('body').css({ 'overflow': 'visible' });
}
/*function MobileMenu2() {
document.getElementById('MobileMenu').style.visibility = 'hidden';
document.getElementById('MobileMenu').style.opacity = '0';
document.getElementById('MobileMenu').style.top = '200%';
document.getElementById('MobileMenu').style.display = 'none';
document.getElementById('MobileMenuInner').style.top = '200%';
document.getElementById('closeMobileMenu').style.top = '200%';
}*/
function der1476Ersatz() {
document.getElementById('AGB-Popup-1476-Ersatz').style.visibility = 'visible';
document.getElementById('AGB-Popup-1476-Ersatz').style.opacity = '1';
document.getElementById('AGB-Popup-1476-Ersatz').style.display = "block";
}
function der1476Ersatz2() {
document.getElementById('AGB-Popup-1476-Ersatz').style.visibility = 'hidden';
document.getElementById('AGB-Popup-1476-Ersatz').style.opacity = '0';
document.getElementById('AGB-Popup-1476-Ersatz').style.display = "none";
}
function Einstellungspopupdingeldongel(){
$('body').css({ 'overflow': 'hidden' });
console.log('Einstellungen aufgerufen');
var cookies = $.cookie('cookies');
var modus = $.cookie('modus');
var popup = $.cookie('popup');
var statistik = $.cookie('statistik');
var url = window.location.href;
//$('#RBURLEinstellungen').val(url);
var mode = getQueryVariable('mode');
if(modus == 'dunkel' || mode == 'alwaysdark'){
$('#immerhellradio').replaceWith('');
$('#einmaldunkel').replaceWith('');
$('#immerdunkelradio').replaceWith('');
$('.einstellungenOK').attr({ 'style': 'color: black; background-color: #facc2e; border-color: #facc2e' });
//$('.einstellungenOK').css({ 'background-color': 'facc2e' });
//$('.einstellungenOK').css({ 'color': 'black' });
console.log('Modus: dunkel');
} else {
var mode = getQueryVariable('mode');
if(mode == 'dark'){
$('.einstellungenOK').attr({ 'style': 'color: black; background-color: #facc2e; border-color: #facc2e' });
$('.einstellungenOK').css({ 'background-color': 'facc2e', 'border-color': '#facc2e' });
$('#immerhellradio').replaceWith('');
$('#einmaldunkel').replaceWith('');
$('#immerdunkelradio').replaceWith('');
} else {
$('#immerhellradio').replaceWith('');
$('#immerdunkelradio').replaceWith('');
$('.einstellungenOK').attr({ 'style': 'color: white; background-color: rgb(192,0,0)' });
$('.einstellungenOK').css({ 'background-color': 'rgb(192,0,0)' });
$('.einstellungenOK').css({ 'color': 'white' });
}
}
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
$('.einstellungenOK').attr({ 'style': 'color: black; background-color: #facc2e; border-color: #facc2e' });
$('.einstellungenOK').css({ 'background-color': 'facc2e' });
$('.einstellungenOK').css({ 'color': 'black', 'border-color': '#facc2e' });
$('#immerhellradio').replaceWith('');
$('#einmaldunkel').replaceWith('');
$('#immerdunkelradio').replaceWith('');
$('#immerhellradio').prop('disabled', true);
$('#einmaldunkel').prop('disabled', true);
$('#immerdunkelradio').prop('disabled', true);
$("label[for='immerhellradio']").css({ 'color': '#aaaaaa' });
$("label[for='einmaldunkel']").css({ 'color': '#aaaaaa' });
$("label[for='immerdunkelradio']").css({ 'color': '#aaaaaa' });
$('#immerdunkelsystemradio').replaceWith('');
$('#immerdunkelsystemradio, #immerdunkelsystemlabel').css({ 'display': 'inline' });
}
/*var dunkeltest = $('#Tagmodus').css('display');
var dunkeltest2 = $('#Nachtmodus').css('display');
console.log('wenigsten bis hier');
if(dunkeltest == 'inline' && dunkeltest2 == 'none'){
console.log('dunkeltest white');
$('.einstellungenOK').attr({ 'style': 'color: black; background-color: #facc2e' });
$('.einstellungenOK').css({ 'background-color': 'facc2e' });
$('#immerhellradio').replaceWith('');
$('#einmaldunkel').replaceWith('');
$('#immerdunkelradio').replaceWith('');
} else {
$('#immerhellradio').replaceWith('');
$('#immerdunkelradio').replaceWith('');
$('.einstellungenOK').attr({ 'style': 'color: white; background-color: rgb(192,0,0)' });
$('.einstellungenOK').css({ 'background-color': 'rgb(192,0,0)' });
console.log('Modus: hell');
}
}*/
if(popup == 'zu'){
$('#immeranzeigenradio').replaceWith('');
$('#nichtmehranzeigenradio').replaceWith('');
} else {
$('#immeranzeigenradio').replaceWith('');
$('#nichtmehranzeigenradio').replaceWith('');
console.log('Popup: wird jedes Mal angezeigt');
}
if(statistik == 'an' && navigator.doNotTrack != 1){
$('#statistikcheck').prop('checked', true);
$('#statistikcheck').prop('disabled', false);
} else if(statistik != 'an' && navigator.doNotTrack != 1) {
$('#statistikcheck').prop('checked', false);
$('#statistikcheck').prop('disabled', false);
} else if(navigator.doNotTrack == 1){
$('#immeranzeigenradio').replaceWith('');
$('#nichtmehranzeigenradio').replaceWith('');
$('#immeranzeigenradio').prop('disabled', true);
$('#nichtmehranzeigenradio').prop('disabled', true);
$('#statistikcheck').prop('disabled', true);
$('#statistikcheck').prop('checked', false);
$('#statistikchecktext').css({ 'color': '#aaaaaa' });
$('#statistikchecktext').text('Die detaillierte Statistik ist deaktiviert, weil du die Funktion "Do Not Track" (DNT) angeschaltet hast');
$("label[for='immeranzeigenradio']").css({ 'color': '#aaaaaa' });
$("label[for='nichtmehranzeigenradio']").css({ 'color': '#aaaaaa' });
$('#nichtmehranzeigendntradio').replaceWith('');
$('#nichtmehranzeigendntradio, #nichtmehranzeigendntlabel').css({ 'display': 'inline' });
}
$('#kopfzeilegross').addClass('displaynone');
$('#kopfzeileklein').addClass('displaynone');
$('#kopfzeile').addClass('displaynone');
document.getElementById('Einstellungspopup').style.visibility = 'visible';
document.getElementById('Einstellungspopup').style.opacity = '1';
document.getElementById('Einstellungspopup').style.display = "block";
}
function Einstellungspopup2dingeldongel(){
console.log('Einstellungen geschlossen');
$('#kopfzeileklein').removeClass('displaynone');
$('#kopfzeilegross').removeClass('displaynone');
$('#kopfzeile').removeClass('displaynone');
document.getElementById('Einstellungspopup').style.visibility = 'hidden';
document.getElementById('Einstellungspopup').style.opacity = '0';
document.getElementById('Einstellungspopup').style.display = "none";
$('body').css({ 'overflow': 'visible' });
//document.getElementById('RBURLEinstellungen').style.display = 'none';
//$('#URLgenerieren').text('URL mit Einstellungen generieren');
//$('#abstand').css({ 'display': 'none' });
}
$(document).ready(function(){
$('#EinstellungenMobile').click(function(){
MobileMenu2();
Einstellungspopupdingeldongel();
});
$('#mobilecloser').on({
click: function(){
$('#AGB-Popup-1476-Ersatz').css({ 'visibility': 'hidden' });
$('#AGB-Popup-1476-Ersatz').css({ 'opacity': '0' });
var date = new Date();
var days = 21;
date.setTime(date.getTime() + (24 * 60 * 60 * 1000));
$.cookie('mobilerhinweis', 'zu', { expires: date });
}
});
var mobilerhinweis = $.cookie('mobilerhinweis');
if(mobilerhinweis == 'zu') {
$('#AGB-Popup-1476-Ersatz').css({ 'visibility': 'hidden' });
$('#AGB-Popup-1476-Ersatz').css({ 'opacity': '0' });
}
$('#einstellungenOK').on({
click: function(){
console.log('einstellungenOK angeklickt');
var immerhell = $('#immerhellradio').is(':checked');
var immerdunkel = $('#immerdunkelradio').is(':checked');
var immeranzeigen = $('#immeranzeigenradio').is(':checked');
var nichtmehranzeigen = $('#nichtmehranzeigenradio').is(':checked');
var einmaldunkel = $('#einmaldunkel').is(':checked');
var statistikcheck = $('#statistikcheck').is(':checked');
if(immerhell == true){
$.removeCookie('modus');
console.log('immer hell');
var mode = getQueryVariable('mode');
var cookiepopup = getQueryVariable('popup');
if(mode == 'dark' || mode == 'alwaysdark'){
if(mode == 'dark') {
var beforeurl = window.location.href;
var afterurl = beforeurl.replace('mode=dark&', '');
window.location = afterurl;
}
if(mode == 'alwaysdark') {
var beforeurl = window.location.href;
var afterurl = beforeurl.replace('mode=alwaysdark&', '');
window.location = afterurl;
}
}
if(mode != 'dark' && mode != 'alwaysdark'){
location.reload();
}
}
if(einmaldunkel == true){
$.removeCookie('modus');
var modeschonda = getQueryVariable('mode');
var articleschonda = getQueryVariable('article');
var beforeurl = window.location.href;
if(modeschonda == false && articleschonda == false && beforeurl.indexOf('?') !== -1){
window.location = location + '&mode=dark&';
} else if(modeschonda == false && articleschonda == false){
window.location = location + '?mode=dark&';
}
if(modeschonda == 'dark'){
location.reload();
}
if(modeschonda == false && articleschonda != false){
console.log('false und true');
window.location = location + '&mode=dark&';
}
}
if(immerdunkel == true){
var date = new Date();
var days = 21;
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
$.cookie('modus', 'dunkel', { expires: date });
console.log('immer dunkel');
$('#einstellungenOK').css({ 'color': 'black' });
$('#einstellungenOK').css({ 'background-color': 'facc2e' });
location.reload();
}
if(immeranzeigen == true){
$.removeCookie('popup');
$.removeCookie('mobilerhinweis');
console.log('immer anzeigen');
var cookiepopup = getQueryVariable('popup');
if(cookiepopup == 'never'){
var beforeurl = window.location.href;
var afterurl = beforeurl.replace('popup=never&', '');
window.location = afterurl;
}
}
if(nichtmehranzeigen == true){
var date = new Date();
var days = 21;
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
$.cookie('popup', 'zu', { expires: date });
$.cookie('mobilerhinweis', 'zu', { expires: date});
console.log('nicht mehr anzeigen');
}
if(statistikcheck == true && navigator.doNotTrack != 1){
var date = new Date();
var days = 21;
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
$.cookie('statistik', 'an', { expires: date });
} else if(statistikcheck != true || navigator.doNotTrack == 1) {
$.removeCookie('statistik');
}
location.reload();
/* ich habe keine Ahnung, wie ich auf diesen Mist gekommen bin:
if(immeranzeigen == true && einmaldunkel == false || nichtmehranzeigen == true && einmaldunkel == false){
var cookiepopup = getQueryVariable('popup');
if(cookiepopup == 'never') {
var beforeurl = window.location.href;
var afterurl = beforeurl.replace('popup=never&', '');
window.location = afterurl;
} else {
location.reload();
}
}*/
}
});
});
$('#Einstellungspopup').mousemove(function(){
urlgenerieren();
});
$('#einstellungenabbrechen').click(function(){
Einstellungspopup2dingeldongel();
});
$('input, label').click(function(){
urlgenerieren();
});
function urlgenerieren(){
//console.log('Anfang');
var immerhell = $('#immerhellradio').is(':checked');
var immerdunkel = $('#immerdunkelradio').is(':checked');
var immeranzeigen = $('#immeranzeigenradio').is(':checked');
var nichtmehranzeigen = $('#nichtmehranzeigenradio').is(':checked');
var einmaldunkel = $('#einmaldunkel').is(':checked');
/*var mode;
var popup;*/
if(immerhell == true){
var mode = '';
} else {
if(immerdunkel == true){
var mode = '&mode=alwaysdark&';
}
if(einmaldunkel == true){
var mode = '&mode=dark&';
}
}
//$('#RBURLEinstellungen').val('https://gymnasium-rutheneum.de/content/newspaper/?' + mode + popup);
if(nichtmehranzeigen == true){
var popup = '&popup=never&';
} else {
if(immeranzeigen == true){
var popup = '';
}
}
$('#RBURLEinstellungen').val('https://gymnasium-rutheneum.de/content/newspaper/?' + mode + popup);
//console.log('Ende');
//console.log('mode = ' + mode + '; popup = ' + popup);
setTimeout(urlgenerieren, 1000);
}
function einmaldunkel() {
/* Hä, was sollte hier rein??? */
}
function Betafunktionen() {
berechne();
aufrufen();
document.getElementById('Beta-Popup').style.visibility = 'visible';
document.getElementById('Beta-Popup').style.opacity = '1';
document.getElementById('Beta-Popup').style.display = 'block';
console.log('Beta-Popup geöffnet');
}
function Betafunktionen2() {
document.getElementById('Beta-Popup').style.visibility = 'hidden';
document.getElementById('Beta-Popup').style.opacity = '0';
document.getElementById('Beta-Popup').style.display = "none";
}