From cb5f9e5e74058701478709f3891972b0abf58712 Mon Sep 17 00:00:00 2001 From: Wolf Date: Wed, 30 Sep 2026 13:26:20 +0200 Subject: [PATCH] Open the posting_url over the original_url in the reader, its Also posted list and the o key Co-Authored-By: Claude Opus 5.5 --- app/static/roles.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/app/static/roles.js b/app/static/roles.js index 7814ac4..8c597a5 100644 --- a/app/static/roles.js +++ b/app/static/roles.js @@ -903,16 +903,23 @@ return n > 1 ? `×${n}` : ""; } + /* Where a role's posting is: the ad's own page once it is known + (`posting_url`, found for a Jobindex role when its text is fetched), else + the link the board listed. Either way only an http(s) link. */ + function linkOf(x) { + return safeUrl(x?.posting_url) || safeUrl(x?.original_url); + } + /* The other postings of this role, each a link to where it is posted, labelled by host and place, as newsdesk's "Also covered by". */ function alsoPosted(r) { const copies = (Array.isArray(r.copies) ? r.copies : []) - .filter((c) => safeUrl(c.original_url)); + .filter((c) => linkOf(c)); if (!copies.length) return ""; return `