Permalink
Browse files

implemented hard refresh command, resolves #37

  • Loading branch information...
eejdoowad committed Sep 8, 2017
1 parent 5632c36 commit a640f33a8dfc0a53b3524790c18cccf39bae0bcd
@@ -152,6 +152,12 @@ export async function refreshAllTabs () {
}));
}
/** Hard refreshes the active tab of the current window */
export async function hardRefreshTab () {
const [tab] = await browser.tabs.query({ currentWindow: true, active: true });
await browser.tabs.reload(tab.id, { bypassCache: true });
}
/** Toggle the mute state of the active tab of the current window */
export async function toggleMuteTab () {
const [tab] = await browser.tabs.query({ currentWindow: true, active: true });
@@ -22,6 +22,7 @@ export const zoomOut = background('zoomOut');
export const zoomReset = background('zoomReset');
export const refreshTab = background('refreshTab');
export const refreshAllTabs = background('refreshAllTabs');
export const hardRefreshTab = background('hardRefreshTab');
export const toggleMuteTab = background('toggleMuteTab');
export const toggleMuteAllTabs = background('toggleMuteAllTabs');
export const togglePinTab = background('togglePinTab');
export const togglePinTab = background('togglePinTab');
@@ -305,6 +305,12 @@
"key": "refreshAllTabs",
"default": []
},
{
"type": "keybinding",
"label": "Hard Refresh Tab (bypassing cache)",
"key": "hardRefreshTab",
"default": []
},
{
"type": "header",
"label": "Switch Tabs"
@@ -160,6 +160,9 @@
"refreshAllTabs": [
[{ "code": "KeyR", "key": "r" }, { "code": "KeyR", "key": "R", "shiftKey": true }]
],
"hardRefreshTab": [
[{ "code": "KeyR", "key": "R", "shiftKey": true }, { "code": "KeyR", "key": "R", "shiftKey": true }]
],
"toggleMuteTab": [
[{ "code": "KeyM", "key": "m" }]
],
@@ -357,6 +360,9 @@
],
"refreshAllTabs": [
[{ "code": "KeyR", "key": "R", "shiftKey": true }]
],
"hardRefreshTab": [
],
"toggleMuteTab": [
[{ "code": "KeyM", "key": "m" }]
@@ -545,6 +551,8 @@
"refreshAllTabs": [
[{ "code": "KeyT", "key": "T", "shiftKey": true }]
],
"hardRefreshTab": [
],
"toggleMuteTab": [
[{ "code": "KeyM", "key": "m" }]
],
@@ -719,6 +727,9 @@
[{ "code": "KeyR", "key": "r" }]
],
"refreshAllTabs": [
],
"hardRefreshTab": [
],
"toggleMuteTab": [
[{ "code": "KeyM", "key": "µ", "altKey": true }]

0 comments on commit a640f33

Please sign in to comment.