mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 03:12:33 +01:00
FF webext does not support getBytesInUse()
This commit is contained in:
parent
f3458e95f5
commit
efdf43f1d5
@ -109,7 +109,11 @@ var exportToFile = function() {
|
||||
|
||||
var onLocalDataReceived = function(details) {
|
||||
uDom('#localData > ul > li:nth-of-type(1)').text(
|
||||
vAPI.i18n('settingsStorageUsed').replace('{{value}}', details.storageUsed.toLocaleString())
|
||||
vAPI.i18n('settingsStorageUsed')
|
||||
.replace(
|
||||
'{{value}}',
|
||||
typeof details.storageUsed === 'number' ? details.storageUsed.toLocaleString() : '?'
|
||||
)
|
||||
);
|
||||
|
||||
var elem, dt;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
|
||||
uBlock - a browser extension to block requests.
|
||||
Copyright (C) 2014-2015 Raymond Hill
|
||||
uBlock Origin - a browser extension to block requests.
|
||||
Copyright (C) 2014-2016 Raymond Hill
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -19,7 +19,7 @@
|
||||
Home: https://github.com/gorhill/uBlock
|
||||
*/
|
||||
|
||||
/* global YaMD5, µBlock, vAPI, punycode, publicSuffixList */
|
||||
/* global YaMD5, punycode, publicSuffixList */
|
||||
|
||||
'use strict';
|
||||
|
||||
@ -33,7 +33,12 @@
|
||||
µBlock.storageUsed = bytesInUse;
|
||||
callback(bytesInUse);
|
||||
};
|
||||
// Not all platforms implement this method.
|
||||
if ( vAPI.storage.getBytesInUse instanceof Function ) {
|
||||
vAPI.storage.getBytesInUse(null, getBytesInUseHandler);
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user