tomayac’s avatartomayac’s Twitter Archive—№ 15,128

  1. …in reply to @Errioxa
    @Errioxa @berengueremilio js const selectedText = getSelection().toString(); const newUrl = new URL(location); newUrl.hash = :~:text=${encodeURIComponent(selectedText)}; ⬆️ This code simply takes the currently selected text for the URL, w/o making sure the link is unique. x.com/tomayac/status/1273314652315934722