MCPcopy
hub / github.com/philc/vimium / majorVersionHasIncreased

Function majorVersionHasIncreased

background_scripts/main.js:802–808  ·  view source on GitHub ↗
(previousVersion)

Source from the content-addressed store, hash-verified

800// True if the major version of Vimium has changed.
801// - previousVersion: this will be null for new installs.
802function majorVersionHasIncreased(previousVersion) {
803 const currentVersion = Utils.getCurrentVersion();
804 if (previousVersion == null) return false;
805 const currentMajorVersion = currentVersion.split(".").slice(0, 2).join(".");
806 const previousMajorVersion = previousVersion.split(".").slice(0, 2).join(".");
807 return Utils.compareVersions(currentMajorVersion, previousMajorVersion) == 1;
808}
809
810// Show notification on upgrade.
811async function showUpgradeMessageIfNecessary(onInstalledDetails) {

Callers 2

main_test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected