1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-04 16:47:15 +02:00
This commit is contained in:
Raymond Hill 2018-01-07 17:53:33 -05:00
parent 71009cf83d
commit b7155a0e0f
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
3 changed files with 14 additions and 11 deletions

View File

@ -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
);
};
/******************************************************************************/

View File

@ -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);
}

View File

@ -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
}
);