PageSourceSearch

https://www.ahtahthiki.com/javascripts/overlaps.js

js ahtahthiki.com collected 2026-10-01 11:28:30 UTC 1,244 bytes, 6 lines download raw bytes

1if(typeof loaded76927d30c2748eb5784af8e0a15ca389=="undefined"){var loaded76927d30c2748eb5784af8e0a15ca389=!0;(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory)}else{factory(jQuery)}}(function($){$.fn.overlaps=function(selector){return this.pushStack(filterOverlaps(this,selector&&$(selector)))};function filterOverlaps(collection1,collection2){var dims1=getDims(collection1),dims2=!collection2?dims1:getDims(collection2),stack=[],index1=0,index2=0,length1=dims1.length,length2=!collection2?dims1.length:dims2.length;if(!collection2){collection2=collection1}
2for(;index1<length1;index1++){for(index2=0;index2<length2;index2++){if(collection1[index1]===collection2[index2]){continue}else if(checkOverlap(dims1[index1],dims2[index2])){stack.push((length1>length2)?collection1[index1]:collection2[index2])}}}
3return $.unique(stack)}
4function getDims(elems){var dims=[],i=0,offset,elem;while((elem=elems[i++])){offset=$(elem).offset();dims.push([offset.top,offset.left,elem.offsetWidth,elem.offsetHeight])}
5return dims}
6function checkOverlap(dims1,dims2){var x1=dims1[1],y1=dims1[0],w1=dims1[2],h1=dims1[3],x2=dims2[1],y2=dims2[0],w2=dims2[2],h2=dims2[3];return!(y2+h2<=y1||y1+h1<=y2||x2+w2<=x1||x1+w1<=x2)}}))}

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.