Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/monetize

crates/monetize-site-buy/tests/browser/paid.html

<!doctype html>
<html lang="en">
<head><meta charset="utf-8"><title>an order page</title></head>
<body>
  <!-- A site's order page as the shared script needs it (`assets::PAID_IDS`); the look is the site's. -->
  <div id="cancelled" hidden><h3>Payment cancelled</h3><p>Nothing was charged.</p></div>
  <ol id="steps"></ol>
  <p id="headline">Checking your order …</p>
  <p id="detail"></p>
  <p id="change" hidden></p>
  <p id="room" hidden></p>
  <div id="progress"><i></i></div>
  <div id="pay" hidden></div>
  <p id="fault" hidden></p>
  <p id="foot" hidden></p>
  <pre id="verdict"></pre>
<script>/*@paid-script*/</script>
<script>
  // What the reader sees, read back for the test (Chromium's --dump-dom).
  setInterval(() => {
    const shown = id => { const e = document.getElementById(id); return !!e && !e.hidden; };
    const text = id => (document.getElementById(id).textContent || '').trim();
    document.getElementById('verdict').textContent = JSON.stringify({
      cancelled: shown('cancelled'),
      headline: text('headline'),
      detail: text('detail'),
      pay: shown('pay') ? text('pay') : '',
      buttons: [...document.querySelectorAll('#pay button')].map(b => b.textContent),
      links: [...document.querySelectorAll('#foot a')].map(a => [a.textContent, a.getAttribute('href')]),
      steps: [...document.querySelectorAll('#steps li')].map(l => [l.textContent, l.className]),
    });
  }, 100);
</script>
</body>
</html>