To get the URL of the current page until the first bar /
after the domain:
javascriptlet url = `${location.protocol}//${location.host}`; // https://erikmartinjordan.com
Hi, I'm Erik, an engineer from Barcelona. If you like the post or have any comments, say hi.