* Reset the global statistic
()
| 159 | * Reset the global statistic |
| 160 | */ |
| 161 | function resetGlobalCounter(){ |
| 162 | browser.runtime.sendMessage({ |
| 163 | function: "setData", |
| 164 | params: ['cleanedCounter', 0] |
| 165 | }).catch(handleError); |
| 166 | |
| 167 | browser.runtime.sendMessage({ |
| 168 | function: "setData", |
| 169 | params: ['totalCounter', 0] |
| 170 | }).catch(handleError); |
| 171 | |
| 172 | browser.runtime.sendMessage({ |
| 173 | function: "saveOnExit", |
| 174 | params: [] |
| 175 | }).catch(handleError); |
| 176 | |
| 177 | cleanedCounter = 0; |
| 178 | totalCounter = 0; |
| 179 | |
| 180 | changeStatistics(); |
| 181 | } |
| 182 | |
| 183 | (function() { |
| 184 | loadData("cleanedCounter") |
nothing calls this directly
no test coverage detected