WesleyAC/deeplinks
WesleyAC/deeplinks has 516 GitHub stars and 11 forks. GitHot measured 0 stars in 24 hours, +1 in 7 days, and 0 in 15 days. Last checked 2026-11-12 20:23 UTC. Last push 2026-02-07.
측정된 스타 증가
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- 0
- in 1 month
- 업데이트 지연
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
소개
Simple deep links to any selection of text on your website.
웹 및 앱README.md
Originaldeeplinks.js
deeplinks.js allows people to easily link directly to any text selection on your website. Here's an example of what one of these links looks like. It's intended mostly for blogs and other such websites, but it's relatively agnostic to the environment it's running in.
People can select text on the site as the normally would, and when they do, the fragment identifier (the thing that comes after the # in the URL) changes. If they want to share the text they have selected, they simply copy the URL and send it to someone. When that person visits the URL, the same text that was originally selected will be selected and scrolled into view.
This description might make it sound a little complicated, but it's actually pretty simple and intuitive once you play with it — go check it out! If you're interested in knowing the details of how it works under the hood, check out docs/design/.
Goals
- Plug-and-play. Copy the files, drop
<script type="module" src="/deeplinks/deeplinks.js"></script>in your website, and it works. - Robust. Updates will not break links to older URLs.
- Short links. Long URLs are ugly and frequently mangled by messaging apps. URLs should be short and not contain characters likely to be mangled by misbehaving apps.
- Subtle. It shouldn't get in the reader's way. It doesn't break normal fragment-identifier links.
- Reasonably small. It's around 1.7kb gzipped right now (1.6kb brotli), and shouldn't grow too much more.
- Fast. This isn't hard, but it's worth making explicit.
Non-goals
- Handling frequently-changing content, such as wikis. It should be robust to occasional small edits, but if you want truly robust deep linking, you really need support from the authoring environment (CRDTs, etc).
- Working for every usecase. I have specific things that I want in a script like this, and other people will have other things they want. Those people should build their own similar scripts — diversity is good! For instance, this intentionally does not implement the WICG Text Fragment interface, although it's possible it may in the future if that ends up standardized in a form that I like.
Installation
First, consider whether you really want to do this. If you do, you are making new URLs, which will break if you ever remove the script from your site. Breaking URLs makes me sad, so you should think about whether you're really committed to this or not, and maybe play with it locally for a little while to see how it feels before you really deploy it.
Once you're sure:
- Download the most recent release from the releases page.
- Extract the zip file somewhere in your website.
- Include the script anywhere in your html:
This assumes you extracted the release into a directory called<script type="module" src="/deeplinks/deeplinks.js"></script>deeplinks— you'll need to change thesrcif you put it somewhere else. Make sure you include thetype="module", it won't work otherwise! You should only include it on pages that won't change frequently — particularly, don't include it on pagination pages where the content changes as you publish new posts, for instance. - Test that it works.
- If you're feeling nice, fill out this form with a link to your website! (Or just email me, if you don't like Google Forms)
관련 프로젝트 살펴보기
freeCodeCamp/freeCodeCamp
freeCodeCamp.org의 오픈 소스 코드베이스와 커리큘럼입니다. 수학, 프로그래밍, 컴퓨터 과학을 무료로 배울 수 있습니다.
459,084 스타donnemartin/system-design-primer
대규모 시스템 설계 방법을 배우고 시스템 설계 면접을 준비할 수 있습니다. Anki 플래시카드가 포함되어 있습니다.
377,763 스타react/react
웹과 네이티브 사용자 인터페이스를 위한 라이브러리.
252,576 스타vuejs/vue
Vue 2 저장소입니다. Vue 3은 https://github.com/vuejs/core를 방문하세요.
212,527 스타