PageSourceSearch

https://siranui.io/static/js/approval-access.js?v=1

js siranui.io collected 2026-10-02 01:58:08 UTC 1,733 bytes, 1 lines download raw bytes

1!function(){const e=new Map;function t(e){return e?"string"==typeof e?e:e.error||e.message||"":""}async function o(o,a){const n=(o||window.customerId||"").trim();if(!n)return{allowed:!1,message:"アカウントが選択されていません。"};const s=function(e,t){return`${(e||"").trim()}::${(t||"").trim()}`}(n,a),r=e.get(s);if(r&&Date.now()-r.ts<3e5)return r.result;let i=`/api/approval/media-access-check?customer_id=${encodeURIComponent(n)}`;a&&(i+=`&account_group_id=${encodeURIComponent(a)}`),"function"==typeof window.appendAgentApiParams&&(i=window.appendAgentApiParams(i));const c=await fetch(i),d=await c.json().catch(()=>({})),l={allowed:c.ok&&!1!==d.allowed,message:d.message||t(d)||"権限確認に失敗しました。",details:d.details||null};return c.ok||l.message||(l.message=t(d)||"権限確認に失敗しました。",l.allowed=!1),e.set(s,{ts:Date.now(),result:l}),l}window.fetchApprovalMediaAccess=o,window.ensureApprovalMediaAccess=async function(e,t,a){const n=a||{},s=await o(e,t);if(s.allowed)return!0;const r=s.message||"Google 広告の権限が不足しているため承認できません。";return n.silent||("function"==typeof window.showPremiumToast?window.showPremiumToast(r,"error"):alert(r)),!1},window.invalidateApprovalMediaAccessCache=function(t){const o=`${(t||window.customerId||"").trim()}::`;for(const t of e.keys())t.startsWith(o)&&e.delete(t)},window.applyApprovalAccessToButtons=function(e,t){const o=Array.isArray(e)?e:[e],a=t&&!1!==t.allowed,n=t&&t.message||"";o.filter(Boolean).forEach(e=>{!e.dataset.approveLabel&&e.textContent&&(e.dataset.approveLabel=e.textContent.trim()),e.disabled=!a,e.title=a?"":n,!a&&e.dataset.approveLabel&&(e.textContent=e.dataset.approveLabel)})}}();

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.