# Hookmark Script for Google Chrome
## Metadata
**Status**:: #x
**Zettel**:: #zettel/permanent
**Created**:: [[2022-10-05]]
**Topic**:: [[♯ Hookmark]]
## Get Address
Uniform the task link for Todoist.
```applescript
tell application "Google Chrome"
set theURL to the URL of active tab of front window
if theURL 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 theURL
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
return "https://todoist.com/app/task/" & theTaskId
end if
end if
return theURL
end tell
```