1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 07:22:28 +02:00
This commit is contained in:
gorhill 2015-03-27 09:50:31 -04:00
parent 475ccccf41
commit b938022d0b
2 changed files with 17 additions and 0 deletions

View File

@ -271,6 +271,10 @@ var cachedAssetsManager = (function() {
getEntries(onEntries);
};
exports.rmrf = function() {
exports.remove(/./);
};
exports.onRemovedListener = null;
return exports;
@ -468,6 +472,9 @@ var getRepoMetadata = function(callback) {
/******************************************************************************/
exports.setHomeURL = function(path, homeURL) {
if ( typeof homeURL !== 'string' || homeURL === '' ) {
return;
}
homeURLs[path] = homeURL;
};
@ -1029,6 +1036,12 @@ exports.put = function(path, content, callback) {
/******************************************************************************/
exports.rmrf = function() {
cachedAssetsManager.rmrf();
};
/******************************************************************************/
exports.metadata = function(callback) {
var out = {};

View File

@ -1058,6 +1058,10 @@ var restoreUserData = function(request) {
}, onCountdown);
};
// https://github.com/gorhill/uBlock/issues/1102
// Ensure all currently cached assets are flushed from storage AND memory.
µb.assets.rmrf();
// If we are going to restore all, might as well wipe out clean local
// storage
µb.XAL.keyvalRemoveAll(onAllRemoved);