News for hackers. Stuff that matters.

jfhr

> You're supposed to address this by adding the base URL on the end, but then correctly obtaining that can be brittle.

Isn't that what document.baseURI is for? At least that's my understanding:

new URL("/whatever", document.baseURI)

Re:Mastering DOM manipulation with vanilla JavaScript on Monday November 06, 2023 @10:35AM (#38163949)
Unless you need to support ancient browsers [1], I'd go the easy way and leave the URL parsing to the browser, e.g. `['http:', 'https:', 'mailto:', 'tel:'].includes(new URL(value, location.origin).protocol)`

[1] https://caniuse.com/url

Re:Debian 12 “Bookworm” Released on Saturday June 10, 2023 @09:40AM (#36270377)
> The new systemd-resolved package will not be installed automatically on upgrades as it has been split into a separate package. If using the systemd-resolved system service, please install the new package manually after the upgrade, and note that until it has been installed, DNS resolution may no longer work as the service will not be present on the system.

will installing over the internet work without DNS resolution?

Re:No Screens Cafe on Sunday May 21, 2023 @03:54PM (#36024179)
what about tumblr? that's where seemingly a lot of former twitter users are moving to
Re:Dear grocery store owners: I don’t work for you on Sunday November 06, 2022 @05:30PM (#33498164)
just wait until he hears about vending machines.
Re:I Write Like checks which famous writer you write like on Friday November 04, 2022 @02:05PM (#33471245)
Interestingly I got Doctorow too for (technical) blog posts. For fiction stories it gave me: James Joyce, Arthur Clarke, and Kurt Vonnegut.
Re:Optimizing Images with the HTML Tag on Sunday October 30, 2022 @03:03PM (#33397497)
yeah I should've thought of that. fixed it now