1(function protectCommerceCheckout(window, document) { 2 'use strict'; 3 var route = window.location.pathname.match(/^\/games\/([^/]+)\/checkout\/([^/]+)\/?$/); 4 if (!route && !/^\/games\/[^/]+\/(?:purchases\/restore|commerce-sandbox)\/?$/.test(window.location.pathname)) return; 5 window.__GLITCH_COMMERCE_BOOTSTRAP__ = true; 6 // Runs before consent vendors, experimentation, replay, or the React bundle. 7 var fragment = new URLSearchParams(window.location.hash.slice(1)); 8 var token = fragment.get('token'); 9 if (token && route) { 10 var saved = false; 11 try { window.sessionStorage.setItem('glitch:commerce:' + route[1] + ':' + route[2], token); saved = true; } catch (error) { /* React retains in memory; vendors remain disabled. */ } 12 if (saved) { 13 fragment.delete('token'); 14 var remaining = fragment.toString(); 15 window.history.replaceState(window.history.state, '', window.location.pathname + window.location.search + (remaining ? '#' + remaining : '')); 16 } 17 } 18 var policy = document.createElement('meta'); 19 policy.name = 'referrer'; 20 policy.content = 'no-referrer'; 21 document.head.appendChild(policy); 22}(window, document));
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.