|
@ -44,17 +44,8 @@ var µm = µMatrix; |
|
|
|
|
|
|
|
|
/******************************************************************************/ |
|
|
/******************************************************************************/ |
|
|
|
|
|
|
|
|
var onAllDone = function() { |
|
|
|
|
|
µm.webRequest.start(); |
|
|
|
|
|
|
|
|
|
|
|
// https://github.com/chrisaljoudi/uBlock/issues/184
|
|
|
|
|
|
// Check for updates not too far in the future.
|
|
|
|
|
|
µm.assetUpdater.onStart.addListener(µm.updateStartHandler.bind(µm)); |
|
|
|
|
|
µm.assetUpdater.onCompleted.addListener(µm.updateCompleteHandler.bind(µm)); |
|
|
|
|
|
µm.assetUpdater.onAssetUpdated.addListener(µm.assetUpdatedHandler.bind(µm)); |
|
|
|
|
|
µm.assets.onAssetCacheRemoved.addListener(µm.assetCacheRemovedHandler.bind(µm)); |
|
|
|
|
|
|
|
|
|
|
|
// Browser data jobs
|
|
|
// Browser data jobs
|
|
|
|
|
|
|
|
|
var jobCallback = function() { |
|
|
var jobCallback = function() { |
|
|
if ( !µm.userSettings.clearBrowserCache ) { |
|
|
if ( !µm.userSettings.clearBrowserCache ) { |
|
|
return; |
|
|
return; |
|
@ -69,11 +60,43 @@ var onAllDone = function() { |
|
|
// console.debug('clearBrowserCacheCallback()> vAPI.browserCache.clearByTime() called');
|
|
|
// console.debug('clearBrowserCacheCallback()> vAPI.browserCache.clearByTime() called');
|
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/ |
|
|
|
|
|
|
|
|
|
|
|
var onAllDone = function() { |
|
|
|
|
|
µm.webRequest.start(); |
|
|
|
|
|
|
|
|
|
|
|
// https://github.com/chrisaljoudi/uBlock/issues/184
|
|
|
|
|
|
// Check for updates not too far in the future.
|
|
|
|
|
|
µm.assetUpdater.onStart.addListener(µm.updateStartHandler.bind(µm)); |
|
|
|
|
|
µm.assetUpdater.onCompleted.addListener(µm.updateCompleteHandler.bind(µm)); |
|
|
|
|
|
µm.assetUpdater.onAssetUpdated.addListener(µm.assetUpdatedHandler.bind(µm)); |
|
|
|
|
|
µm.assets.onAssetCacheRemoved.addListener(µm.assetCacheRemovedHandler.bind(µm)); |
|
|
|
|
|
|
|
|
µMatrix.asyncJobs.add('clearBrowserCache', null, jobCallback, 15 * 60 * 1000, true); |
|
|
µMatrix.asyncJobs.add('clearBrowserCache', null, jobCallback, 15 * 60 * 1000, true); |
|
|
|
|
|
|
|
|
// Important: remove barrier to remote fetching, this was useful only
|
|
|
// Important: remove barrier to remote fetching, this was useful only
|
|
|
// for launch time.
|
|
|
// for launch time.
|
|
|
µm.assets.remoteFetchBarrier -= 1; |
|
|
µm.assets.remoteFetchBarrier -= 1; |
|
|
|
|
|
|
|
|
|
|
|
if ( vAPI.localStorage.getItem('placeholderBackgroundImage') === null ) { |
|
|
|
|
|
vAPI.localStorage.setItem('placeholderBackgroundImage', [ |
|
|
|
|
|
'linear-gradient(0deg,', |
|
|
|
|
|
'rgba(0,0,0,0.02) 25%,', |
|
|
|
|
|
'rgba(0,0,0,0.05) 25%,', |
|
|
|
|
|
'rgba(0,0,0,0.05) 75%,', |
|
|
|
|
|
'rgba(0,0,0,0.02) 75%,', |
|
|
|
|
|
'rgba(0,0,0,0.02)', |
|
|
|
|
|
') center center / 10px 10px repeat scroll,', |
|
|
|
|
|
'linear-gradient(', |
|
|
|
|
|
'90deg,', |
|
|
|
|
|
'rgba(0,0,0,0.02) 25%,', |
|
|
|
|
|
'rgba(0,0,0,0.05) 25%,', |
|
|
|
|
|
'rgba(0,0,0,0.05) 75%,', |
|
|
|
|
|
'rgba(0,0,0,0.02) 75%,', |
|
|
|
|
|
'rgba(0,0,0,0.02)', |
|
|
|
|
|
') center center / 10px 10px repeat scroll' |
|
|
|
|
|
].join('')); |
|
|
|
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
var onTabsReady = function(tabs) { |
|
|
var onTabsReady = function(tabs) { |
|
|