This browser extension streamlines the process of sharing content from Facebook. When you click the "Copy Link" button on a post, it automatically opens the copied link in a new browser tab, saving you the hassle of manually pasting the URL.
Supported on: Chrome, Firefox, Edge (WebExtensions API / Manifest V3)
- 🔗 One-Click Link Opening: Hijacks Facebook's "Copy Link" functionality and immediately opens the post's URL in a new tab upon clicking.
- 🧱 Defensive Hijacking: Uses a
MutationObserverto monitor dynamic changes in the share panel, ensuring the "Copy Link" button can be reliably captured even if Facebook's DOM structure changes. - 🧭 Cross-Browser Compatibility: Supports major browsers including Chrome, Firefox, and Edge.
- Core: JavaScript (ES6+), WebExtensions API (Manifest V3)
- Build Tool: webpack
- Testing: Playwright (E2E)
ns4f/
├── AGENTS.md
├── README.md
├── package.json
├── .gitignore
├── manifest.json
├── dist/
│ ├── chrome/
│ └── firefox/
├── src/
│ ├── icons/
│ ├── background/
│ │ └── service-worker.js
│ ├── content/
│ │ └── content-script.js
│ ├── options/
│ │ ├── options.html
│ │ └── options.js
│ └── lib/
│ └── notion-api.js # Notion API Library
└── e2e/
└── basic.spec.ts
- Install dependencies:
npm install
- Build:
npm run build:chrome npm run build:firefox
- Manifest V3: The project's primary target is Manifest V3 to comply with the latest Chrome requirements.
- DOM Manipulation: Facebook's DOM structure changes frequently.
content-script.jsuses aMutationObserverfor stable node targeting, preventing the extension from breaking due to class name or ID changes. - Cross-Browser Compatibility:
- The extension primarily uses the
chrome.*API, with awebextension-polyfillto translate it intobrowser.*for Firefox compatibility. - Storage permissions (
chrome.storagevs.browser.storage) are handled withchrome.storageand a polyfill.
- The extension primarily uses the
這個瀏覽器擴充功能簡化了從 Facebook 分享內容的流程。當您點擊貼文的「複製連結」按鈕時,它會自動將複製的連結在新分頁中開啟,節省您手動貼上連結的時間。
支援:Chrome、Firefox、Edge(WebExtensions API / Manifest V3)
- 🔗 一鍵開啟連結:劫持 Facebook 的「複製連結」功能,在點擊後立即在新分頁中打開該貼文。
- 🧱 防禦式劫持:使用
MutationObserver監聽分享面板的動態生成,確保能穩定地捕捉「複製連結」按鈕。 - 🧭 跨瀏覽器:支援 Chrome、Firefox 和 Edge 等主流瀏覽器。
- 核心: JavaScript (ES6+), WebExtensions API (Manifest V3)
- 建置工具: webpack
- 測試: Playwright (E2E)
ns4f/
├── AGENTS.md
├── README.md
├── package.json
├── .gitignore
├── manifest.json
├── dist/
│ ├── chrome/
│ └── firefox/
├── src/
│ ├── icons/
│ ├── background/
│ │ └── service-worker.js
│ ├── content/
│ │ └── content-script.js
│ ├── options/
│ │ ├── options.html
│ │ └── options.js
│ └── lib/
│ └── notion-api.js # Notion API 函式庫
└── e2e/
└── basic.spec.ts
- 安裝依賴:
npm install
- 建置:
npm run build:chrome npm run build:firefox
- Manifest V3: 主要目標為 Manifest V3,以符合 Chrome 的最新要求。
- DOM 操作: Facebook 的 DOM 結構經常變動。
content-script.js使用MutationObserver來穩定地尋找並劫持目標節點,以避免因 class name 或 id 變更而失效。 - 跨瀏覽器相容性:
- 盡量使用
chrome.*API,搭配webextension-polyfill來轉換為browser.*以支援 Firefox。 - 儲存權限 (
chrome.storagevs.browser.storage) 已使用chrome.storage搭配 polyfill 處理。
- 盡量使用