Skip to content

Commit 77215cc

Browse files
ttop32claude
andcommitted
feat: only open the What's New tab on every 10th patch release
Avoids nagging users with the change-log tab on every minor update; it now opens only when the version's patch number is a multiple of 10 (…230, …240). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent a2f2c97 commit 77215cc

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src/background.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,18 @@ function addInstallUrl(url) {
295295
});
296296
}
297297

298-
// on extension update, open the "what's new" page (changelog + donation ask)
298+
// on extension update, open the "what's new" page (changelog + donation ask).
299+
// only every 10th patch release (…230, …240) so it doesn't nag on every update.
299300
function addUpdateUrl() {
300301
browser.runtime.onInstalled.addListener(async (details) => {
301-
if (details.reason == "update") {
302+
if (details.reason != "update") {
303+
return;
304+
}
305+
var patch = parseInt(
306+
browser.runtime.getManifest().version.split(".").pop(),
307+
10
308+
);
309+
if (Number.isFinite(patch) && patch % 10 === 0) {
302310
browser.tabs.create({
303311
url: browser.runtime.getURL("popup.html?whatsnew=1"),
304312
});

0 commit comments

Comments
 (0)