1////////////////////////////////////////////////////////////////////////////// 2// Requires https://www.bildarchiv-ostpreussen.de/js/base.js 3////////////////////////////////////////////////////////////////////////////// 4 5// absTop(el) 6// absBottom(el) 7// getHeight(el) 8// getWidth(el) 9// getScrollbarsVisible() 10 11 12 13 14// Liefert die absolute obere Position eines Elementes zurueck: 15function absTop(el) { 16 if (!el) { return 0; } 17 var t = typeof el; 18 if (t.toLowerCase() == 'string') { 19 el = $('#'+el).get(0); 20 } 21 return _absTop(el); 22} 23function _absTop(el) { 24 if (el == null) { return 0; } 25 return (el.offsetParent)? el.offsetTop+_absTop(el.offsetParent) : el.offsetTop; 26} 27function absBottom(el) { 28 if (!el) { return _getHeight(); } 29 var t = typeof el; 30 if (t.toLowerCase() == 'string') { 31 el = $('#'+el).get(0); 32 } 33 return _absTop(el) + _getHeight(el); 34} 35 36 37// Use getHeight() without parameter, if you want the viewport height of the browser: 38function getHeight(el) { 39 var t = typeof el; 40 if (t.toLowerCase() == 'string') { 41 el = $('#'+el).get(0); 42 } 43 return _getHeight(el); 44} 45function _getHeight(el) { 46 if (!el) { 47 if( typeof( window.innerHeight ) == 'number' ) { 48 //Non-IE 49 return window.innerHeight; 50 } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { 51 //IE 6+ in 'standards compliant mode' 52 return document.documentElement.clientHeight; 53 } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { 54 //IE 4 compatible 55 return document.body.clientHeight; 56 } 57 return 0; 58 } 59 60 if( typeof( el.offsetHeight ) == 'number' ) { 61 //Non-IE 62 return el.offsetHeight; 63 } else if( el.clientHeight ) { 64 return el.clientHeight; 65 } 66 return 0; 67} 68 69// Use getWidth() without parameter, if you want the viewport width of the browser: 70function getWidth(el) { 71 var t = typeof el; 72 if (t.toLowerCase() == 'string') { 73 el = $('#'+el).get(0); 74 } 75 return _getWidth(el); 76} 77function _getWidth(el) { 78 if (!el) { 79 if( typeof( window.innerWidth ) == 'number' ) { 80 //Non-IE 81 return window.innerWidth; 82 } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { 83 //IE 6+ in 'standards compliant mode' 84 return document.documentElement.clientWidth; 85 } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { 86 //IE 4 compatible 87 return document.body.clientWidth; 88 } 89 return 0; 90 } 91 92 if( typeof( el.offsetWidth ) == 'number' ) { 93 //Non-IE 94 return el.offsetWidth; 95 } else if( document.documentElement.clientWidth || document.documentElement.clientHeight ) { 96 return el.clientWidth; 97 } 98 return 0; 99} 100 101// Does not really work: 102function getScrollbarsVisible() { 103 if (window.innerHeight && window.document.height) { 104 return window.innerHeight != window.document.height; 105 } 106 if(document.body && document.body.clientHeight) { 107 return document.body.clientHeight != document.body.scrollHeight; 108 } 109 return self.innerHeight != self.document.height; 110}
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.