Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
e430397
WIP: refactor, maintain a single source
eight04 Jul 18, 2023
07148d1
WIP: rewrite
eight04 Jul 18, 2023
dd8a81b
WIP: store all data and diff
eight04 Jul 18, 2023
24125a9
Rewrite
eight04 Aug 4, 2023
efdc892
Add: extension id
eight04 Aug 4, 2023
de7215c
Add: a fixme
eight04 Aug 4, 2023
7202211
Remove eslint cache
eight04 Sep 2, 2023
b86a370
Add: userAgent
eight04 Sep 2, 2023
565c9e1
Fix: failed to delete bookmark at end
eight04 Sep 2, 2023
b28219b
Fix: throw error if fetch is not ok
eight04 Oct 27, 2024
b3aceec
Add: show sync error
eight04 Nov 18, 2024
42d6ae8
Add: sync now button
eight04 Nov 21, 2024
18c7ae8
Fix: children is inserted to a wrong folder after creating a new folder
eight04 Dec 9, 2024
5111624
Fix: don't hard code bookmark id in chrome
eight04 Nov 24, 2025
9103fc8
Add: logs, merge ability
eight04 Nov 26, 2025
c6a0869
Update readme
eight04 Nov 26, 2025
73fd1f5
Display wip
eight04 Nov 26, 2025
a33f3d5
Fix: various
eight04 Nov 26, 2025
d759040
Fix: null check
eight04 Nov 26, 2025
218b517
Add: crx build
eight04 Nov 26, 2025
454b465
Fix: reset bookmarkChanged
eight04 Nov 26, 2025
13664e7
Fix: diff currentData and storedData before push
eight04 Nov 26, 2025
3d5714e
Fix: don't process response if remote not modified
eight04 Nov 26, 2025
7a5d7d0
Add: noDelete, isAtomic
eight04 Nov 26, 2025
dd622f5
Fix: use stable stringify
eight04 Nov 26, 2025
b742fbe
Change: don't put source code to artifacts folder
eight04 Nov 26, 2025
516b7c2
Add: changelog
eight04 Nov 26, 2025
b767c39
Fix: ci permission
eight04 Nov 26, 2025
fbc6334
Fix: node version
eight04 Nov 26, 2025
9238249
Update README.md
eight04 Nov 26, 2025
1214c32
Update .github/workflows/release.yml
eight04 Nov 26, 2025
49c3d20
Fix
eight04 Nov 26, 2025
e9e82f8
Merge branch 'dev' of https://github.com/eight04/Bookmark-Sync into dev
eight04 Nov 26, 2025
0c2c769
Switch to flat-json-diff
eight04 Nov 27, 2025
16dc0a2
Update
eight04 Nov 27, 2025
46f6666
Improve options page
eight04 Nov 27, 2025
cf27dda
Add: openGist button
eight04 Nov 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .cjsescache
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
"node_modules/diff/libesm/diff/base.js",
"node_modules/diff/libesm/util/distance-iterator.js",
"node_modules/safe-stable-stringify/index.js",
"node_modules/webextension-polyfill/dist/browser-polyfill.js"
]
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[*]
indent_size = 2
indent_style = space
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Environments (please complete the following information):**
- OS: [e.g. Windows 10]
- Browser: [e.g. Firefox 102]
- Extension Version: [e.g. 0.16.1]

**Additional context**
Add any other context about the problem here.
11 changes: 11 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v6
with:
node-version: latest

- run: npm cit
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v6
with:
node-version: latest

- run: npm ci
- run: npm run build
- run: npm run changelog --silent > changelog.md

- uses: softprops/action-gh-release@v2
with:
body_path: changelog.md
files: web-ext-artifacts/*
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.web-extension-id
web-ext-artifacts
*.crx
*.pem
*.zip
.eslintcache
.web-extension-id
build
node_modules
web-ext-artifacts
61 changes: 51 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,59 @@
# Bookmark Sync
# bookmark to gist

### [Firefox Addon](https://addons.mozilla.org/firefox/addon/bookmark-sync/)
This is a fork of [bookmark sync](https://github.com/dodying/Bookmark-Sync) though most of the code is rewritten.

Inspired by [shanalikhan/code-settings-sync](https://github.com/shanalikhan/code-settings-sync) and Xmarks is dead :cry:

受 [shanalikhan/code-settings-sync](https://github.com/shanalikhan/code-settings-sync) 启发,同时Xmarks关闭服务 :cry:
Syncs browser bookmarks to a GitHub Gist. Support Firefox, Firefox for Android, Chromium-based browsers (MV2), and Edge for Android.

### Usage

1. Cteate a [New personal access token](https://github.com/settings/tokens/new), and add `gist` in scope. [Like this](https://github.com/shanalikhan/code-settings-sync#steps-to-get-a-personal-access-token-from-github)
2. Put in the token in option page
1. Create a [new gist](https://gist.github.com/) with a file named `bookmark.json` and the content `null`.
2. Create a [New personal access token](https://github.com/settings/personal-access-tokens), and grant `gist` permission.
3. Open the option page by clicking the extension icon.
4. Put in gist ID and the personal access token.
5. Choose the sync mode.
6. Click Save.

Syncing runs periodically and when bookmarks change.

### How it works

First, it pulls the remote data, then applies it to the local bookmarks.

If there are local changes before the sync starts, the local changes will be patched to the remote data. Then, the merged data will be pushed to the remote.

During the initial sync, all local bookmarks are merged to the remote data, unless the Sync Mode is set to Pull Only.

If an error occurs while patching local changes to the remote data (e.g., if some bookmarks are deleted remotely), the patch is skipped and the changes are stored locally. You can view these changes on the Options page.

### Cross browser compatibility

#### Root folders

Firefox has four root folders:

* toolbar
* menu
* mobile
* other

Chrome has only three:

* toolbar
* mobile
* other

When pushing the data, all folders will be pushed to gist. When pulling, only supported folders will be pulled. Therefore bookmarks from Firefox's menu won't be synced to Chrome. (They still sync between Firefox browsers.)

#### Import issue in Firefox

There is no way to detect bookmark imports in Firefox. You have to make some changes (e.g. reorder a bookmark) to trigger syncs after importing/recovered from backup.

### Todos

* Support truncated response: https://docs.github.com/en/rest/gists/gists?apiVersion=2022-11-28#truncation

### Changelog

### 使用说明
* 1.0.0 (Nov 26, 2025)

1. 创建 [New personal access token](https://github.com/settings/tokens/new), 记得勾选`gist`. [可以参照这里](https://github.com/shanalikhan/code-settings-sync#steps-to-get-a-personal-access-token-from-github)
2. 把密匙填入选项页面
- Initial release
2 changes: 0 additions & 2 deletions chrome/css/style.css

This file was deleted.

Loading