Created
March 6, 2015 07:34
-
-
Save anonymous/7e6006cfba224e10933b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on replace_chars(this_text, search_string, replacement_string) | |
set AppleScript's text item delimiters to the search_string | |
set the item_list to every text item of this_text | |
set AppleScript's text item delimiters to the replacement_string | |
set this_text to the item_list as string | |
set AppleScript's text item delimiters to "" | |
return this_text | |
end replace_chars | |
tell application "Google Chrome" | |
set theName to name of active tab of front window | |
set theURL to URL of active tab of front window | |
set theURL to my replace_chars(theURL, "%", "%%%") | |
return "[ %| ](" & theURL & ")" | |
end tell |
beomjunshin-ben
commented
Mar 6, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment