mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
code review for https://github.com/gorhill/uBlock/commit/0322d03303cd -- fix handling of rc versions
This commit is contained in:
parent
0322d03303
commit
b5ef2d0105
1 changed files with 5 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue