wayBetter for X

This commit is contained in:
CRTkafa 2026-10-01 06:01:13 +07:00
commit df5dff619e
720 changed files with 147465 additions and 0 deletions

View file

@ -0,0 +1,45 @@
// 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<PluginApi> => ({ id, start(ctx) { ctx.css(READER_CSS[id]()); } });
export const MODULES: ReadonlyArray<FeatureModule<PluginApi>> = [
...(['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,
];