PageSourceSearch

https://www.wohnungsmarktbeobachtung.de/++plone++static/++unique++…11-28%2014%3A13%3A40.878464/headerscroll.js

js wohnungsmarktbeobachtung.de collected 2026-10-06 20:02:52 UTC 1,731 bytes, 56 lines download raw bytes

1
2/* reset requirejs definitions so that people who
3   put requirejs in legacy compilation do not get errors */
4var _old_define = define;
5var _old_require = require;
6define = undefined;
7require = undefined;
8try{
9
10/* Resource (error cooking): ++plone++wob.theming/js/header.js */
11document.addEventListener("DOMContentLoaded", function() {
12  //var prevScrollpos = window.pageYOffset;
13  var header = document.getElementById('portal-header');
14  var body = document.getElementById('visual-portal-wrapper');
15  var content = document.getElementById('content');
16  var subheader = document.getElementById("viewlet-above-content").getElementsByClassName("subheader")[0];
17  var prevScrollpos = function getTopOffset(element) {
18    return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
19    };
20
21  const noLeadImage = document.getElementsByClassName(
22    'leadImage'
23   ).length === 0;
24  
25  if (noLeadImage && typeof subheader !== 'undefined') {
26    subheader.style.paddingTop = "9rem";
27  } 
28
29  if (noLeadImage && typeof subheader === 'undefined') {
30    content.style.paddingTop = "5rem";
31  }
32
33  window.onscroll = function() {
34    var currentScrollPos = window.pageYOffset;
35    if (prevScrollpos >= currentScrollPos) {
36      if (body.classList.contains('plone-toolbar-top')) {
37        header.style.top = "50px";
38      } else {
39        header.style.top = "0";
40      }
41    } else {
42      header.style.top = "calc(-1 * var(--headerheight))";
43    }
44    
45    prevScrollpos = Math.max(currentScrollPos, 0);
46  } 
47});
48}catch(e){
49    // log it
50    if (typeof console !== "undefined"){
51        console.log('Error loading javascripts!' + e);
52    }
53}finally{
54    define = _old_define;
55    require = _old_require;
56}

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.