Skip to content

Commit

Permalink
code review for gorhill@0322d03303cd -- fix handling of rc versions
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Sep 11, 2018
1 parent 0322d03 commit b5ef2d0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/js/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ var onVersionReady = function(lastVersion) {
} else if ( pstr.startsWith('.') || pstr.startsWith('b') ) {
pint = parseInt(pstr.slice(1), 10);
} else if ( pstr.startsWith('rc') ) {
pint = parseInt(pstr.slice(2), 10) * 100;
pint = parseInt(pstr.slice(2), 10) + 100;
} else {
pint = parseInt(pstr, 10);
}
Expand All @@ -153,14 +153,16 @@ var onVersionReady = function(lastVersion) {
return vint;
};

if ( intFromVersion(lastVersion) <= 1016021007 ) {
let lastVersionInt = intFromVersion(lastVersion);

if ( lastVersionInt <= 1016021007 ) {
µb.sessionSwitches.toggle('no-scripting', 'behind-the-scene', 2);
µb.permanentSwitches.toggle('no-scripting', 'behind-the-scene', 2);
µb.saveHostnameSwitches();
}

// https://github.com/uBlockOrigin/uBlock-issues/issues/212#issuecomment-419741324
if ( intFromVersion(lastVersion) <= 1015024000 ) {
if ( lastVersionInt <= 1015024000 ) {
if ( µb.hiddenSettings.manualUpdateAssetFetchPeriod === 2000 ) {
µb.hiddenSettings.manualUpdateAssetFetchPeriod = 500;
µb.saveHiddenSettings();
Expand Down

0 comments on commit b5ef2d0

Please sign in to comment.