PageSourceSearch

https://suvargazeta.ru/build/assets/ReactionsForm-6be3cc34.js

js suvargazeta.ru collected 2026-10-02 20:23:13 UTC 1,286 bytes, 1 lines download raw bytes

1class o{constructor(e){if(!e){console.error("ReactionsForm: не передан rootElement");return}e.dataset.reactionsFormInitialized||(e.dataset.reactionsFormInitialized="true",this.formSelector=e,this.modelName=this.formSelector.getAttribute("dataname"),this.modelId=this.formSelector.getAttribute("dataId"),this.dataType=this.formSelector.getAttribute("dataType"),this.errorMessage=this.formSelector.querySelector(".smile_container__message"),this.reaction=this.formSelector.querySelector(".smile_img"),this.reactionCount=this.formSelector.querySelector(".smile_count"))}reactionsListener(){this.formSelector.addEventListener("submit",e=>{e.preventDefault(),fetch(`${this.formSelector.action}?name=${this.modelName}&id=${this.modelId}&type=${this.dataType}`,{method:this.formSelector.method,credentials:"same-origin",headers:new Headers({Accept:"application/json"})}).then(t=>t.ok?t.json():Promise.reject(t.status)).then(()=>{this.reactionCount&&(this.reactionCount.textContent=Number(this.reactionCount.textContent)+1)}).catch(t=>{if(t==400){this.reaction&&(this.reaction.style.opacity="0.3");const i=this.formSelector.querySelector(".reaction_submit");i&&(i.disabled=!0),this.errorMessage&&this.errorMessage.classList.add("smile_container__message_active")}})})}}export{o as R};

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.