bugy / script-server

Web UI for your scripts with execution management
Other
1.59k stars 247 forks source link

Feature request: support target="_blank" for links in terminal output #725

Open rwalkerands opened 10 months ago

rwalkerands commented 10 months ago

The function terminal_view.js/createTextAndAnchorElements() auto-links URLs for the terminal output pane when using terminal as the output_format.

It'd be nice to have an option (e.g., per-runner?) to add target="_blank" to the <a> elements generated by this function.

(Yes, this can be achieved by using "output_format": "html" and scripting one's own conversion to HTML. But that's somewhat less convenient.)

MNeill73 commented 10 months ago

"(Yes, this can be achieved by using "output_format": "html" and scripting one's own conversion to HTML. But that's somewhat less convenient.)"

No, it can't - the output formatter overrides the _blank directive. At least, prior to 1.18 this was the case, as I found in several of my scripts...

On Sun, Dec 3, 2023, 10:42 PM Richard Walker @.***> wrote:

The function terminal_view.js/createTextAndAnchorElements() auto-links URLs for the terminal output pane when using terminal as the output_format .

It'd be nice to have an option (e.g., per-runner?) to add target="_blank" to the elements generated by this function.

(Yes, this can be achieved by using "output_format": "html" and scripting one's own conversion to HTML. But that's somewhat less convenient.)

— Reply to this email directly, view it on GitHub https://github.com/bugy/script-server/issues/725, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HBI3QCG44GXCGNK64KT5DYHVBD5AVCNFSM6AAAAABAFKCWPWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGAZDEOJVGY3TCMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

rwalkerands commented 10 months ago

I stand corrected, retract the last paragraph, and thank you for the heads-up that has saved me some time.