barcode-utils/webextension-tabfocus/tabfocus_background.js

5 lines
199 B
JavaScript
Raw Permalink Normal View History

browser.runtime.onMessage.addListener((request, sender, responsewi) => {
browser.tabs.update(sender.tab.id, {active: true});
browser.windows.update(sender.tab.windowId, {focused: true});
});