// Reader+: timelines, posts and threads. One module per `backing: 'module'` row of ./features.ts // (docs/AREA-PLUGINS.md; Navigation+ in ../navigation is the reference); the registry starts each // only while its flag is on, the area is on and the page is on one of its surfaces, and each leaves // nothing behind when it stops. import type { FeatureModule } from '../../../../../waybetter/packages/runtime/src/featureModules.ts'; import type { PluginApi } from '../../inject/pluginApi.ts'; import { cleanLinks } from './cleanLinks.ts'; import { collapseVerified } from './collapseVerified.ts'; import { copyAsMarkdown } from './copyAsMarkdown.ts'; import { READER_CSS, type ReaderCssFlag } from './css.ts'; import { exactTimestamps } from './exactTimestamps.ts'; import { followingTimelineDefault } from './followingTimelineDefault.ts'; import { fullNumbers } from './fullNumbers.ts'; import { hideBookmarkButton } from './hideBookmarkButton.ts'; import { hideViewCounts } from './hideViewCounts.ts'; import { languageFilter } from './languageFilter.ts'; import { mutedRegex } from './mutedRegex.ts'; import { quickMute } from './quickMute.ts'; import { readMarker } from './readMarker.ts'; import { readingTime } from './readingTime.ts'; import { sortRepliesRecent } from './sortRepliesRecent.ts'; import { threadReader } from './threadReader.ts'; /** A hide feature that is only its rule: one stylesheet while it is on. */ const cssFeature = (id: ReaderCssFlag): FeatureModule => ({ id, start(ctx) { ctx.css(READER_CSS[id]()); } }); export const MODULES: ReadonlyArray> = [ ...(['hidePromotedPosts', 'hideForYouTab', 'hideGrok', 'hideEngagementCounts', 'hideVerifiedBadges', 'disableTweetTextFormatting'] as const).map(cssFeature), hideViewCounts, hideBookmarkButton, followingTimelineDefault, sortRepliesRecent, fullNumbers, cleanLinks, copyAsMarkdown, exactTimestamps, collapseVerified, mutedRegex, quickMute, readingTime, threadReader, readMarker, languageFilter, ];