@CMx3 is point you in the right direction.
If you just want to alter the existing action to send different text, you would alter the URL template with different template tags. In your case the most useful possible options are [[selection]]
which sends only the selected text, or [[line]]
which sends the current line the cursor is on (saves needing to make a selection).
You might also look at more advanced examples that can work off markup in your text, like the Things Parser.