-
-
Notifications
You must be signed in to change notification settings - Fork 63
/
types.d.ts
189 lines (176 loc) · 4.88 KB
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
export type Config = {
debug: boolean
version?: 'desktop' | 'mobile'
// Shared
addAddMutedWordMenuItem: boolean
// XXX This is now more like "use the Following tab by default"
alwaysUseLatestTweets: boolean
defaultToLatestSearch: boolean
disableHomeTimeline: boolean
disabledHomeTimelineRedirect: 'notifications' | 'messages'
disableTweetTextFormatting: boolean
dontUseChirpFont: boolean
dropdownMenuFontWeight: boolean
fastBlock: boolean
followButtonStyle: 'monochrome' | 'themed'
hideAdsNav: boolean
hideBlueReplyFollowedBy: boolean
hideBlueReplyFollowing: boolean
hideBookmarkButton: boolean
hideBookmarkMetrics: boolean
hideBookmarksNav: boolean
hideCommunitiesNav: boolean
hideExplorePageContents: boolean
hideFollowingMetrics: boolean
hideForYouTimeline: boolean
hideGrokNav: boolean
hideInlinePrompts: boolean
hideJobsNav: boolean
hideLikeMetrics: boolean
hideListsNav: boolean
hideMetrics: boolean
hideMonetizationNav: boolean
hideMoreTweets: boolean
hideProfileRetweets: boolean
hideQuoteTweetMetrics: boolean
hideQuotesFrom: string[]
hideReplyMetrics: boolean
hideRetweetMetrics: boolean
hideSeeNewTweets: boolean
hideShareTweetButton: boolean
hideSpacesNav: boolean
hideSubscriptions: boolean
hideTimelineTweetBox: boolean
hideTotalTweetsMetrics: boolean
hideTweetAnalyticsLinks: boolean
hideTwitterBlueReplies: boolean
hideTwitterBlueUpsells: boolean
hideUnavailableQuoteTweets: boolean
// XXX This now also controls hiding Verified Followers
hideVerifiedNotificationsTab: boolean
hideViews: boolean
hideWhoToFollowEtc: boolean
listRetweets: 'ignore' | 'hide'
mutableQuoteTweets: boolean
mutedQuotes: QuotedTweet[]
quoteTweets: SharedTweetsConfig
reducedInteractionMode: boolean
// XXX This now controls all replacement of X brand changes
replaceLogo: boolean
restoreLinkHeadlines: boolean
restoreQuoteTweetsLink: boolean
restoreOtherInteractionLinks: boolean
retweets: SharedTweetsConfig
showBlueReplyFollowersCountAmount: string
showBlueReplyFollowersCount: boolean
showBlueReplyVerifiedAccounts: boolean
showBookmarkButtonUnderFocusedTweets: boolean
sortReplies: 'relevant' | 'recent' | 'liked'
tweakQuoteTweetsPage: boolean
twitterBlueChecks: 'ignore' | 'replace' | 'hide'
unblurSensitiveContent: boolean
uninvertFollowButtons: boolean
// Experiments
// none currently
// Desktop only
fullWidthContent: boolean
fullWidthMedia: boolean
hideAccountSwitcher: boolean
hideExploreNav: boolean
hideExploreNavWithSidebar: boolean
hideMessagesDrawer: boolean
hideProNav: boolean
hideSidebarContent: boolean
navBaseFontSize: boolean
navDensity: 'default' | 'comfortable' | 'compact'
showRelevantPeople: boolean
// Mobile only
hideMessagesBottomNavItem: boolean
}
export type Locale = {
[key in LocaleKey]?: string
}
export type LocaleKey =
| 'ADD_MUTED_WORD'
| 'HOME'
| 'LIKES'
| 'MOST_RELEVANT'
| 'MUTE_THIS_CONVERSATION'
| 'POST_ALL'
| 'POST_UNAVAILABLE'
| 'QUOTE'
| 'QUOTES'
| 'QUOTE_TWEET'
| 'QUOTE_TWEETS'
| 'REPOST'
| 'REPOSTS'
| 'RETWEET'
| 'RETWEETED_BY'
| 'RETWEETS'
| 'SHARED'
| 'SHARED_TWEETS'
| 'SHOW'
| 'SHOW_MORE_REPLIES'
| 'SORT_REPLIES'
| 'TURN_OFF_QUOTE_TWEETS'
| 'TURN_OFF_RETWEETS'
| 'TURN_ON_RETWEETS'
| 'TWEET'
| 'TWEETS'
| 'TWEET_ALL'
| 'TWEET_INTERACTIONS'
| 'TWEET_YOUR_REPLY'
| 'TWITTER'
| 'UNDO_RETWEET'
| 'VIEW'
export type NamedMutationObserver = MutationObserver & {name?: string}
export type Disconnectable = NamedMutationObserver|{disconnect(): void}
export type QuotedTweet = {
quotedBy: string
user: string
time: string
text?: string
}
export type SharedTweetsConfig = 'separate' | 'hide' | 'ignore'
export type TweetType =
| 'PINNED_TWEET'
| 'PROMOTED_TWEET'
| 'QUOTE_TWEET'
| 'RETWEET'
| 'RETWEETED_QUOTE_TWEET'
| 'TWEET'
| 'UNAVAILABLE'
| 'UNAVAILABLE_QUOTE_TWEET'
| 'UNAVAILABLE_RETWEET'
export type TimelineItemType =
| TweetType
| 'BLUE_REPLY'
| 'VERIFIED_ORG_REPLY'
| 'DISCOVER_MORE_HEADING'
| 'DISCOVER_MORE_TWEET'
| 'FOCUSED_TWEET'
| 'HEADING'
| 'INLINE_PROMPT'
| 'SHOW_MORE'
| 'SUBSEQUENT_ITEM'
| 'UNAVAILABLE'
export type TimelineOptions = {
classifyTweets?: boolean
hideHeadings?: boolean
isTabbed?: boolean
isUserTimeline?: boolean
onTabChanged?: () => void
onTimelineAppeared?: () => void
tabbedTimelineContainerSelector?: string
timelineSelector?: string
}
export type IndividualTweetTimelineOptions = {
observers: Disconnectable[]
}
export type UserInfo = {
following: boolean
followedBy: boolean
followersCount: number
}
export type UserInfoObject = {[index: string]: UserInfo}
export type VerifiedType = 'BLUE' | 'VERIFIED_ORG'