diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js index 83bae3229..2c569f32d 100644 --- a/platform/chromium/vapi-background.js +++ b/platform/chromium/vapi-background.js @@ -1,7 +1,7 @@ /******************************************************************************* uBlock Origin - a browser extension to block requests. - Copyright (C) 2014-2017 The uBlock Origin authors + Copyright (C) 2014-2018 The uBlock Origin authors 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 @@ -579,11 +579,9 @@ vAPI.tabs.remove = function(tabId) { /******************************************************************************/ -vAPI.tabs.reload = function(tabId /*, flags*/) { +vAPI.tabs.reload = function(tabId, bypassCache) { tabId = toChromiumTabId(tabId); - if ( tabId === 0 ) { - return; - } + if ( tabId === 0 ) { return; } var onReloaded = function() { // https://code.google.com/p/chromium/issues/detail?id=410868#c8 @@ -592,7 +590,11 @@ vAPI.tabs.reload = function(tabId /*, flags*/) { } }; - chrome.tabs.reload(tabId, onReloaded); + chrome.tabs.reload( + tabId, + { bypassCache: bypassCache === true }, + onReloaded + ); }; /******************************************************************************/ diff --git a/src/js/messaging.js b/src/js/messaging.js index 5855baf9f..34980672e 100644 --- a/src/js/messaging.js +++ b/src/js/messaging.js @@ -1,7 +1,7 @@ /******************************************************************************* uBlock Origin - a browser extension to block requests. - Copyright (C) 2014-2017 Raymond Hill + Copyright (C) 2014-2018 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 @@ -157,7 +157,7 @@ var onMessage = function(request, sender, callback) { case 'reloadTab': if ( vAPI.isBehindTheSceneTabId(request.tabId) === false ) { - vAPI.tabs.reload(request.tabId); + vAPI.tabs.reload(request.tabId, request.bypassCache === true); if ( request.select && vAPI.tabs.select ) { vAPI.tabs.select(request.tabId); } diff --git a/src/js/popup.js b/src/js/popup.js index 457a6c502..e1ee97534 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -1,7 +1,7 @@ /******************************************************************************* uBlock Origin - a browser extension to block requests. - Copyright (C) 2014-2017 Raymond Hill + Copyright (C) 2014-2018 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 @@ -831,13 +831,14 @@ var setFirewallRuleHandler = function(ev) { /******************************************************************************/ -var reloadTab = function() { +var reloadTab = function(ev) { messaging.send( 'popupPanel', { what: 'reloadTab', tabId: popupData.tabId, - select: true + select: true, + bypassCache: ev.ctrlKey || ev.metaKey } );