mirror of
https://github.com/snachodog/tok-to-insta-follower-bridge.git
synced 2025-04-23 20:12:22 -06:00
fix: format
This commit is contained in:
parent
8d54bf7159
commit
60a885e31d
@ -27,7 +27,9 @@ export const getAccountNameAndDisplayName = (userCell: Element) => {
|
|||||||
const twDisplayName = displayNameEl?.textContent;
|
const twDisplayName = displayNameEl?.textContent;
|
||||||
const bskyHandle =
|
const bskyHandle =
|
||||||
userCell.textContent?.match(/([^/\s]+\.bsky\.social)/)?.[1] ??
|
userCell.textContent?.match(/([^/\s]+\.bsky\.social)/)?.[1] ??
|
||||||
userCell.textContent?.match(/bsky\.app\/profile\/([^/\s]+)…?/)?.[1] ??
|
userCell.textContent
|
||||||
|
?.match(/bsky\.app\/profile\/([^/\s]+)…?/)?.[1]
|
||||||
|
?.replace("…", "") ??
|
||||||
null;
|
null;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -113,7 +113,9 @@ export const useRetrieveBskyUsers = () => {
|
|||||||
|
|
||||||
if (messageName === "search_bsky_user_on_list_members_page") {
|
if (messageName === "search_bsky_user_on_list_members_page") {
|
||||||
// select the modal wrapper using viewport selector to avoid conflation with feed in the background
|
// select the modal wrapper using viewport selector to avoid conflation with feed in the background
|
||||||
scrollElement = document.querySelector('div[data-viewportview="true"]') as HTMLElement;
|
scrollElement = document.querySelector(
|
||||||
|
'div[data-viewportview="true"]',
|
||||||
|
) as HTMLElement;
|
||||||
// base interval off of intitial scroll height
|
// base interval off of intitial scroll height
|
||||||
modalScrollInterval = scrollElement.scrollHeight;
|
modalScrollInterval = scrollElement.scrollHeight;
|
||||||
} else {
|
} else {
|
||||||
@ -147,13 +149,19 @@ export const useRetrieveBskyUsers = () => {
|
|||||||
|
|
||||||
// break if bottom is reached
|
// break if bottom is reached
|
||||||
if (scrollElement instanceof HTMLElement) {
|
if (scrollElement instanceof HTMLElement) {
|
||||||
if (scrollElement.scrollTop + scrollElement.clientHeight >= scrollElement.scrollHeight) {
|
if (
|
||||||
|
scrollElement.scrollTop + scrollElement.clientHeight >=
|
||||||
|
scrollElement.scrollHeight
|
||||||
|
) {
|
||||||
setIsBottomReached(true);
|
setIsBottomReached(true);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const documentElement = document.documentElement;
|
const documentElement = document.documentElement;
|
||||||
if (documentElement.scrollTop + documentElement.clientHeight >= documentElement.scrollHeight) {
|
if (
|
||||||
|
documentElement.scrollTop + documentElement.clientHeight >=
|
||||||
|
documentElement.scrollHeight
|
||||||
|
) {
|
||||||
setIsBottomReached(true);
|
setIsBottomReached(true);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
@ -196,13 +204,11 @@ export const useRetrieveBskyUsers = () => {
|
|||||||
|
|
||||||
bskyClient.current = new BskyServiceWorkerClient(session);
|
bskyClient.current = new BskyServiceWorkerClient(session);
|
||||||
|
|
||||||
startRetrieveLoop(messageName).catch(
|
startRetrieveLoop(messageName).catch((e) => {
|
||||||
(e) => {
|
|
||||||
console.error(e);
|
console.error(e);
|
||||||
setErrorMessage(e.message);
|
setErrorMessage(e.message);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
},
|
});
|
||||||
);
|
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
await setUsers([]);
|
await setUsers([]);
|
||||||
showModal();
|
showModal();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user