mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-06-13 15:54:54 +12:00
fix #819
This commit is contained in:
parent
88912170fc
commit
76639f528a
|
@ -339,14 +339,14 @@ vAPI.tabs.remove = function(tabId) {
|
|||
|
||||
/******************************************************************************/
|
||||
|
||||
vAPI.tabs.reload = function(tabId /*, flags*/) {
|
||||
vAPI.tabs.reload = function(tabId, bypassCache) {
|
||||
if ( typeof tabId === 'string' ) {
|
||||
tabId = parseInt(tabId, 10);
|
||||
}
|
||||
if ( isNaN(tabId) ) {
|
||||
return;
|
||||
}
|
||||
chrome.tabs.reload(tabId);
|
||||
chrome.tabs.reload(tabId, { bypassCache: bypassCache === true });
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
|
|
@ -54,7 +54,7 @@ function onMessage(request, sender, callback) {
|
|||
|
||||
switch ( request.what ) {
|
||||
case 'forceReloadTab':
|
||||
µm.forceReload(request.tabId);
|
||||
µm.forceReload(request.tabId, request.bypassCache);
|
||||
break;
|
||||
|
||||
case 'forceUpdateAssets':
|
||||
|
|
|
@ -1197,10 +1197,11 @@ function revertAll() {
|
|||
|
||||
/******************************************************************************/
|
||||
|
||||
function buttonReloadHandler() {
|
||||
function buttonReloadHandler(ev) {
|
||||
messager.send({
|
||||
what: 'forceReloadTab',
|
||||
tabId: matrixSnapshot.tabId
|
||||
tabId: matrixSnapshot.tabId,
|
||||
bypassCache: ev.shiftKey
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -570,8 +570,8 @@ vAPI.tabs.registerListeners();
|
|||
|
||||
/******************************************************************************/
|
||||
|
||||
µm.forceReload = function(tabId) {
|
||||
vAPI.tabs.reload(tabId, { bypassCache: true });
|
||||
µm.forceReload = function(tabId, bypassCache) {
|
||||
vAPI.tabs.reload(tabId, bypassCache);
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
|
Loading…
Reference in a new issue