1var rvb = rvb || { 2 3 ck: '_rvbck', 4 5 conditionalLoad: function(targetObj, minimumLength, callback) 6 { 7 if( !minimumLength ){ 8 minimumLength = 2; 9 } 10 window.setTimeout(function(){ 11 var img = targetObj.querySelectorAll('img'); 12 if( img.length >= minimumLength ){ 13 14 for(i=0; i<=(img.length-1); i++){ 15 img[i].removeAttribute('width'); 16 img[i].removeAttribute('height'); 17 } 18 19 if( typeof(callback) == 'function' ){ 20 callback(); 21 } 22 23 } 24 }, 1000); 25 }, 26 27 getCk: function() { 28 var v = document.cookie.match('(^|;) ?' + rvb.ck + '=([^;]*)(;|$)'); 29 return v ? v[2] : null; 30 }, 31 32 setCk: function() { 33 document.cookie = rvb.ck + "=1;path=/;"; 34 }, 35 36 pop: { 37 38 close: function(obj) 39 { 40 document.querySelector('.rvb-unit-pop').style.display = 'none'; 41 }, 42 43 load: function() 44 { 45 46 var targetObj = document.querySelector('.rvb-unit-pop'); 47 48 window.setTimeout(function(){ 49 var closeBtn = targetObj.querySelector('.rvb-pop-close'); 50 if( closeBtn ){ 51 closeBtn.style.display = 'block'; 52 } 53 }, 5000); 54 55 targetObj.style.display = 'block'; 56 rvb.setCk(); 57 58 } 59 60 }, 61 62 reveal: { 63 64 load: function() 65 { 66 67 var targetObj = document.querySelector('.rvb-reveal'); 68 $('.rvb-reveal').slideDown('slow'); 69 70 } 71 72 }, 73 74 push: { 75 76 timeout: null, 77 contractOk: false, 78 delayCollapseSeconds: 7, 79 80 load: function() 81 { 82 83 // Show it 84 var obj = rvb.push.obj(); 85 if( obj.data('load-hidden') ){ 86 obj.height("40px"); 87 rvb.push.contractOk = true; 88 } 89 obj.show(); 90 91 // Init collapse 92 if( 93 rvb.push.delayCollapseSeconds 94 && typeof rvb.push.delayCollapseSeconds == 'number' 95 ){ 96 rvb.push.obj().mouseenter(function(){ 97 rvb.push.expand(); 98 }).mouseleave(function(){ 99 rvb.push.contract(); 100 }); 101 rvb.push.timeout = window.setTimeout(rvb.push.initContract, (rvb.push.delayCollapseSeconds * 1000)); 102 } 103 104 }, 105 106 expand: function() 107 { 108 var obj = rvb.push.obj(); 109 if( obj.hasClass('height-440') ){ 110 objHeight = "440px"; 111 }else{ 112 objHeight = "340px"; 113 } 114 obj.animate({ 115 height: objHeight 116 }); 117 }, 118 119 contract: function() 120 { 121 if( rvb.push.contractOk ){ 122 rvb.push.obj().animate({ 123 height: "40px" 124 }); 125 } 126 }, 127 128 initContract: function() 129 { 130 window.clearTimeout(rvb.push.timeout); 131 rvb.push.contractOk = true; 132 rvb.push.contract(); 133 }, 134 135 obj: function() 136 { 137 return $('.rvb-unit-push'); 138 } 139 140 }, 141 142 peel: { 143 144 load: function() 145 { 146 rvb.peel.obj().show(); 147 }, 148 149 obj: function() 150 { 151 return $('.rvb-unit-peel'); 152 } 153 154 }, 155 156 mobstick: { 157 158 load: function() 159 { 160 var targetObj = document.querySelector('.rvb-unit-mobstick'); 161 targetObj.style.display = 'block'; 162 targetObj.querySelectorAll('img').forEach(imgObj => { 163 imgObj.removeAttribute('width'); 164 imgObj.removeAttribute('height'); 165 }); 166 }, 167 168 cancel: function(btnObj) 169 { 170 rvb.setCk(); 171 btnObj.closest('.rvb-unit-mobstick').style.display = 'none'; 172 } 173 174 }, 175 176 margin: { 177 178 initialized: false, 179 180 init: function() 181 { 182 if( !rvb.margin.initialized ){ 183 window.addEventListener('resize', function(event) { 184 var val = ( rvb.margin.ok() ? 'block' : 'none' ); 185 elements = document.querySelectorAll('.rvb-unit-margin'); 186 elements.forEach((element, key) => { 187 element.style.display = val; 188 }) 189 }, true); 190 rvb.margin.initialized = true; 191 } 192 }, 193 194 ok: function(cb) 195 { 196 197 var cerativewidth = 160; 198 var cerativemargin = 40; 199 200 var containerwidth = 0; 201 var containers = document.getElementsByClassName("container"); 202 for (var i = 0; i < containers.length; i++) { 203 if( containers[i].offsetWidth > containerwidth ){ 204 containerwidth = containers[i].offsetWidth; 205 } 206 } 207 208 if( (window.innerWidth-containerwidth) > ((cerativewidth*2) + (cerativemargin*2)) ){ 209 rvb.margin.init(); 210 return true; 211 }else{ 212 return false;
213 } 214 215 } 216 217 }, 218 219 shoutbox: { 220 221 load: function() 222 { 223 224 var targetObj = document.querySelector('.rvb-unit-shoutbox'); 225 // document.querySelector('.rvb-unit-shoutbox').slideUp('slow'); 226 227 window.setTimeout(function(){ 228 var closeBtn = targetObj.querySelector('.rvb-shoutbox-close'); 229 if( closeBtn ){ 230 closeBtn.style.display = 'block'; 231 } 232 }, 5000); 233 234 targetObj.style.display = 'block'; 235 // $('.rvb-unit-shoutbox').slideUp('slow'); 236 237 }, 238 239 close: function(obj) 240 { 241 document.querySelector('.rvb-unit-shoutbox').style.display = 'none'; 242 } 243 244 }, 245 246 crawler: { 247 248 close: function(obj) 249 { 250 document.querySelector('.rvb-bottom-crawler').style.display = 'none'; 251 }, 252 253 load: function() 254 { 255 var targetObj = document.querySelector('.rvb-bottom-crawler'); 256 257 window.setTimeout(function(){ 258 var closeBtn = targetObj.querySelector('.rvb-bottom-crawler-close'); 259 if( closeBtn ){ 260 closeBtn.style.display = 'block'; 261 } 262 }, 5000); 263 264 targetObj.style.display = 'block'; 265 } 266 267 } 268 269};
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.