This Automator workflow works perfectly when run from Automator.
However, when launched as a service from a keyboard shortcut, the script generates a timed out error.
The keyboard shortcut is valid. If we map the shortcut to Automator script #2, script #2 runs from the shortcut without issue.
The keyboard shortcut is
tell application "Google Chrome" set allTabs to every tab of front window repeat with aTab in allTabs set curURL to URL of aTab set newURL to my findAndReplaceInText(curURL, "%3F", "?") set URL of aTab to newURL end repeat end tell on findAndReplaceInText(theText, theSearchString, theReplacementString) set AppleScript's text item delimiters to theSearchString set theTextItems to every text item of theText set AppleScript's text item delimiters to theReplacementString set theText to theTextItems as string set AppleScript's text item delimiters to "" return theText end findAndReplaceInText