X's web chat shows a link as a bare card. An X tab on a chat page may now ask native code (link_preview, x-capture only, chat pages only) for one link's preview. Native code fetches it: https and public hosts only (addresses checked and pinned), never X's hosts, no cookies or referrer, redirects re-checked, page head <= 512 KB, images <= 1.5 MB by magic bytes as data:, 30 fetches a minute, memory-only cache. Only the link leaves the page. On by default (owner, 2026-10-10).
122 lines
4 KiB
Rust
122 lines
4 KiB
Rust
//! Generated from `apps/desktop/src/areas/table.ts` by `scripts/build-areas.ts`. Do not edit:
|
|
//! change the table and run the script (tests/areas.test.ts compares them).
|
|
//!
|
|
//! What native code needs of the feature table: the bundled plugin files that became features of
|
|
//! an area plugin ([`SUPERSEDED`]: the one-time migration and the backup import turn their
|
|
//! enabled state into the flag), and every flag the table defines ([`FLAGS`]).
|
|
|
|
use waybetter_host::plugins::migrate::Superseded;
|
|
|
|
/// Old first-party plugin files and the feature flag that replaced each.
|
|
pub const SUPERSEDED: &[Superseded] = &[
|
|
Superseded { file: "bt-alt-text-reminder.plugin.js", flag: "compose.altTextReminder" },
|
|
Superseded { file: "bt-reply-guard.plugin.js", flag: "compose.replyGuard" },
|
|
Superseded { file: "bt-clean-links.plugin.js", flag: "reader.cleanLinks" },
|
|
Superseded { file: "bt-copy-as-markdown.plugin.js", flag: "reader.copyAsMarkdown" },
|
|
Superseded { file: "bt-exact-timestamps.plugin.js", flag: "reader.exactTimestamps" },
|
|
Superseded { file: "bt-hide-blue-checks.plugin.js", flag: "reader.collapseVerified" },
|
|
Superseded { file: "bt-muted-regex.plugin.js", flag: "reader.mutedRegex" },
|
|
Superseded { file: "bt-reading-time.plugin.js", flag: "reader.readingTime" },
|
|
Superseded { file: "bt-thread-reader.plugin.js", flag: "reader.threadReader" },
|
|
Superseded { file: "bt-user-notes.plugin.js", flag: "profile.userNotes" },
|
|
Superseded { file: "bt-media-grid-focus.plugin.js", flag: "media.gridFocus" },
|
|
Superseded { file: "bt-focus-mode.plugin.js", flag: "navigation.focusMode" },
|
|
Superseded { file: "bt-keyboard-plus.plugin.js", flag: "navigation.keyboardPlus" },
|
|
];
|
|
|
|
/// Every flag of the table: the features and each area's switch (`area.<id>`).
|
|
pub const FLAGS: &[&str] = &[
|
|
"logoBrush",
|
|
"replaceLogo",
|
|
"twitterWording",
|
|
"singleSplitNav",
|
|
"fixLikeFollow",
|
|
"fixScrollRestore",
|
|
"fixTimelineJump",
|
|
"fixHomeTab",
|
|
"fixNotificationBadge",
|
|
"fixNewPostsPill",
|
|
"fixMediaUpload",
|
|
"followingChronological",
|
|
"fixChatButton",
|
|
"composerRestorePrompt",
|
|
"composerDrafts",
|
|
"compose.altTextReminder",
|
|
"compose.replyGuard",
|
|
"compose.postingAs",
|
|
"compose.lengthMeter",
|
|
"compose.snippets",
|
|
"hidePromotedPosts",
|
|
"followingTimelineDefault",
|
|
"hideForYouTab",
|
|
"reader.readMarker",
|
|
"reader.languageFilter",
|
|
"hideGrok",
|
|
"hideViewCounts",
|
|
"hideEngagementCounts",
|
|
"hideBookmarkButton",
|
|
"disableTweetTextFormatting",
|
|
"sortRepliesRecent",
|
|
"fullNumbers",
|
|
"hideVerifiedBadges",
|
|
"reader.cleanLinks",
|
|
"reader.copyAsMarkdown",
|
|
"reader.exactTimestamps",
|
|
"reader.collapseVerified",
|
|
"reader.mutedRegex",
|
|
"reader.quickMute",
|
|
"reader.readingTime",
|
|
"reader.threadReader",
|
|
"hideProfileWhoToFollow",
|
|
"hideSubscribeButtons",
|
|
"profile.userNotes",
|
|
"profile.privateLabels",
|
|
"profile.accountAge",
|
|
"profile.hoverPeek",
|
|
"chat.bookmarks",
|
|
"chat.searchLoaded",
|
|
"chat.pins",
|
|
"chat.personFilter",
|
|
"chat.linkPreviews",
|
|
"chat.keywords",
|
|
"mediaDownload",
|
|
"rememberVideoVolume",
|
|
"disableVideoAutoplay",
|
|
"stopVideoLoop",
|
|
"media.videoSpeed",
|
|
"media.pictureInPicture",
|
|
"media.gridFocus",
|
|
"media.altText",
|
|
"media.blurMedia",
|
|
"searchOperators",
|
|
"hideExploreContent",
|
|
"search.savedSearches",
|
|
"search.advancedSearch",
|
|
"search.latestDefault",
|
|
"notifications.keywordAlerts",
|
|
"notifications.kindFilters",
|
|
"notifications.keywordHighlight",
|
|
"notifications.openMentions",
|
|
"hidePremiumNav",
|
|
"hideChatNav",
|
|
"hideCommunitiesNav",
|
|
"hideGrokNav",
|
|
"hideSidebarTrends",
|
|
"hideWhoToFollow",
|
|
"hideLiveOnX",
|
|
"hideTodaysNews",
|
|
"hidePremiumUpsells",
|
|
"hideRelevantPeople",
|
|
"hideSidebar",
|
|
"fullWidthTimeline",
|
|
"navigation.focusMode",
|
|
"navigation.keyboardPlus",
|
|
"area.compose",
|
|
"area.reader",
|
|
"area.profile",
|
|
"area.chat",
|
|
"area.media",
|
|
"area.search",
|
|
"area.notifications",
|
|
"area.navigation",
|
|
];
|