Skip to content

Commit

Permalink
Copy URL to clipboard command
Browse files Browse the repository at this point in the history
  • Loading branch information
mltony committed Dec 15, 2024
1 parent 8726ad2 commit 8de2816
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion addon/globalPlugins/browserNav/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1764,4 +1764,12 @@ def injectBrowseModeKeystrokes(self):
def script_speakCurrentURL(self, gesture):
#url = getFocusedURL()
url = api.getCurrentURL()
ui.message(url)
if url is None:
ui.message(_("No URL"))
return
count=scriptHandler.getLastScriptRepeatCount()
if count >= 1:
api.copyToClip(url)
ui.message(_("Copied to clipboard: {}").format(url))
else:
ui.message(url)

0 comments on commit 8de2816

Please sign in to comment.