Offer the revision when the script is over its running time

Revising was reachable only after readers had reviewed it or the author had
left a note. Being ninety seconds over budget is a reason to revise on its
own, and the button now says how much it will cut.
This commit is contained in:
gator 2026-09-17 12:18:09 +00:00
parent d94390d135
commit 170895644d

View file

@ -317,8 +317,14 @@
if (RUN.stage === "revising")
out.push('<button type="button" class="btn" disabled>Rewriting…</button>');
else if (REVIEWS.length || Object.keys(NOTES).length)
out.push('<button type="button" class="btn" data-revise="1">Revise the whole script</button>');
else {
var over = (PKG.timing && Number(PKG.timing.over_by)) || 0;
if (REVIEWS.length || Object.keys(NOTES).length || over > 5)
out.push('<button type="button" class="btn' + (over > 5 ? ' primary' : '')
+ '" data-revise="1">'
+ (over > 5 ? 'Cut ' + Math.round(over) + ' seconds and revise'
: 'Revise the whole script') + '</button>');
}
if (unfilmed && !undrawn)
out.push('<button type="button" class="btn primary" data-film="' + esc(meta.id)