Fixed: Statistics cannot be deleted (#152)

This commit is contained in:
nobody 2020-10-25 00:09:42 +02:00
parent e4c5bc1db0
commit c8a6daa7bc
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
3 changed files with 6 additions and 0 deletions

View File

@ -92,6 +92,10 @@ messenger._handleMessageReceived = function (message, sender, sendResponse) {
return MessageResponse.ASYNCHRONOUS;
}
if (topic === 'deleteStatistic') {
storageManager.statistics = {};
}
};
/**

View File

@ -223,6 +223,7 @@ statistics._deleteStatistic = function () {
chrome.storage.local.set({
[Setting.INTERNAL_STATISTICS_DATA]: {}
});
chrome.runtime.sendMessage({ topic: 'deleteStatistic' });
}
};

View File

@ -38,6 +38,7 @@
<li>Added: OwlCarousel v2.0.0-beta.2.4 (<a href="https://codeberg.org/nobody/LocalCDN/issues/148">#148</a>)</li>
<li>Added: markdown-it v12.0.2 (<a href="https://codeberg.org/nobody/LocalCDN/issues/149">#149</a>)</li>
<li>Fixed: Unknown frameworks in statistics page (<a href="https://codeberg.org/nobody/LocalCDN/issues/150">#151</a>)</li>
<li>Fixed: Statistics cannot be deleted (<a href="https://codeberg.org/nobody/LocalCDN/issues/151">#152</a>)</li>
</ul>
<div id="generator-section">
<div class="topic-label">