增加文章同步功能

This commit is contained in:
fzk
2026-10-08 11:34:47 +08:00
parent 086e4f23f9
commit 8ae12eff1b
85 changed files with 16166 additions and 18 deletions
+14
View File
@@ -0,0 +1,14 @@
/**
* 打开「文章同步」页面
*
* 内容脚本没有 tabs 权限,这里通过后台脚本打开同步页并带上当前标签页 ID,
* 同步页会自动提取当前页面的文章内容。
*/
export function openSyncPage() {
try {
chrome.runtime.sendMessage({ action: "openSyncPage", url: location.href })
} catch (error) {
// 兜底:直接打开同步页(同步页会自动选择最近访问的文章页)
window.open(chrome.runtime.getURL("tabs/sync.html"))
}
}