PageSourceSearch

https://www.palestinianhistorytapestry.org/wp-content/themes/Sumud/js/backPosition.js

js palestinianhistorytapestry.org collected 2026-10-02 12:57:35 UTC 1,487 bytes, 36 lines download raw bytes

1/**
2 * @author Alexander Farkas
3 * v. 1.02
4 *
5 * Edited by Nelson Wells for jQuery 1.8 compatibility
6 */
7(function($) {
8    $.extend($.fx.step,{
9        backgroundPosition: function(fx) {
10            if (fx.pos === 0 && typeof fx.end == 'string') {
11                var start = $.css(fx.elem,'backgroundPosition');
12                if(start === undefined){
13                    start = $.css(fx.elem,'backgroundPositionX')+' '+$.css(fx.elem,'backgroundPositionY');
14                }
15                start = toArray(start);
16                fx.start = [start[0],start[2]];
17                var end = toArray(fx.end);
18                fx.end = [end[0],end[2]];
19                fx.unit = [end[1],end[3]];
20            }
21            var nowPosX = [];
22            nowPosX[0] = ((fx.end[0] - fx.start[0]) * fx.pos) + fx.start[0] + fx.unit[0];
23            nowPosX[1] = ((fx.end[1] - fx.start[1]) * fx.pos) + fx.start[1] + fx.unit[1];
24            fx.elem.style.backgroundPosition = nowPosX[0]+' '+nowPosX[1];
25 
26           function toArray(strg){
27               strg = strg.replace(/center/g,'50%');
28               strg = strg.replace(/left|top/g,'0px');
29               strg = strg.replace(/right|bottom/g,'100%');
30               strg = strg.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");
31               var res = strg.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);
32               return [parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]];
33           }
34        }
35    });
36})(jQuery);

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.