Changes to arbi.scroll.pub

root
root
26 days ago
Initial commit
body.html
Changed around line 1
+
+

Sports Arbitrage Calculator

+

Calculate guaranteed profits across different bookmakers

+
+
+
+
+
+
+
+
+
+
+
+
+
+ $
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Results

+
+ Total Profit:
+ $0.00
+
+
+

Recommended Stakes

+
    +
    +
    +
    +
    +
    +
    +

    Built for sports arbitrage traders

    +
    index.scroll
    Changed around line 1
    + buildHtml
    + baseUrl https://arbi.scroll.pub
    + metaTags
    + editButton /edit.html
    + title Sports Arbitrage Calculator
    + style.css
    + body.html
    + script.js
    readme.scroll
    Changed around line 1
    + # arbi.scroll.pub
    + Website generated by Claude from prompt: A sports arbitrage calculator with impressive Ui, should work for both 3 way and 2 way games.
    script.js
    Changed around line 1
    + document.addEventListener('DOMContentLoaded', () => {
    + const modeButtons = document.querySelectorAll('.mode-btn');
    + const thirdWay = document.querySelector('.third-way');
    + const calculateBtn = document.querySelector('.calculate-btn');
    + const results = document.querySelector('.results');
    + const stakesList = document.querySelector('.stakes-list');
    + const profitAmount = document.querySelector('.profit-amount');
    + const totalStakeInput = document.getElementById('total-stake');
    + const oddsInputs = document.querySelectorAll('.odds-input');
    +
    + let currentMode = '2way';
    +
    + modeButtons.forEach(btn => {
    + btn.addEventListener('click', () => {
    + modeButtons.forEach(b => b.classList.remove('active'));
    + btn.classList.add('active');
    + currentMode = btn.dataset.mode;
    + thirdWay.classList.toggle('hidden', currentMode === '2way');
    + results.classList.add('hidden');
    + });
    + });
    +
    + calculateBtn.addEventListener('click', () => {
    + const totalStake = parseFloat(totalStakeInput.value);
    + if (!totalStake || totalStake <= 0) {
    + alert('Please enter a valid stake amount');
    + return;
    + }
    +
    + const odds = Array.from(oddsInputs)
    + .slice(0, currentMode === '2way' ? 2 : 3)
    + .map(input => parseFloat(input.value))
    + .filter(odd => odd && odd > 1);
    +
    + if (odds.length !== (currentMode === '2way' ? 2 : 3)) {
    + alert('Please enter valid odds for all bookmakers');
    + return;
    + }
    +
    + const result = calculateArbitrage(odds, totalStake);
    + if (!result.isArbitrage) {
    + alert('No arbitrage opportunity found with these odds');
    + return;
    + }
    +
    + displayResults(result);
    + });
    +
    + function calculateArbitrage(odds, totalStake) {
    + const impliedProbs = odds.map(odd => 1 / odd);
    + const totalImpliedProb = impliedProbs.reduce((sum, prob) => sum + prob, 0);
    +
    + if (totalImpliedProb >= 1) {
    + return { isArbitrage: false };
    + }
    +
    + const profit = ((1 - totalImpliedProb) / totalImpliedProb) * totalStake;
    + const stakes = impliedProbs.map(prob =>
    + (prob / totalImpliedProb) * totalStake
    + );
    +
    + return {
    + isArbitrage: true,
    + profit,
    + stakes
    + };
    + }
    +
    + function displayResults(result) {
    + results.classList.remove('hidden');
    + profitAmount.textContent = `$${result.profit.toFixed(2)}`;
    +
    + stakesList.innerHTML = result.stakes
    + .map((stake, index) => `
    +
  • Bookmaker ${index + 1}: $${stake.toFixed(2)}
  • + `)
    + .join('');
    + }
    + });
    style.css
    Changed around line 1
    + :root {
    + --primary-color: #2c3e50;
    + --accent-color: #3498db;
    + --success-color: #27ae60;
    + --error-color: #e74c3c;
    + --bg-color: #f8f9fa;
    + --text-color: #2c3e50;
    + --border-radius: 8px;
    + }
    +
    + * {
    + margin: 0;
    + padding: 0;
    + box-sizing: border-box;
    + }
    +
    + body {
    + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    + line-height: 1.6;
    + color: var(--text-color);
    + background: var(--bg-color);
    + min-height: 100vh;
    + display: flex;
    + flex-direction: column;
    + }
    +
    + header {
    + background: var(--primary-color);
    + color: white;
    + padding: 2rem 1rem;
    + text-align: center;
    + }
    +
    + .tagline {
    + opacity: 0.8;
    + font-size: 1.1rem;
    + margin-top: 0.5rem;
    + }
    +
    + main {
    + flex: 1;
    + padding: 2rem 1rem;
    + max-width: 800px;
    + margin: 0 auto;
    + width: 100%;
    + }
    +
    + .calculator-container {
    + background: white;
    + border-radius: var(--border-radius);
    + padding: 2rem;
    + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    + }
    +
    + .mode-switch {
    + display: flex;
    + gap: 1rem;
    + margin-bottom: 2rem;
    + justify-content: center;
    + }
    +
    + .mode-btn {
    + padding: 0.5rem 1.5rem;
    + border: 2px solid var(--accent-color);
    + background: none;
    + color: var(--accent-color);
    + border-radius: var(--border-radius);
    + cursor: pointer;
    + transition: all 0.3s ease;
    + }
    +
    + .mode-btn.active {
    + background: var(--accent-color);
    + color: white;
    + }
    +
    + .calculator-form {
    + display: flex;
    + flex-direction: column;
    + gap: 1.5rem;
    + }
    +
    + .stake-input {
    + margin-bottom: 1rem;
    + }
    +
    + .input-wrapper {
    + position: relative;
    + display: flex;
    + align-items: center;
    + }
    +
    + .currency {
    + position: absolute;
    + left: 1rem;
    + color: var(--text-color);
    + }
    +
    + input {
    + width: 100%;
    + padding: 0.8rem;
    + padding-left: 2rem;
    + border: 2px solid #ddd;
    + border-radius: var(--border-radius);
    + font-size: 1rem;
    + transition: border-color 0.3s ease;
    + }
    +
    + input:focus {
    + outline: none;
    + border-color: var(--accent-color);
    + }
    +
    + .odds-container {
    + display: grid;
    + grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    + gap: 1rem;
    + }
    +
    + .odds-group {
    + display: flex;
    + flex-direction: column;
    + gap: 0.5rem;
    + }
    +
    + .calculate-btn {
    + background: var(--accent-color);
    + color: white;
    + padding: 1rem;
    + border: none;
    + border-radius: var(--border-radius);
    + font-size: 1.1rem;
    + cursor: pointer;
    + transition: background-color 0.3s ease;
    + }
    +
    + .calculate-btn:hover {
    + background: #2980b9;
    + }
    +
    + .results {
    + margin-top: 2rem;
    + padding-top: 2rem;
    + border-top: 2px solid #eee;
    + }
    +
    + .profit-info {
    + display: flex;
    + justify-content: space-between;
    + align-items: center;
    + font-size: 1.2rem;
    + margin: 1rem 0;
    + padding: 1rem;
    + background: #f8f9fa;
    + border-radius: var(--border-radius);
    + }
    +
    + .profit-amount {
    + color: var(--success-color);
    + font-weight: bold;
    + }
    +
    + .stakes-list {
    + list-style: none;
    + display: flex;
    + flex-direction: column;
    + gap: 0.5rem;
    + }
    +
    + .hidden {
    + display: none;
    + }
    +
    + footer {
    + text-align: center;
    + padding: 2rem;
    + background: var(--primary-color);
    + color: white;
    + }
    +
    + @media (max-width: 600px) {
    + .calculator-container {
    + padding: 1rem;
    + }
    +
    + .odds-container {
    + grid-template-columns: 1fr;
    + }
    + }