commit baad11d83540758403070efb3141ee2c8a06fa4b equwal <truex@equwal.com> 2026-09-22 19:54:05 -0700 Use sbmsync.com as the default sync server The sync server moved from sbm.subread.space to sbmsync.com. The add-on now uses the new address by default, and the links of the options page go there. The manifest keeps the host permission for the old address, because a sign-in from before the move keeps that address, and the old address still serves the sync API.
README.md | 7 ++++--- background.js | 2 +- manifest.json | 1 + options.html | 6 +++--- options.js | 2 +- store/listing.md | 16 ++++++++-------- test/server.test.js | 16 ++++++++++++++++ 7 files changed, 34 insertions(+), 16 deletions(-)
diff --git a/README.md b/README.md index ccc9c43..4ad4d18 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ The bookmarks are an sbm file: one bookmark per line, ## Sync -The add-on uses https://sbm.subread.space unless you give another server in +The add-on uses https://sbmsync.com unless you give another server in the options. Create an account there. Sync on that server is free. Or [run your own server](https://github.com/equwal/sbm-sync): it is free software. @@ -42,11 +42,12 @@ its own pages in a new tab. The add-on never sees your card. - `activeTab`: read the address and the title of the page when you click "Add this page". - `alarms`: sync every 30 minutes. -- Access to sbm.subread.space, or to the server that you choose: sync. +- Access to sbmsync.com and its old address sbm.subread.space, or to the + server that you choose: sync. Firefox also asks you, at sign-in, to let the add-on send your bookmarks, your email address and your password to the server. The -[privacy policy](https://sbm.subread.space/privacy) tells what the server +[privacy policy](https://sbmsync.com/privacy) tells what the server keeps. ## Develop diff --git a/background.js b/background.js index 0db87a3..520e4e5 100644 --- a/background.js +++ b/background.js @@ -10,7 +10,7 @@ if (typeof importScripts === "function") importScripts("lib/tsv.js", "lib/fuzzy.js", "lib/plan.js"); const api = globalThis.browser ?? globalThis.chrome; -const DEFAULT_SERVER = "https://sbm.subread.space"; +const DEFAULT_SERVER = "https://sbmsync.com"; const SYNC_MINUTES = 30; // One change at a time: each job starts when the one before it ends. diff --git a/manifest.json b/manifest.json index 426e0e5..85dfd09 100644 --- a/manifest.json +++ b/manifest.json @@ -49,6 +49,7 @@ "alarms" ], "host_permissions": [ + "https://sbmsync.com/*", "https://sbm.subread.space/*" ], "optional_host_permissions": [ diff --git a/options.html b/options.html index 55058e8..64ce1cb 100644 --- a/options.html +++ b/options.html @@ -19,7 +19,7 @@ other browsers.</p> <label>Password <input id="password" type="password" required autocomplete="current-password"></label> <button>Sign in</button> </form> - <p class="note">No account? <a id="signup" href="https://sbm.subread.space/signup" target="_blank" rel="noopener">Create one</a> + <p class="note">No account? <a id="signup" href="https://sbmsync.com/signup" target="_blank" rel="noopener">Create one</a> on the website of the server. The add-on sends your bookmarks only to this server, and only after you sign in.</p> </section> @@ -34,14 +34,14 @@ other browsers.</p> <p id="billing"></p> <p id="links"></p> </div> - <p class="note"><a id="account" href="https://sbm.subread.space/account" target="_blank" rel="noopener">Your account</a></p> + <p class="note"><a id="account" href="https://sbmsync.com/account" target="_blank" rel="noopener">Your account</a></p> </section> <p id="message" role="status"></p> <footer> <a href="https://github.com/equwal/sbm-extension" target="_blank" rel="noopener">Source code</a> · - <a href="https://sbm.subread.space/privacy" target="_blank" rel="noopener">Privacy</a> · + <a href="https://sbmsync.com/privacy" target="_blank" rel="noopener">Privacy</a> · <a href="https://ko-fi.com/truex" target="_blank" rel="noopener">Support sbm on Ko-fi</a> </footer> <script src="lib/tsv.js"></script> diff --git a/options.js b/options.js index 777895f..0220df8 100644 --- a/options.js +++ b/options.js @@ -4,7 +4,7 @@ const api = globalThis.browser ?? globalThis.chrome; const $ = (id) => document.getElementById(id); -const DEFAULT_SERVER = "https://sbm.subread.space"; +const DEFAULT_SERVER = "https://sbmsync.com"; // The data that the add-on sends to the server after a sign-in. Firefox 140 // and later ask the user for it; other browsers have no such question. diff --git a/store/listing.md b/store/listing.md index 67f98b2..a4a8e0c 100644 --- a/store/listing.md +++ b/store/listing.md @@ -24,12 +24,12 @@ sbm keeps your bookmarks in one plain text file: one bookmark per line, with the - Search as you type: press Alt+Shift+M or click the icon. The search is fuzzy, as in fzf. Enter opens the first match. Text that is no bookmark opens as an address, or as a web search. - In the address bar, type bm, a space, then words. - Add the page that you look at, with a description and tags. -- Sync with bm on your computers, the sbm app for Android and your other browsers, through an sbm-sync server. The server is free software: use the default one, sbm.subread.space, or run your own. Sync on sbm.subread.space is free. +- Sync with bm on your computers, the sbm app for Android and your other browsers, through an sbm-sync server. The server is free software: use the default one, sbmsync.com, or run your own. Sync on sbmsync.com is free. - The options page shows the plan of your account and the paid options of the server, such as a supporter subscription. Stripe takes all payments on its own pages. The add-on never sees your card. Without an account, your bookmarks stay in the browser. The add-on has no ads, no analytics and no trackers. -The operator of sbm.subread.space sells its paid options, not Google or Mozilla. Terms of sale, with the refund policy: https://sbm.subread.space/terms +The operator of sbmsync.com sells its paid options, not Google or Mozilla. Terms of sale, with the refund policy: https://sbmsync.com/terms Source code (AGPL-3.0): https://github.com/equwal/sbm-extension @@ -39,8 +39,8 @@ Source code (AGPL-3.0): https://github.com/equwal/sbm-extension **Homepage:** https://github.com/equwal/sbm-extension **Support:** https://github.com/equwal/sbm-extension/issues -**Privacy policy:** https://sbm.subread.space/privacy -**Terms of sale:** https://sbm.subread.space/terms (in the description; the +**Privacy policy:** https://sbmsync.com/privacy +**Terms of sale:** https://sbmsync.com/terms (in the description; the Chrome Web Store asks for them when an add-on leads to payments) ## Chrome Web Store (chrome.google.com/webstore/devconsole) @@ -51,7 +51,7 @@ Chrome Web Store asks for them when an add-on leads to payments) - storage: keeps the bookmarks of the user and the sign-in token in the browser. - activeTab: reads the address and the title of the current page when the user clicks "Add this page". - alarms: syncs the bookmarks every 30 minutes. - - Host permission sbm.subread.space: sends the bookmark file to the default sync server after the user signs in. + - Host permissions sbmsync.com and sbm.subread.space (the old address of the same server): send the bookmark file to the default sync server after the user signs in. - Optional host permissions (https://\*/\*, http://\*/\*): the user can choose another sync server; at sign-in the add-on asks for that one site only. - **Remote code:** No. All code is in the package. - **Data usage:** the add-on collects, only after the user signs in: @@ -73,7 +73,7 @@ Chrome Web Store asks for them when an add-on leads to payments) ko-fi.com is one, buy.stripe.com is not. - "This add-on requires payment, non-free services or software, or additional hardware": leave it clear while sync is free. Tick it on the - day that sync on sbm.subread.space needs payment, and change the + day that sync on sbmsync.com needs payment, and change the description the same day. - Data collection: the manifest declares none as required, and bookmarks, personally identifying information and authentication information as @@ -84,14 +84,14 @@ Chrome Web Store asks for them when an add-on leads to payments) shows the plan of your sync account and its payment options: subscribe, manage billing, become a supporter, and the terms of sale. Stripe takes all payments on its own pages, in a new tab. The add-on never sees your card. - Sync on sbm.subread.space stays free. The add-on also has fuzzy search as + Sync on sbmsync.com stays free. The add-on also has fuzzy search as you type (Alt+Shift+M), the address bar keyword bm, Add this page with tags, and sync with bm and the sbm app for Android." - Notes to reviewer: "No build step: the zip is the source code of https://github.com/equwal/sbm-extension at tag v0.2.0. Only manifest.json is different: it has no background.service_worker, which only Chrome uses. To test sync, open the options page, keep the server - https://sbm.subread.space, and sign in with the review account below. The + https://sbmsync.com, and sign in with the review account below. The account holds demo bookmarks only. After the sign-in, the Plan section shows "Sync is on." and the payment links of the server. Sync is free, so no payment is necessary for the test." Then add the email and the password diff --git a/test/server.test.js b/test/server.test.js new file mode 100644 index 0000000..2ca3583 --- /dev/null +++ b/test/server.test.js @@ -0,0 +1,16 @@ +"use strict"; +const test = require("node:test"); +const assert = require("node:assert/strict"); +const fs = require("node:fs"); +const path = require("node:path"); + +const read = (file) => fs.readFileSync(path.join(__dirname, "..", file), "utf8"); +const defaultServer = (file) => read(file).match(/const DEFAULT_SERVER = "([^"]+)";/)[1]; + +test("the add-on can reach its default server and the old address", () => { + assert.equal(defaultServer("background.js"), "https://sbmsync.com"); + assert.equal(defaultServer("options.js"), "https://sbmsync.com"); + // Sign-ins from before the move keep the old address. + const hosts = JSON.parse(read("manifest.json")).host_permissions; + assert.deepEqual(hosts, ["https://sbmsync.com/*", "https://sbm.subread.space/*"]); +});