mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
Firefox,Safari: implement vAPI.tabs.reload
This commit is contained in:
parent
a31c30d55e
commit
d0de3d0d72
@ -410,7 +410,7 @@ vAPI.tabs.get = function(tabId, callback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// for internal use
|
// for internal use
|
||||||
if ( tab && typeof callback !== 'function' ) {
|
if ( typeof callback !== 'function' ) {
|
||||||
return tab;
|
return tab;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -561,6 +561,16 @@ vAPI.tabs.remove = function(tabIds) {
|
|||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
|
vAPI.tabs.reload = function(tabId) {
|
||||||
|
var tab = this.get(tabId);
|
||||||
|
|
||||||
|
if ( tab ) {
|
||||||
|
tab.ownerDocument.defaultView.gBrowser.reloadTab(tab);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
vAPI.tabs.injectScript = function(tabId, details, callback) {
|
vAPI.tabs.injectScript = function(tabId, details, callback) {
|
||||||
var tab = vAPI.tabs.get(tabId);
|
var tab = vAPI.tabs.get(tabId);
|
||||||
|
|
||||||
|
@ -327,6 +327,16 @@ vAPI.tabs.remove = function(tabIds) {
|
|||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
|
vAPI.tabs.reload = function(tabId) {
|
||||||
|
var tab = this.stack[tabId];
|
||||||
|
|
||||||
|
if ( tab ) {
|
||||||
|
tab.url = tab.url;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
vAPI.tabs.injectScript = function(tabId, details, callback) {
|
vAPI.tabs.injectScript = function(tabId, details, callback) {
|
||||||
var tab;
|
var tab;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user