# Hookmark Script for Microsoft Edge
## Metadata
**Status**:: #x
**Zettel**:: #zettel/permanent
**Created**:: [[2023-04-12]]
**Topic**:: [[♯ Hookmark]]
## Get Address
Uniform the task link for Todoist.
```applescript
tell application "Microsoft Edge"
set mytab to active tab of window 1
set aTitle to title of mytab
set aURL to URL of mytab
if aURL starts with "https://todoist.com/" then
set oldDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to {"/task/"}
set theList to every text item of aURL
set AppleScript's text item delimiters to oldDelimiters
if (count of theList) is 2 then
set theTaskId to the last item of theList
if theTaskId ends with "/0" then
set AppleScript's text item delimiters to {"/"}
set theTaskId to the first text item of theTaskId
set AppleScript's text item delimiters to oldDelimiters
end if
set aURL to "https://todoist.com/app/task/" & theTaskId
end if
end if
return "[" & aTitle & "](" & aURL & ")"
end tell
```