PageSourceSearch

https://siranui.io/static/js/qs-customizer-proposals.js?v=1

js siranui.io collected 2026-10-02 01:58:07 UTC 3,245 bytes, 1 lines download raw bytes

1!function(){const e="qs_low_score_customizer";function o(){return(window.customerId||localStorage.getItem("siranui_auth_customer_id")||"").trim()}async function t(e,t,{replace:r=!1}={}){const a=await fetch("/api/qs-customizer/proposals/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify("function"==typeof window.agentApiJsonBody?window.agentApiJsonBody({platform:window.activeKeywordPlatform||"google",category_id:e,items:t,replace:r}):{customer_id:o(),category_id:e,items:t,replace:r})}),n=await a.json().catch(()=>({}));if(!a.ok)throw new Error(n.message||n.error||`保存に失敗しました (HTTP ${a.status})`);return"function"==typeof window.refreshNotificationApprovalHistory&&window.refreshNotificationApprovalHistory(null,{showLoading:!1,forceRefresh:!0}),n}function r(e,o,t){return{keyword_text:e.keyword_text,quality_score:e.quality_score,ad_group_id:String(e.ad_group_id||""),campaign_id:String(e.campaign_id||""),campaign_name:e.campaign_name||"",attribute_name:o,value:t}}function a(){const e=document.querySelectorAll("#keyword-table-body tr[data-keyword]"),o=document.getElementById("global-customizer-attr-select"),t=o?o.value:"商品特長",a=[];return e.forEach(e=>{const o=e.dataset.keyword;if(!o)return;const n=e.querySelector(".kw-val-input"),i=n?n.value.trim():"";if(!i)return;let s=null;window.originalKeywordData&&window.originalKeywordData.improvements&&(s=window.originalKeywordData.improvements.find(e=>e.keyword_text===o)),s||(s={keyword_text:o,ad_group_id:e.dataset.adGroupId||""}),a.push(r(s,t,i))}),a}window.QsCustomizerProposals={QS_CATEGORY_LOW_SCORE:e,updateQsProposalItems:t,downloadQsProposalsCsv:async function(e){let t="function"==typeof window.appendAgentApiParams?window.appendAgentApiParams("/api/qs-customizer/proposals/export",{platform:window.activeKeywordPlatform||"google"}):`/api/qs-customizer/proposals/export?customer_id=${encodeURIComponent(o())}`;e&&(t+=`&category_id=${encodeURIComponent(e)}`);const r=await fetch(t);if(!r.ok){const e=await r.text();throw new Error(e||`CSVの取得に失敗しました (HTTP ${r.status})`)}const a=await r.blob(),n=URL.createObjectURL(a),i=document.createElement("a"),s=(new Date).toISOString().slice(0,10);i.href=n,i.download=`qs_customizer_proposals_${s}.csv`,document.body.appendChild(i),i.click(),i.remove(),URL.revokeObjectURL(n)},buildItemFromKeywordRow:r,collectKeywordTableItemsForSave:a,collectEditableModalItems:function(e){const o=document.getElementById("proposal-detail-body");if(!o)return[];const t=o.querySelectorAll("tr[data-qs-item-index]"),r=[];return t.forEach(e=>{const o={};e.querySelectorAll("input[data-field]").forEach(e=>{o[e.dataset.field]=e.value});const t=e.querySelector(".qs-proposal-attr-input"),a=e.querySelector(".qs-proposal-value-input"),n=t?t.value.trim():o.attribute_name||"",i=a?a.value.trim():o.value||"";r.push({...o,attribute_name:n,value:i})}),r.filter(e=>e.value&&e.ad_group_id)},saveKeywordRowToProposal:async function(o,a,n){const i=r(o,a,n);return t(e,[i],{replace:!1})},saveAllKeywordTableToProposal:async function(){const o=a();if(!o.length)throw new Error("保存できる行がありません。追加値を入力してください。");return t(e,o,{replace:!0})}}}();

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.