forked from insin/control-panel-for-twitter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.d.ts
126 lines (117 loc) · 3.4 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
export type AlgorithmicTweetsConfig = 'hide' | 'ignore'
export type Config = {
debug: boolean
version?: 'desktop' | 'mobile'
// Shared
addAddMutedWordMenuItem: boolean
// XXX This is now more like "prefer chronological timeline by default"
alwaysUseLatestTweets: boolean
communityTweets: AlgorithmicTweetsConfig
dontUseChirpFont: boolean
dropdownMenuFontWeight: boolean
fastBlock: boolean
followButtonStyle: 'monochrome' | 'themed'
followeesFollows: AlgorithmicTweetsConfig
hideAnalyticsNav: boolean
hideBookmarksNav: boolean
hideCommunitiesNav: boolean
hideFollowingMetrics: boolean
hideForYouTimeline: boolean
hideHelpCenterNav: boolean
hideKeyboardShortcutsNav: boolean
hideLikeMetrics: boolean
hideListsNav: boolean
hideMetrics: boolean
hideMomentsNav: boolean
hideMonetizationNav: boolean
hideMoreTweets: boolean
hideNewslettersNav: boolean
hideQuoteTweetMetrics: boolean
hideReplyMetrics: boolean
hideRetweetMetrics: boolean
hideShareTweetButton: boolean
hideTopicsNav: boolean
hideTotalTweetsMetrics: boolean
hideTweetAnalyticsLinks: boolean
hideTwitterAdsNav: boolean
hideTwitterBlueNav: boolean
hideTwitterCircleNav: boolean
hideTwitterForProfessionalsNav: boolean
hideUnavailableQuoteTweets: boolean
hideVerifiedNotificationsTab: boolean
hideViews: boolean
hideWhoToFollowEtc: boolean
likedTweets: AlgorithmicTweetsConfig
mutableQuoteTweets: boolean
mutedQuotes: QuotedTweet[]
quoteTweets: SharedTweetsConfig
repliedToTweets: AlgorithmicTweetsConfig
retweets: SharedTweetsConfig
suggestedTopicTweets: AlgorithmicTweetsConfig
tweakQuoteTweetsPage: boolean
twitterBlueChecks: 'ignore' | 'replace' | 'hide'
uninvertFollowButtons: boolean
// Experiments
disableHomeTimeline: boolean
disabledHomeTimelineRedirect: 'notifications' | 'messages'
fullWidthContent: boolean
fullWidthMedia: boolean
reducedInteractionMode: boolean
verifiedAccounts: VerifiedAccountsConfig
// Desktop only
hideAccountSwitcher: boolean
hideExploreNav: boolean
hideMessagesDrawer: boolean
hideSidebarContent: boolean
navBaseFontSize: boolean
showRelevantPeople: boolean
// Mobile only
hideAppNags: boolean
hideExplorePageContents: boolean
hideMessagesBottomNavItem: boolean
}
export type Locale = {
[key in LocaleKey]?: string
}
export type LocaleKey =
| 'ADD_MUTED_WORD'
| 'DISCOVER_MORE'
| 'FOLLOWING'
| 'HOME'
| 'MUTE_THIS_CONVERSATION'
| 'QUOTE_TWEET'
| 'QUOTE_TWEETS'
| 'RETWEETS'
| 'SHARED_TWEETS'
| 'TWITTER'
export type NamedMutationObserver = MutationObserver & {name?: string}
export type QuotedTweet = {
user: string
time: string
text: string
}
export type SharedTweetsConfig = 'separate' | 'hide' | 'ignore'
export type TimelineItemType =
| 'COMMUNITY_TWEET'
| 'DISCOVER_MORE_HEADING'
| 'FOLLOWEES_FOLLOWS'
| 'HEADING'
| 'LIKED'
| 'PROMOTED_TWEET'
| 'QUOTE_TWEET'
| 'REPLIED'
| 'RETWEET'
| 'RETWEETED_QUOTE_TWEET'
| 'SUGGESTED_TOPIC_TWEET'
| 'TWEET'
| 'UNAVAILABLE'
| 'UNAVAILABLE_QUOTE_TWEET'
| 'UNAVAILABLE_RETWEET'
export type TimelineOptions = {
classifyTweets?: boolean
hideHeadings?: boolean
isTabbed?: boolean
onTabChange?: () => void
tabbedTimelineContainerSelector?: string
}
export type VerifiedAccountsConfig = 'highlight' | 'hide' | 'ignore'