on run {input, parameters}
tell application "Finder"
if not (get selection) = {} then
set theSelection to (selection as alias list)
else
display alert "Nothing selected in the Finder." giving up after 10
return
end if
end tell
repeat with theFile in theSelection
tell application "Finder" to set extension hidden of theFile to false
end repeat
return input
end run