Skip to content

Commit

Permalink
Open the appearance page for users to configure their preferred visua…
Browse files Browse the repository at this point in the history
…l theme on upgrade from 11.4.1rc3 and below.
  • Loading branch information
hackademix committed Mar 22, 2022
1 parent c0f08ce commit 8b57885
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/bg/LifeCycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,16 @@ var LifeCycle = (() => {
// add the lan capability to any preset which already has the script capability
await configureNewCap("lan", ["DEFAULT", "TRUSTED", "CUSTOM"], caps => caps.has("script"));
}

if (Ver.is(previousVersion, "<=", "11.4.1rc3")) {
// show theme switcher on update unless user has already chosen between Vintage Blue and Modern Red
(async () => {
let isVintage = await Themes.isVintage();
if (typeof isVintage === "boolean") return;
await ns.init;
ns.openOptionsPage({tab: 2, focus: "#opt-vintageTheme", hilite: "#sect-themes"});
})();
}
},

async onUpdateAvailable(details) {
Expand Down

0 comments on commit 8b57885

Please sign in to comment.