We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 842aef7 + 0f3f2bd commit 0e16abbCopy full SHA for 0e16abb
src/focus-tab-webkit.js
@@ -4,10 +4,10 @@ function run(args) {
4
let safari = Application("Safari");
5
let query = args[0];
6
let [windowIndex, url] = query.split(",");
7
+ let window = safari.windows[windowIndex]();
8
9
function getTab() {
10
let result;
- let window = safari.windows[windowIndex];
11
if (window) {
12
for (let index in window.tabs) {
13
let tab = window.tabs[index];
@@ -23,5 +23,8 @@ function run(args) {
23
24
let tab = getTab();
25
safari.activate();
26
- safari.windows[windowIndex].currentTab = tab;
+ window.currentTab = tab;
27
+ // Force tab window to front
28
+ window.visible = false;
29
+ window.visible = true;
30
}
0 commit comments