Skip to content

Commit

Permalink
lastFocusedWindow: true, as suggested in #5
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalik Gordon committed Dec 9, 2020
1 parent 5f7683c commit 640c3d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hot-reload.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const reload = () => {
permissions: ["activeTab"]
}, granted => {
if (granted) {
chrome.tabs.query ({ active: true, currentWindow: true }, tabs => { // NB: see https://github.com/xpl/crx-hotreload/issues/5
chrome.tabs.query ({ active: true, lastFocusedWindow: true }, tabs => { // NB: see https://github.com/xpl/crx-hotreload/issues/5
if (tabs[0]) {
chrome.tabs.executeScript (tabs[0].id, { code: 'setTimeout(() => { location.reload() }, 300)' }, () => {})
chrome.runtime.reload ()
Expand Down

0 comments on commit 640c3d8

Please sign in to comment.