Add command to reload all pages at once

This commit is contained in:
Oliver Blanthorn 2017-11-22 16:59:58 +00:00
parent 8802a7f265
commit c236ecdf7a
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

View file

@ -211,6 +211,14 @@ export async function reload(n = 1, hard = false) {
tabstoreload.map(n => browser.tabs.reload(n, reloadProperties))
}
/** Reloads all tabs, bypassing the cache if hard is set to true */
//#background
export async function reloadall(hard = false){
let tabs = await browser.tabs.query({})
let reloadprops = {bypassCache: hard}
tabs.map(tab => browser.tabs.reload(tab.id, reloadprops))
}
/** Reload the next n tabs, starting with activeTab. bypass cache for all */
//#background
export async function reloadhard(n = 1) {