1const GAME_FRAME_SELECTOR = '.game__media iframe, iframe[data-fullscreen-target="iframe"], .daruma-game-frame'; 2 3export function gameFrames() { 4 return Array.from(document.querySelectorAll(GAME_FRAME_SELECTOR)); 5} 6 7export function messageFromGameFrame(source) { 8 if (!source) return false; 9 10 return gameFrames().some((frame) => frame.contentWindow === source); 11} 12 13// Targeted at the frame's own origin rather than '*' â these messages carry balances. 14export function postToGameFrames(message) { 15 gameFrames().forEach((frame) => { 16 if (!frame.contentWindow || !frame.src) return; 17 18 try { 19 frame.contentWindow.postMessage(message, new URL(frame.src).origin); 20 } catch (error) { 21 console.error('Failed to post message to game frame:', error); 22 } 23 }); 24};
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.