Drip Runner refuels get their own daily allowance (refuelCapPerDay 20): visit_seen.kind earn|refuel, each kind capped separately, once-per-page-per-person still spans both; clearer refuel cap / no-packs copy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -159,7 +159,8 @@ async function bootstrap() {
|
||||
await alterSafe0('ALTER TABLE promo_redemptions ADD COLUMN paid INT NOT NULL DEFAULT 0'); // credits paid so far (the drip)
|
||||
await alterSafe0('ALTER TABLE promo_redemptions ADD COLUMN last_day CHAR(10) NULL'); // Central day of the last installment
|
||||
await alterSafe0('ALTER TABLE promo_redemptions ADD COLUMN expires BIGINT NOT NULL DEFAULT 0'); // unclaimed installments stop here; 0 = pre-drip row
|
||||
await alterSafe0('ALTER TABLE promo_redemptions ADD COLUMN ref VARCHAR(80) NULL'); // site the ?promo= link was opened from
|
||||
await alterSafe0('ALTER TABLE promo_redemptions ADD COLUMN ref VARCHAR(80) NULL');
|
||||
await alterSafe0("ALTER TABLE visit_seen ADD COLUMN kind VARCHAR(8) NOT NULL DEFAULT 'earn'"); // 'refuel' = a Drip Runner refuel (own daily cap, 2026-09-30) // site the ?promo= link was opened from
|
||||
await q('UPDATE promo_redemptions SET paid=credits WHERE expires=0 AND paid<credits'); // pre-drip redemptions were paid in full at once
|
||||
await q(`CREATE TABLE IF NOT EXISTS page_hits (
|
||||
day CHAR(10) NOT NULL, host VARCHAR(80) NOT NULL, path VARCHAR(40) NOT NULL, n INT NOT NULL DEFAULT 0,
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
api('/api/refuel/open?t=' + encodeURIComponent(tok)).then(function (r) {
|
||||
if (r.error) return msg('Refuel link problem', esc(r.error));
|
||||
if (r.done) { location.href = r.ret; return; }
|
||||
if (r.none) return msg('No sponsor pages right now', r.why === 'cap' ? 'You have done today’s verified visits on InstantAdPay. Refuels reopen tomorrow.' : 'No verified-visit packs are running at the moment. Try again in a while.', r.ret + '&none=1');
|
||||
if (r.none) return msg(r.why === 'cap' ? 'That is today’s refuels' : 'No sponsor pages right now', r.why === 'cap' ? 'You have used today’s refuels. Your run and progress are saved, and refuels reopen at midnight Central. Your regular InstantAdPay visits are not affected.' : 'You have visited every sponsor page running right now, or none are running. Try again later: new packs start all the time.', r.ret + '&none=1');
|
||||
ret = r.ret; dwell = r.dwell || 8; left = Math.max(1, dwell - (r.elapsed || 0));
|
||||
$('rfTitle').textContent = r.title || 'Member site'; try { $('rfUrl').textContent = new URL(r.target).hostname; } catch (e) {}
|
||||
var f = document.createElement('iframe'); f.src = r.target; f.setAttribute('referrerpolicy', 'no-referrer'); f.setAttribute('sandbox', 'allow-scripts allow-same-origin allow-forms allow-popups'); $('rfFrame').innerHTML = ''; $('rfFrame').appendChild(f);
|
||||
|
||||
+1
-1
@@ -37,6 +37,6 @@ a.rf-open{color:#8FF0FF;font-size:12px}
|
||||
<button class="rf-btn" id="rfDone" type="button" disabled>Waiting…</button>
|
||||
<button class="rf-btn ghost" id="rfBack" type="button" hidden>Back to the game</button>
|
||||
</div>
|
||||
<script src="/assets/refuel.js?v=20260930b"></script>
|
||||
<script src="/assets/refuel.js?v=20260930c"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -2446,7 +2446,7 @@ const server = http.createServer(async (req, res) => {
|
||||
if (t && t.done) return json(res, 200, { done: true, ret: t.doneRet || t.ret });
|
||||
if (!t) {
|
||||
const email = String(c.email).toLowerCase();
|
||||
const status = await ads.visitStatus(email);
|
||||
const status = await ads.visitStatus(email, 'refuel'); // refuels have their own daily allowance
|
||||
if (status.count >= status.cap) return json(res, 200, { none: true, why: 'cap', ret: c.ret });
|
||||
const ad = await ads.serveVisit(email, viewerGeo(req));
|
||||
if (!ad) return json(res, 200, { none: true, why: 'empty', ret: c.ret });
|
||||
|
||||
Reference in New Issue
Block a user