PageSourceSearch

https://modeworld.ir/wp-content/cache/min/1/wp-content/plugins/wp-…/js/activity-tracker.js?ver=1790332867

js modeworld.ir collected 2026-09-25 12:19:23 UTC 2,715 bytes, 19 lines download raw bytes

1(function(){'use strict';var cfg=window.wccpActivity;if(!cfg||!window.addEventListener||navigator.webdriver){return}
2var flags=cfg.f;var cap=cfg.m||5;var counts={s:0,r:0,i:0,k:0,p:0};var sent={s:0,r:0,i:0,k:0,p:0};var visitSent=!1;var passive={passive:!0,capture:!0};var KEYS=[65,67,88,85,86,83,73];function add(key){if(counts[key]<cap){counts[key]++}}
3function editable(node){for(;node&&node.nodeType===1;node=node.parentElement){if(/^(INPUT|TEXTAREA|SELECT|OPTION)$/.test(node.nodeName)||node.isContentEditable){return!0}}
4return!1}
5function image(node){return!!node&&node.nodeName==='IMG'}
6if(flags.r){window.addEventListener('contextmenu',function(e){add(image(e.target)?'i':'r')},passive);window.addEventListener('dragstart',function(e){if(image(e.target)){add('i')}},passive)}
7if(flags.s){window.addEventListener('keydown',function(e){if(e.ctrlKey&&!e.repeat&&KEYS.indexOf(e.keyCode||e.which)!==-1&&!editable(e.target)){add('k')}},passive)}
8if(flags.s||flags.c){var down=null;window.addEventListener('mousedown',function(e){down=null;if(e.button!==0||editable(e.target)||image(e.target)){return}
9if(e.detail===2){add('s');return}
10down={x:e.clientX,y:e.clientY}},passive);window.addEventListener('mousemove',function(e){if(down&&(e.buttons&1)&&Math.abs(e.clientX-down.x)+Math.abs(e.clientY-down.y)>16){down=null;add('s')}},passive);window.addEventListener('mouseup',function(){down=null},passive);var press=null;function release(){if(press){clearTimeout(press);press=null}}
11window.addEventListener('touchstart',function(e){release();var target=e.target;if(e.touches.length!==1||editable(target)){return}
12press=setTimeout(function(){press=null;if(image(target)){add('i')}else if(!(target.closest&&target.closest('a'))){add('s')}},650)},passive);window.addEventListener('touchmove',release,passive);window.addEventListener('touchend',release,passive);window.addEventListener('touchcancel',release,passive)}
13if(flags.p){window.addEventListener('beforeprint',function(){add('p')})}
14function flush(){var body='action=wccp_free_activity&o='+encodeURIComponent(cfg.o);var any=!1;for(var key in counts){var delta=counts[key]-sent[key];if(delta>0){body+='&'+key+'='+delta;sent[key]=counts[key];any=!0}}
15if(!any){return}
16if(!visitSent){body+='&v=1';visitSent=!0}
17var type='application/x-www-form-urlencoded';try{if(navigator.sendBeacon&&navigator.sendBeacon(cfg.u,new Blob([body],{type:type}))){return}}catch(e){}
18if(window.fetch){window.fetch(cfg.u,{method:'POST',body:body,keepalive:!0,credentials:'same-origin',headers:{'Content-Type':type}}).catch(function(){})}}
19document.addEventListener('visibilitychange',function(){if(document.visibilityState==='hidden'){flush()}});window.addEventListener('pagehide',flush)}())

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.