mirror of
https://github.com/snachodog/tok-to-insta-follower-bridge.git
synced 2025-04-23 20:12:22 -06:00
🐛 remove reload button if exisits
This commit is contained in:
parent
bb473a636a
commit
323ecac84a
@ -25,6 +25,11 @@ export const insertReloadEl = (clickAction: () => void) => {
|
|||||||
van.add(lastInsertedEl.parentElement, ReloadButton({clickAction}))
|
van.add(lastInsertedEl.parentElement, ReloadButton({clickAction}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const removeReloadEl = () => {
|
||||||
|
const reloadEl = document.querySelectorAll('.bsky-reload-btn-wrapper')
|
||||||
|
reloadEl.forEach(el => el.remove())
|
||||||
|
}
|
||||||
|
|
||||||
export const getAccountNameAndDisplayName = (userCell: Element) => {
|
export const getAccountNameAndDisplayName = (userCell: Element) => {
|
||||||
const [avatarEl, displayNameEl] = userCell?.querySelectorAll("a")
|
const [avatarEl, displayNameEl] = userCell?.querySelectorAll("a")
|
||||||
const twAccountName = avatarEl?.getAttribute("href")?.replace("/", "")
|
const twAccountName = avatarEl?.getAttribute("href")?.replace("/", "")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { isOutOfTopViewport } from './domHelpers';
|
import { isOutOfTopViewport, removeReloadEl } from './domHelpers';
|
||||||
import { getAccountNameAndDisplayName, getUserCells, insertBskyProfileEl, insertNotFoundEl, insertReloadEl } from "~lib/domHelpers";
|
import { getAccountNameAndDisplayName, getUserCells, insertBskyProfileEl, insertNotFoundEl, insertReloadEl } from "~lib/domHelpers";
|
||||||
import { isSimilarUser } from "~lib/bskyHelpers";
|
import { isSimilarUser } from "~lib/bskyHelpers";
|
||||||
import { debugLog } from "~lib/utils";
|
import { debugLog } from "~lib/utils";
|
||||||
@ -29,6 +29,8 @@ export const searchAndInsertBskyUsers = async (
|
|||||||
removeQuery: (arg: string) => Promise<any>,
|
removeQuery: (arg: string) => Promise<any>,
|
||||||
}) => {
|
}) => {
|
||||||
|
|
||||||
|
removeReloadEl()
|
||||||
|
|
||||||
const userCells = getUserCells({
|
const userCells = getUserCells({
|
||||||
queryParam: userCellQueryParam,
|
queryParam: userCellQueryParam,
|
||||||
filterInsertedElement: true,
|
filterInsertedElement: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user