diff --git a/ads.js b/ads.js
index 928ee09..9827cda 100644
Binary files a/ads.js and b/ads.js differ
diff --git a/public/assets/my.js b/public/assets/my.js
index 58b604e..e88bd5c 100644
--- a/public/assets/my.js
+++ b/public/assets/my.js
@@ -416,12 +416,21 @@
+ '
' + (c.status === 'out' ? 'budget spent ' : c.status) + ' '
+ '' + (c.status === 'active' ? 'Pause '
: c.status === 'paused' ? 'Resume ' : '')
+ + ' Buy more views '
+ ' ').join('') + '';
el.appendChild(tbl);
el.querySelectorAll('button[data-camp]').forEach(b => b.addEventListener('click', async () => {
try { await api('/api/my/campaigns/' + b.dataset.camp + '/' + b.dataset.act); await loadCampaigns(); }
catch (e) { IAP.status(e.message, 'bad'); }
}));
+ el.querySelectorAll('button[data-topup]').forEach(b => b.addEventListener('click', async () => {
+ const n = prompt('How many credits to add to this campaign? (buys more views)');
+ if (!n) return;
+ try { const r = await api('/api/my/campaigns/' + b.dataset.topup + '/topup', { credits: Number(n) });
+ IAP.status('Added ' + r.added + ' credits' + (r.reactivated ? ' — campaign is live again.' : '.'), 'ok');
+ await loadCampaigns(); loadDashboard();
+ } catch (e) { IAP.status(e.message, 'bad'); }
+ }));
} catch (e) {}
}
let lastRates = null;
diff --git a/public/contract.html b/public/contract.html
index 409f488..d721155 100644
--- a/public/contract.html
+++ b/public/contract.html
@@ -5,7 +5,7 @@
The contract | InstantAdPay
-
+
@@ -129,8 +129,8 @@
Advertising services with a performance referral program. Not an investment product; no income guarantees. Crypto transactions are irreversible. Never spend what you cannot afford.
-
-
-
+
+
+