Skip to content

Commit 2f01588

Browse files
committed
update
1 parent a70d33c commit 2f01588

File tree

2 files changed

+303
-5
lines changed

2 files changed

+303
-5
lines changed

scripts/backup/openfbchat.js

Lines changed: 302 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,302 @@
1+
require("MWChatStateActions.bs").openTab(
2+
Date.now(),
3+
{ shouldFocus: true },
4+
{
5+
_0: {
6+
clientThreadKey: void 0,
7+
threadKey: require("bs_caml_format").caml_int64_of_string(a),
8+
threadType: require("MessagingThreadType.bs").oneToOne,
9+
},
10+
TAG: 1,
11+
}
12+
);
13+
14+
__d(
15+
"PagesCometMessageButton.react",
16+
[
17+
"fbt",
18+
"ix",
19+
"CometRelay",
20+
"CometTrackingNodeProvider.react",
21+
"PagesCometMessageButton_page.graphql",
22+
"TetraButton.react",
23+
"fbicon",
24+
"react",
25+
"usePagesCometMessage",
26+
],
27+
function (a, b, c, d, e, f, g, h, i) {
28+
"use strict";
29+
var j,
30+
k = d("react");
31+
function a(a) {
32+
var e = a.disabled;
33+
e = e === void 0 ? !1 : e;
34+
var f = a.hideLabel;
35+
f = f === void 0 ? !0 : f;
36+
var g = a.location,
37+
l = a.logAction,
38+
m = a.messengerLsEntryPoint;
39+
a = a.page$key;
40+
a = d("CometRelay").useFragment(
41+
j !== void 0 ? j : (j = b("PagesCometMessageButton_page.graphql")),
42+
a
43+
);
44+
a = d("usePagesCometMessage").usePagesCometMessage(a, g, m, l);
45+
g = a[0];
46+
m = a[1];
47+
return g
48+
? k.jsx(c("CometTrackingNodeProvider.react"), {
49+
trackingNode: 199,
50+
children: k.jsx(
51+
"div",
52+
{
53+
className: "x6s0dn4 x78zum5 x1i64zmx",
54+
"data-testid": void 0,
55+
children: k.jsx(
56+
c("TetraButton.react"),
57+
{
58+
disabled: e,
59+
icon: d("fbicon")._(i("505616"), 16),
60+
label: h._("__JHASH__4qQOXx0pgR3__JHASH__"),
61+
labelIsHidden: f,
62+
onPress: m,
63+
size: "medium",
64+
type: "secondary",
65+
},
66+
"message"
67+
),
68+
},
69+
"message"
70+
),
71+
})
72+
: null;
73+
}
74+
a.displayName = a.name + " [from " + f.id + "]";
75+
g["default"] = a;
76+
},
77+
98
78+
);
79+
80+
__d(
81+
"usePagesCometMessage",
82+
[
83+
"CometRelay",
84+
"PagesLogger",
85+
"PagesLoggerEventEnum",
86+
"PagesPageMessageClickFalcoEvent",
87+
"react",
88+
"useMWChatOpenTabForPage",
89+
"usePagesCometMessage_page.graphql",
90+
],
91+
function (a, b, c, d, e, f, g) {
92+
"use strict";
93+
var h,
94+
i = d("react").useCallback;
95+
function a(a, e, f, g) {
96+
a = d("CometRelay").useFragment(
97+
h !== void 0 ? h : (h = b("usePagesCometMessage_page.graphql")),
98+
a
99+
);
100+
var j =
101+
(a == null ? void 0 : a.can_viewer_message) === !0 &&
102+
(a == null ? void 0 : a.should_hide_page_messaging_entrypoint) === !1,
103+
k = c("useMWChatOpenTabForPage")(f),
104+
l = a == null ? void 0 : a.id;
105+
f = i(
106+
function () {
107+
l != null &&
108+
j === !0 &&
109+
(k(l),
110+
g && g(e),
111+
c("PagesPageMessageClickFalcoEvent").log(function () {
112+
return { event_data: {}, event_location: e, page_id: l };
113+
}),
114+
d("PagesLogger").log(
115+
l,
116+
c("PagesLoggerEventEnum").CLICK,
117+
"page_message",
118+
e,
119+
["page_consumer_experience"],
120+
{}
121+
));
122+
},
123+
[j, e, k, l, g]
124+
);
125+
return [j, f];
126+
}
127+
g.usePagesCometMessage = a;
128+
},
129+
98
130+
);
131+
132+
__d(
133+
"useMWChatOpenTabForPage",
134+
["MWChatOpenTabForPage.bs", "react"],
135+
function (a, b, c, d, e, f, g) {
136+
"use strict";
137+
var h = d("react").useMemo;
138+
function a(a, b) {
139+
var c = {};
140+
b != null && (c.preventAutofocus = b.preventAutofocus_DO_NOT_USE);
141+
var e = d("MWChatOpenTabForPage.bs").useHook(c.preventAutofocus, a);
142+
return h(
143+
function () {
144+
return function (a, b) {
145+
return e(a, (a = b) != null ? a : !1);
146+
};
147+
},
148+
[e]
149+
);
150+
}
151+
g["default"] = a;
152+
},
153+
98
154+
);
155+
__d(
156+
"ProfileCometActionTrigger.react",
157+
[
158+
"CometRelay",
159+
"ProfileCometActionTrigger_action.graphql",
160+
"ProfileCometContext",
161+
"react",
162+
],
163+
function (a, b, c, d, e, f, g) {
164+
"use strict";
165+
var h,
166+
i = d("react"),
167+
j = d("react").useContext;
168+
function a(a) {
169+
var e = a.action,
170+
f = a.children,
171+
g = a.onClose,
172+
k = a.popoverPosition,
173+
l = a.pushPage;
174+
a = a.source;
175+
e = d("CometRelay").useFragment(
176+
h !== void 0 ? h : (h = b("ProfileCometActionTrigger_action.graphql")),
177+
e
178+
);
179+
var m = j(c("ProfileCometContext"));
180+
m = m.isInViewAs;
181+
return m
182+
? f({ disabled: !0 })
183+
: i.jsx(d("CometRelay").MatchContainer, {
184+
fallback: f({ disabled: !0 }),
185+
match: e.client_handler,
186+
props: {
187+
children: f,
188+
onClose: g,
189+
popoverPosition: k,
190+
pushPage: l,
191+
source: a,
192+
},
193+
});
194+
}
195+
a.displayName = a.name + " [from " + f.id + "]";
196+
g["default"] = a;
197+
},
198+
98
199+
);
200+
201+
__d(
202+
"MWChatOpenTabForPage.bs",
203+
[
204+
"LSThreadAttributionStore.bs",
205+
"MWChatInteraction.bs",
206+
"MWChatStateActions.bs",
207+
"MWChatStateV2.bs",
208+
"MessagingThreadType.bs",
209+
"bs_caml_format",
210+
"bs_curry",
211+
"react",
212+
"recoverableViolation",
213+
"requireDeferred",
214+
"useCometFeedNoRoutingNavigationEventLogger",
215+
"useMWChatOpenTabTraceProvider",
216+
],
217+
function (a, b, c, d, e, f, g) {
218+
"use strict";
219+
var h = d("react"),
220+
i = c("requireDeferred")("MWChatLogOpenChatTab.bs").__setRef(
221+
"MWChatOpenTabForPage.bs"
222+
);
223+
function a(a, b) {
224+
var e = a !== void 0 ? a : !1,
225+
f = c("useMWChatOpenTabTraceProvider")(),
226+
g = c("useCometFeedNoRoutingNavigationEventLogger")(),
227+
j = d("MWChatStateV2.bs").useDispatch();
228+
return h.useMemo(
229+
function () {
230+
return function (a, h) {
231+
g(Date.now(), "", "messenger");
232+
d("LSThreadAttributionStore.bs").setSource(a, b);
233+
i.onReady(function (d) {
234+
return c("bs_curry")._4(d.logOpenPageTab, void 0, a, b);
235+
});
236+
return f(
237+
function (b) {
238+
d("MWChatInteraction.bs").set(a, b);
239+
if (h) {
240+
c("recoverableViolation")(
241+
"Opening secure converstions with pages not supported",
242+
"messenger_web_product"
243+
);
244+
return;
245+
} else
246+
return c("bs_curry")._1(
247+
j,
248+
// here
249+
d("MWChatStateActions.bs").openTab(
250+
Date.now(),
251+
{ shouldFocus: !e },
252+
{
253+
_0: {
254+
clientThreadKey: void 0,
255+
threadKey:
256+
c("bs_caml_format").caml_int64_of_string(a),
257+
threadType: d("MessagingThreadType.bs").oneToOne,
258+
},
259+
TAG: 1,
260+
}
261+
)
262+
);
263+
},
264+
"page",
265+
b,
266+
a
267+
);
268+
};
269+
},
270+
[g, f, e, b]
271+
);
272+
}
273+
g.$MWChatLogOpenChatTab$Deferred = i;
274+
g.useHook = a;
275+
},
276+
98
277+
);
278+
279+
__d(
280+
"PagesCometMessageButton_page.graphql",
281+
[],
282+
function (a, b, c, d, e, f) {
283+
"use strict";
284+
a = {
285+
argumentDefinitions: [],
286+
kind: "Fragment",
287+
metadata: null,
288+
name: "PagesCometMessageButton_page",
289+
selections: [
290+
{
291+
args: null,
292+
kind: "FragmentSpread",
293+
name: "usePagesCometMessage_page",
294+
},
295+
],
296+
type: "Page",
297+
abstractKey: null,
298+
};
299+
e.exports = a;
300+
},
301+
null
302+
);

scripts/fb_toggleLight.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ export default {
1010
},
1111
whiteList: ["https://www.facebook.com/*"],
1212

13-
onDocumentStart: () => {
14-
15-
},
16-
17-
onDocumentEnd: () => {
13+
onDocumentIdle: () => {
1814
[
1915
document.querySelectorAll('[role="navigation"]')?.[2],
2016
document.querySelectorAll('[role="complementary"]')?.[0],

0 commit comments

Comments
 (0)