PageSourceSearch

https://setouchi-kotori.com/wp-content/plugins/vk-ab-testing/build/js/view.js?ver=1.7.0

js setouchi-kotori.com collected 2026-09-25 22:49:50 UTC 2,155 bytes, 1 lines download raw bytes

1(()=>{"use strict";window.addEventListener("DOMContentLoaded",(function(){const t=document.querySelectorAll(".vk-ab-testing_call_ab_test"),e=vkABTestingViewVars.isDynamicURLParams,a=new URLSearchParams(window.location.search),i="vkabt";if(t.forEach(((t,e)=>{const r=t.querySelectorAll(".ab-test-item"),n=i+(e+1),o=a.get(n);let s;if(o){const[t,e]=o.split("_");s=Array.from(r).find((a=>a.getAttribute("data-id")===t&&a.getAttribute("data-block-id")===e))}if(!s&&r.length>0){const t=function(t){const e=Array.from(t),a=e.map((t=>parseFloat(t.getAttribute("data-display-ratio")))),i=a.reduce(((t,e)=>t+e),0),r=Math.random()*i;let n=0;for(let t=0;t<e.length;t++)if(n+=a[t],r<n)return t}(r);s=r[t]}if(s){s.style.display="block";const t=s.getAttribute("data-id"),e=s.getAttribute("data-block-id"),a=(s.getAttribute("data-target-id")||"").trim(),i=s.getAttribute("data-target-type")||"",r=(s.getAttribute("data-target-class")||"").trim().replace(/^\.+/,"").split(/\s+/)[0]||"",n=vkABTestingViewVars.ajaxUrl,o=(t,e,a)=>{const i=new XMLHttpRequest;i.open("POST",n,!0),i.setRequestHeader("content-type","application/x-www-form-urlencoded;charset=UTF-8"),i.send(`action=${t}&post=${e}&block=${a}`)};o("count_view",t,e);const c=()=>o("count_click",t,e),l=t=>{t.addEventListener("click",c)};if("class"===i&&""!==r)s.addEventListener("click",(t=>{let e=t.target;for(;e instanceof window.Element;){if(e.classList.contains(r))return void c();if(e===s)return;e=e.parentElement}}));else if("id"!==i&&""!==i||""===a)l(s);else{const t=document.getElementById(a);t&&l(t)}}})),e){let e={};t.forEach(((t,a)=>{const r=a+1,n=t.querySelector('.ab-test-item[style*="display: block"]');if(n){const t=n.getAttribute("data-id"),a=n.getAttribute("data-block-id");e[i+r]=`${t}_${a}`}})),function(t){let e=window.location.href.split("?")[0],a=new URLSearchParams;Array.from(new URLSearchParams(window.location.search).entries()).forEach((([t])=>{t.match(/^vkabt\d+$/)&&a.delete(t)})),Object.keys(t).sort(((t,e)=>parseInt(t.match(/\d+$/)[0],10)-parseInt(e.match(/\d+$/)[0],10))).forEach((e=>{a.set(e,t[e])})),a.toString()&&window.history.pushState({},"",`${e}?${a.toString()}`)}(e)}}))})();

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.