aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/storage.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/storage.js')
-rw-r--r--src/js/storage.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/js/storage.js b/src/js/storage.js
index 0c41411..478f3a2 100644
--- a/src/js/storage.js
+++ b/src/js/storage.js
@@ -25,9 +25,13 @@
/******************************************************************************/
-µBlock.getBytesInUse = function() {
+µBlock.getBytesInUse = function(callback) {
+ if ( typeof callback !== 'function' ) {
+ callback = this.noopFunc;
+ }
var getBytesInUseHandler = function(bytesInUse) {
µBlock.storageUsed = bytesInUse;
+ callback(bytesInUse);
};
vAPI.storage.getBytesInUse(null, getBytesInUseHandler);
};