diff --git a/CHANGELOG.md b/CHANGELOG.md index 4127e9c..fdfcde8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.18.1] - 2020-06-07 + +### Compatibility note +- Require Firefox >= 55 +- Require Chrome >= 37 + +### Changed +- Hotfix for the endless loop on new log limit ([#545](https://gitlab.com/KevinRoebert/ClearUrls/issues/545), [#541](https://gitlab.com/KevinRoebert/ClearUrls/issues/541), [#539](https://gitlab.com/KevinRoebert/ClearUrls/issues/539)) + ## [1.18.0] - 2020-06-06 ### Compatibility note diff --git a/core_js/storage.js b/core_js/storage.js index d885379..5cf17da 100644 --- a/core_js/storage.js +++ b/core_js/storage.js @@ -157,7 +157,7 @@ function setData(key, value) { storage[key] = value.split(','); break; case "logLimit": - storage[key] = Number(value); + storage[key] = Math.max(0, Number(value)); break; default: storage[key] = value; diff --git a/core_js/tools.js b/core_js/tools.js index b38d44f..33dc28e 100644 --- a/core_js/tools.js +++ b/core_js/tools.js @@ -305,7 +305,7 @@ function handleError(error) { * @param rule the rule that triggered the process */ function pushToLog(beforeProcessing, afterProcessing, rule) { - const limit = storage.logLimit; + const limit = Math.max(0, storage.logLimit); if (storage.loggingStatus && limit !== 0 && !isNaN(limit)) { while (storage.log.log.length >= limit || storage.log.log.length >= logThreshold) { diff --git a/html/cleaningTool.html b/html/cleaningTool.html index 2bd865d..fe67fd6 100644 --- a/html/cleaningTool.html +++ b/html/cleaningTool.html @@ -29,7 +29,6 @@ along with this program. If not, see . -