diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 2e4384f..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,182 +0,0 @@ -# sky-follower-bridge - -## 1.1.0 - -### Minor Changes - -- f2d4160: skip impersonation users - -### Patch Changes - -- 97d2867: support custom PDS. Thanks @kodxana - -## 1.0.8 - -### Patch Changes - -- acc719b: fix a break loop bug. -- a84e11a: only search unique terms. Thanks @dtflowers - -## 1.0.7 - -### Patch Changes - -- 97d2867: fix scroll bug in list members. Thanks @dtflowers - -## 0.9.1 - -### Patch Changes - -- c0d62de: prevent id entry error - -## 0.9.0 - -### Minor Changes - -- 5528400: Add darkmode - -## 0.8.2 - -### Patch Changes - -- c2e1beb: re fixed unnecessary permission requests - -## 0.8.1 - -### Patch Changes - -- 06068a6: fixed unnecessary permission requests - -## 0.8.0 - -### Minor Changes - -- 2049044: implement batch search feature - -## 0.7.5 - -### Patch Changes - -- e9e9206: bump dependencies - -## 0.7.4 - -### Patch Changes - -- 4338429: "handle name in description", drop matches preceeded by "pfp". thanks @lowercase-donkey - -## 0.7.3 - -### Patch Changes - -- ea68829: replace all underscores in a handle, not just the first. #29 thanks @lowercase-donkey - -## 0.7.2 - -### Patch Changes - -- 7040d1c: - fixed a bug that prevented credentials from being saved - -## 0.7.1 - -### Patch Changes - -- 46891c9: - fixed a bug that prevented typing - -## 0.7.0 - -### Minor Changes - -- e2845c4: - improve search logic - -## 0.6.6 - -### Patch Changes - -- e85e475: - remove unnecessary files - -## 0.6.5 - -### Patch Changes - -- ded6d19: - fix word break - -## 0.6.4 - -### Patch Changes - -- 6a83846: - fix non query error - - add insert animation - -## 0.6.3 - -### Patch Changes - -- 58281f7: - skip when there is no search term. #15 - -## 0.6.2 - -### Patch Changes - -- 788547c: - fix link design - - fix connection error - -## 0.6.1 - -### Patch Changes - -- 0a4138c: - accommodate verified following - -## 0.6.0 - -### Minor Changes - -- bcc3233: - add launch command - -## 0.5.3 - -### Patch Changes - -- 0713ffd: - fix card design - -## 0.5.2 - -### Patch Changes - -- 91dec26: - Fixed a bug that results were not returned in case of error - -## 0.5.1 - -### Patch Changes - -- 506dde7: - fixed a bug that reload button was duplicated. - -## 0.5.0 - -### Minor Changes - -- 69e2d01: - support for Firefox - -## 0.4.2 - -### Patch Changes - -- 82096d3: - fixed to work even if @ is in login handle name - -## 0.4.1 - -### Patch Changes - -- a4a51d7: - fixed a bug in the recommended users field insertion - -## 0.4.0 - -### Minor Changes - -- 3908457: - Fixed to be searchable even by list members. - -## 0.3.3 - -### Patch Changes - -- a449216: set up distribution environment diff --git a/src/contents/Profile.tsx b/src/contents/Profile.tsx new file mode 100644 index 0000000..88eb157 --- /dev/null +++ b/src/contents/Profile.tsx @@ -0,0 +1,71 @@ +import cssText from "data-text:~style.content.css"; +import { sendToBackground } from "@plasmohq/messaging"; +import { Storage } from "@plasmohq/storage"; +import { useStorage } from "@plasmohq/storage/hook"; +import type { PlasmoCSConfig } from "plasmo"; +import React, { useEffect } from "react"; +import { match } from "ts-pattern"; +import AlertError from "~components/AlertError"; +import LoadingCards from "~components/LoadingCards"; +import Modal from "~components/Modal"; +import { useRetrieveBskyUsers } from "~hooks/useRetrieveBskyUsers"; +import { MESSAGE_NAMES, SERVICE_TYPE, STORAGE_KEYS } from "~lib/constants"; + +export const config: PlasmoCSConfig = { + matches: [ + "https://twitter.com/*", + "https://x.com/*", + ], + all_frames: true, +}; + +export const getStyle = () => { + const style = document.createElement("style"); + // patch for shadow dom + style.textContent = cssText.replaceAll(":root", ":host"); + return style; +}; + +const Profile = () => { + useEffect(() => { + const checkAndAddButton = () => { + console.log("checkAndAddButton"); + const userNameElement = document.querySelector('[data-testid="UserName"]'); + if (userNameElement && !document.getElementById("bsky-search-button")) { + const button = document.createElement("button"); + button.id = "bsky-search-button"; + button.textContent = "๐Ÿฆ‹ Search Bluesky"; + button.style.backgroundColor = "#000000"; + button.style.color = "#ffffff"; + button.style.borderRadius = "9999px"; + button.style.padding = "4px 8px"; + button.style.fontWeight = "bold"; + button.style.width = "fit-content"; + button.style.cursor = "pointer"; + button.onclick = () => { + // ใƒœใ‚ฟใƒณใŒใ‚ฏใƒชใƒƒใ‚ฏใ•ใ‚ŒใŸใจใใฎๅ‡ฆ็†ใ‚’ใ“ใ“ใซ่ฟฝๅŠ  + console.log("Search Bluesky User button clicked"); + }; + userNameElement.parentElement.insertBefore(button, userNameElement); + } + }; + + const observer = new MutationObserver(checkAndAddButton); + observer.observe(document.body, { childList: true, subtree: true }); + + // ๅˆๆœŸใƒใ‚งใƒƒใ‚ฏ + checkAndAddButton(); + + return () => { + observer.disconnect(); + }; + }, []); + + return ( +
+

Profile

+
+ ); +}; + +export default Profile;