File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -65,14 +65,16 @@ class ViewController: NSViewController {
65
65
// update user interface text display
66
66
self . saveLocation. stringValue = url. absoluteString
67
67
self . saveLocation. toolTip = url. absoluteString
68
- // notify browser extension of relevant updates
69
- sendExtensionMessage (
70
- name: " SAVE_LOCATION_CHANGED " ,
71
- userInfo: [
72
- " saveLocation " : url. absoluteString. removingPercentEncoding ?? url. absoluteString,
73
- " returnApp " : true
74
- ]
75
- )
68
+ // notify browser extension of relevant updates only when Safari is running
69
+ if !NSRunningApplication. runningApplications ( withBundleIdentifier: " com.apple.Safari " ) . isEmpty {
70
+ sendExtensionMessage (
71
+ name: " SAVE_LOCATION_CHANGED " ,
72
+ userInfo: [
73
+ " saveLocation " : url. absoluteString. removingPercentEncoding ?? url. absoluteString,
74
+ " returnApp " : true
75
+ ]
76
+ )
77
+ }
76
78
} )
77
79
}
78
80
You can’t perform that action at this time.
0 commit comments