Skip to content

Commit

Permalink
AlfredBookmarklet: Use windows.currentTab instead of documents
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorgalvao committed Mar 23, 2021
1 parent f4da81e commit 5c0a255
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file modified AlfredBookmarklet/AlfredBookmarklet.alfredworkflow
Binary file not shown.
4 changes: 2 additions & 2 deletions AlfredBookmarklet/source/info.plist
Expand Up @@ -102,7 +102,7 @@ const webkit_variants = ['Safari', 'Webkit']
if (chromium_variants.some(app_name => frontmost_app_name.startsWith(app_name))) {
frontmost_app.windows[0].activeTab.url = 'javascript:' + bookmarklet_code
} else if (webkit_variants.some(app_name => frontmost_app_name.startsWith(app_name))) {
frontmost_app.doJavaScript(bookmarklet_code, { in: frontmost_app.documents[0] })
frontmost_app.doJavaScript(bookmarklet_code, { in: frontmost_app.windows[0].currentTab })
} else {
throw new Error('You need a supported browser as your frontmost app')
}</string>
Expand Down Expand Up @@ -356,7 +356,7 @@ Lastly, edit the workflow’s details and its icon. For completeness it’s pre-
</dict>
</dict>
<key>version</key>
<string>20.2</string>
<string>21.1</string>
<key>webaddress</key>
<string>http://vitorgalvao.com/</string>
</dict>
Expand Down

0 comments on commit 5c0a255

Please sign in to comment.