The same thing can also be achieved via a workflow component as follows:

  • add a conditional block after the “Current Front Browser Tab”
  • detect an empty string and then run an osacript with the following command

Source: Teaching Alfred about the Helium Browser // @gurupanguji

Follow up: You should also add a “Transform” block to “Trim Whitespace” else applescript adds a \n character when it provides an output causing some browsers to add that back as a %0A.