Remove duplicates in the web interface
The settings page has one Save button helper. The story list sorts by the sort key that the server sends, so the rule for a leading article exists once. The story page takes its list of download modes from the mode hints.
This commit is contained in:
@@ -16,8 +16,11 @@ const { storiesPage } = await import('../../bindery/static/js/stories.js');
|
||||
const { refreshJobs, startPolling, stopPolling } = await import('../../bindery/static/js/jobs.js');
|
||||
const { fmtDate } = await import('../../bindery/static/js/lib.js');
|
||||
|
||||
// The server gives each story its sort key: the title in lower case, without a leading article.
|
||||
const story = (id, title, changes = {}) => ({
|
||||
id, title, url: `https://example.com/${id}`, author: 'Reader', site: 'example.com',
|
||||
id, title, url: `https://example.com/${id}`,
|
||||
sort_title: (title || `https://example.com/${id}`).trim().replace(/^(?:the|an?)\s+/i, '').toLowerCase(),
|
||||
author: 'Reader', site: 'example.com',
|
||||
chapter_count: 42, offsite_count: 0, revised_count: 0, status: 'ok', message: 'No changes',
|
||||
last_changed: null, last_checked: null, ...changes,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user