1/* 2// File written by Jochen "Khuri" Dippel <[email protected]> 3// Copyright 2020 4// 5// File : page.js 6// Begin : 2016.01.29 13:57:01 7// Last Update : 2020.07.08 12:33:57 8*/ 9 10var popupopen = false; 11window.history.pushState(null, null, location.href); 12window.onpopstate = function () { 13 if(popupopen) { 14 jQuery('.popupbox').removeClass('open'); 15 popupopen = false; 16 //window.history.go(1); 17 } 18 else { 19 window.history.back(); 20 } 21}; 22 23/* 24jQuery(window).unload(function () { 25 Cookies.remove('banner-page-8'); 26 Cookies.remove('banner-page-586'); 27}); 28*/ 29 30jQuery(document).ready(function($) { 31 $('div.mobilemenu').click(function() { 32 $(this).toggleClass('open'); 33 $('div.mainmenubox').toggleClass('open'); 34 if($('div.mainmenubox').hasClass('open')) { 35 $('div.mainmenubox').css('top',$('div.mobilemenu').height()); 36 $('div.mainmenubox').height($(document).height()-$('div.mobilemenu').outerHeight()); 37 } 38 }); 39 $('#mainmenu > li').each(function() { 40 var h = $(this).children('ul').outerHeight(); 41 var o = $(this).offset(); 42 $(this).append($('<div class="schwarz-transparent" style="height: '+h+'px; left: -'+o.left+'px;"></div>')); 43 }); 44 $('div.ulslider_source div.infobutton.outer').click(function() { 45 $(this).prev('div.ulslider_source div.box').toggleClass('vis'); 46 $(this).toggleClass('hid'); 47 }); 48 $('div.ulslider_source div.box').click(function() { 49 $(this).next('div.ulslider_source div.infobutton.outer').toggleClass('hid'); 50 $(this).toggleClass('vis'); 51 }); 52 $('li[data-gallerylink]').each(function() { 53 var gl = $(this).attr('data-gallerylink'); 54 if(gl != "") { 55 $(this).addClass('pointercursor'); 56 $(this).click(function(e){ 57 window.location.href = gl; 58 }); 59 $(this).children(":not(p,div.bigtitle)").click(function(e){ 60 e.stopPropagation(); 61 }); 62 } 63 }); 64 $('#backtotop').click(function() { 65 $("html, body").animate({ scrollTop: 0 }, 600); 66 }); 67 68 // fix breaks in banner list 69 $('.wpls-fix-box br').remove(); 70 71 // dirs21 rewrite 72 $('#d21-headline-container').waitUntilExists(function(){ 73 $('#d21-headline-container').html('<div id="d21-hsh1-container" class="halfWidth marginRight"><i class="material-icons">phone</i><span>+ 49 - 8845 - 70 10</span></div><div id="d21-hsh2-container" class="halfWidth"><i class="material-icons">email</i><span><a href="mailto:[email protected]">[email protected]</a></span></div>'); 74 if(navigator.appVersion.indexOf("Chrome/") != -1) { 75 $('#d21-quickbook select').css('paddingTop',0); 76 } 77 }); 78 79 // holidaycheck 80 $('.icons .hc').click(function() { 81 $('#holidaycheck').toggle(200); 82 }) 83 84 // position layout elements 85 if($('article.content > .fsn-row:first-child .ulslider_source').length) { 86 $('article.content > .fsn-row:first-child').addClass('mobile-distance'); 87 $('article.content > .fsn-row:first-child > .row:first-child > div').append($('#specialslink')); 88 $('article.content > .fsn-row:first-child > .row:first-child > div').append($('#scrolldown')); 89 var c = $('.booknowbtn_link').clone(); 90 c.children('.btn').addClass('booknowmobile'); 91 var d = $('.gutscheinbtn_link').clone(); 92 d.children('.btn').addClass('gutscheinmobile'); 93 $('article.content > .fsn-row:first-child > .row:first-child > div').append(c).append(d); 94 $('#scrolldown').fadeIn();/* 95 $('html,body').delay(2000).animate({ 96 scrollTop: $(window).scrollTop() + 220 97 },1000);*/ 98 } 99 else { 100 $('#specialslink').css('display','none'); 101 $('#scrolldown').css('display','none'); 102 //$('article.content > .fsn-row:first-child').append($('#specialslink')); 103 //$('article.content > .fsn-row:first-child').append($('#scrolldown')); 104 } 105 // newsticker_box 106 $('#newsticker_box .close, #newsticker_box .header').click(function() { 107 $('#newsticker_box').toggleClass('closed'); 108 }); 109 if(typeof Cookies.get('banner-'+$('body').attr('id')) === 'undefined') { 110 if($('#page-8').length <= 0 && $('#page-586').length <= 0) { 111 setTimeout(function() { 112 if(!$('#newsticker_box').hasClass('closed')) { 113 $('#newsticker_box').toggleClass('closed'); 114 } 115 },4000); 116 } 117 Cookies.set('banner-'+$('body').attr('id'), '1'); 118 }
119 $(document).on('keydown', function(e) { 120 if(e.key === 'Escape') { 121 if(!$('.newsticker_box').hasClass('closed')) { 122 $('#newsticker_box').toggleClass('closed'); 123 } 124 } 125 }); 126 /* 127 $('#newsticker_box_corona .close, #newsticker_box_corona .header').click(function() { 128 $('#newsticker_box_corona').toggleClass('closed'); 129 }); 130 setTimeout(function() { 131 if($('#newsticker_box_corona').hasClass('closed')) { 132 $('#newsticker_box_corona').toggleClass('closed'); 133 } 134 },5000); 135 setTimeout(function() { 136 if(!$('#newsticker_box_corona').hasClass('closed')) { 137 $('#newsticker_box_corona').toggleClass('closed'); 138 } 139 },11000);*/ 140 141 // scale image rows 142 function imagerow() { 143 $('.imagerow ul').each(function() { 144 var divider = parseInt($(this).css('column-count')); 145 var w = parseInt($(window).width()) / divider; 146 var sh = false; 147 $(this).children($('li')).each(function() { 148 var h = (w*$(this).attr('data-height'))/$(this).attr('data-width'); 149 if(sh == false || h < sh) { 150 sh = h; 151 } 152 }); 153 $(this).children($('li')).each(function() { 154 $(this).css('width',w) 155 $(this).css('height',sh); 156 }); 157 }); 158 } 159 imagerow(); 160 161 // call page 162 $('#quickmenu .phone').click(function() { 163 $('#callpage').addClass('open'); 164 }); 165 $('#callpage .closewindow').click(function() { 166 $(this).parent().removeClass('open'); 167 }); 168 169 // internal popup links 170 $('a[href^="#"]').click(function(event) { 171 event.preventDefault(); 172 var t = $(this).attr('href'); 173 $(t).addClass('open'); 174 popupopen = true; 175 }); 176 $('.popupbox').each(function() { 177 $(this).find($('.fsn-column-inner')).addClass('text-weiss'); 178 var p = $('<div class="closewindow"></div>'); 179 p.click(function(){$(this).parent().removeClass('open');popupopen = false;}); 180 $(this).append(p); 181 }); 182 183 // scroll layout changes 184 $(document).scroll(function() { 185 var y = $(this).scrollTop(); 186 if(y > 300) { 187 $('.pagehead, #holidaycheck, #newsticker_box, #newsticker_box_corona').addClass('scrolled'); 188 $('#backtotop').fadeIn(); 189 } 190 else { 191 $('.pagehead, #holidaycheck, #newsticker_box, #newsticker_box_corona').removeClass('scrolled'); 192 $('#backtotop').fadeOut(); 193 } 194 }); 195 196 // window resize changes 197 $(window).resize(function() { 198 if($(document).width() > 990) { 199 $('div.mobilemenu').toggleClass('open',false); 200 $('div.mainmenubox').toggleClass('open',false); 201 $('div.mainmenubox').css('top','auto'); 202 $('div.mainmenubox').css('height','auto'); 203 } 204 $('#mainmenu > li .schwarz-transparent').each(function() { 205 var h = $(this).siblings('ul').outerHeight(); 206 var o = $(this).parent('li').offset(); 207 $(this).css('height',h+'px').css('left','-'+o.left+'px'); 208 }); 209 imagerow(); 210 cnheightadjustment(); 211 }); 212 // cookie notice footer extender 213 function cnheightadjustment() { 214 let cnh = $('#cookie-notice.cookie-notice-visible').height(); 215 $('body').css('padding-bottom',cnh); 216 } 217 setTimeout(function(){cnheightadjustment();},1000); 218 219 // reposition breadcrumbs 220 if($('#breadcrumbs')) { 221 let b = $('#breadcrumbs'); 222 if($('article.content > div:first-child').find('.ulslider_source').length) { 223 b.appendTo($('article.content > div:first-child .ulslider_source')); 224 } 225 else { 226 b.prependTo($('article.content')); 227 } 228 b.addClass('d'); 229 } 230 231 // search window 232 $('.searchbtn > div').on('click', function() { 233 $('.searchwindow').addClass('show'); 234 $('.searchwindow input').focus(); 235 }); 236 $('.searchwindow .shadow ').on('click', function(e) { 237 e.stopPropagation(); 238 $('.searchwindow').removeClass('show'); 239 }); 240}); 241 242// function for dirs21 rewrite 243(function ($, window) { 244 245var intervals = {}; 246var removeListener = function(selector) { 247 248 if (intervals[selector]) { 249 250 window.clearInterval(intervals[selector]); 251 intervals[selector] = null; 252 } 253}; 254var found = 'waitUntilExists.found'; 255 256/** 257 * @function 258 * @property {object} jQuery plugin which runs handler function once specified 259 * element is inserted into the DOM 260 * @param {function|string} handler 261 * A function to execute at the time when the element is inserted or 262 * string "remove" to remove the listener from the given selector 263 * @param {bool} shouldRunHandlerOnce 264 * Optional: if true, handler is unbound after its first invocation 265 * @example jQuery(selector).waitUntilExists(function); 266 */ 267 268$.fn.waitUntilExists = function(handler, shouldRunHandlerOnce, isChild) { 269 270 var selector = this.selector; 271 var $this = $(selector); 272 var $elements = $this.not(function() { return $(this).data(found); }); 273 274 if (handler === 'remove') { 275 276 // Hijack and remove interval immediately if the code requests 277 removeListener(selector); 278 } 279 else { 280 281 // Run the handler on all found elements and mark as found 282 $elements.each(handler).data(found, true); 283 284 if (shouldRunHandlerOnce && $this.length) { 285 286 // Element was found, implying the handler already ran for all 287 // matched elements 288 removeListener(selector); 289 } 290 else if (!isChild) { 291 292 // If this is a recurring search or if the target has not yet been 293 // found, create an interval to continue searching for the target 294 intervals[selector] = window.setInterval(function () { 295 296 $this.waitUntilExists(handler, shouldRunHandlerOnce, true); 297 }, 500); 298 } 299 } 300 301 return $this; 302}; 303 304}(jQuery, window)); 305 306 307let checkURL = new URL(window.location.href); 308let params = new URLSearchParams(checkURL.search); 309if(params.get('disablevioma') !== '1') { 310 311/* code from vioma */ 312document.addEventListener('DOMContentLoaded', function() { 313 if(document.querySelector('[id^="vri-container"]')) { 314 ( function ( v, i, o, m, a ){ 315 316 if ( !( o in v ) ) { 317 318 v.vioma_vri=o; 319 320 v[o] || ( v[o] = function ( ){ ( v[o].q = v[o].q || [] ).push ( arguments ); } ); 321 322 m = i.createElement( 'script' ), a = i.scripts[0]; 323 324 m.src = 'https://cst-client-channel-1369-drby.viomassl.com/js/vri/vri.js'; 325 326 a.parentNode.insertBefore ( m, a ); 327 328 } 329 330 }
330 )( window, document, 'vcst' ); 331 332 vcst( {load: 'init', url: 'https://cst-client-channel-1369-drby.viomassl.com/', set_language: 'de'} ); 333 334 vcst( {id: 9060} ); 335 336 } 337}); 338}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.