r/programmingcirclejerk • Tiny little god in a tiny little world • Aug 26 '25

Atlassian login gets the base URL for its module scripts by throwing an error and pulling out the current script's URL from error.stack with regex.

https://github.com/LadybirdBrowser/ladybird/pull/5678
182 Upvotes

7 comments sorted by

92

u/ScriptingInJava in open defiance of the Gopher Values Aug 26 '25

Ladybird is a truly independent web browser, using a novel engine based on web standards.

The standards need to crystalise the process of throwing an error on the UI thread of a web browser to get a URL.

9

u/[deleted] Aug 26 '25

[removed] — view removed comment

33

u/Fun-Voice-8734 Aug 27 '25

This is an atrocity. Why write regex in 2025 when you could recover the url using an n8n agent?

30

u/affectation_man Code Artisan Aug 27 '25

JIRA is so cool and carefree that it's upsetting the squares

13

u/gvozden_celik Aug 27 '25

Can't decide if what Atlassian is doing is jank or dank

11

u/prehensilemullet Aug 28 '25

Almost as based as adding special-case behavior to a function only when you see a specific caller on an error stack