https://github.com/GoogleChromeLabs/link-to-text-fragment
Browser extension that allows for linking to arbitrary text fragments.
https://github.com/GoogleChromeLabs/link-to-text-fragment
chrome-extension chrome-extensions fragment-directive scroll-to-text-fragment text-fragment text-fragment-url text-fragments
Last synced: 4 months ago
JSON representation
Browser extension that allows for linking to arbitrary text fragments.
- Host: GitHub
- URL: https://github.com/GoogleChromeLabs/link-to-text-fragment
- Owner: GoogleChromeLabs
- License: apache-2.0
- Created: 2020-05-04T13:38:17.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-06-18T00:31:57.000Z (8 months ago)
- Last Synced: 2024-07-10T19:27:33.228Z (8 months ago)
- Topics: chrome-extension, chrome-extensions, fragment-directive, scroll-to-text-fragment, text-fragment, text-fragment-url, text-fragments
- Language: JavaScript
- Homepage: https://chrome.google.com/webstore/detail/link-to-text-fragment/pbcodcjpfjdpcineamnnmbkkmkdpajjg
- Size: 1.61 MB
- Stars: 384
- Watchers: 18
- Forks: 34
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Link to Text Fragment
- 📖 Article: https://web.dev/text-fragments/
- 🧩 Extension: https://chrome.google.com/webstore/detail/link-to-text-fragment/pbcodcjpfjdpcineamnnmbkkmkdpajjg
- 🎬 Demo video: https://www.youtube.com/watch?v=Y5DmGqnzvBI## Installation
You can install the extension in your browser of choice:
- Google Chrome: [Link to Text Fragment extension](https://chrome.google.com/webstore/detail/link-to-text-fragment/pbcodcjpfjdpcineamnnmbkkmkdpajjg)
- Microsoft Edge: [Link to Text Fragment extension](https://microsoftedge.microsoft.com/addons/detail/link-to-text-fragment/pmdldpbcbobaamgkpkghjigngamlolag)
- Mozilla Firefox: [Link to Text Fragment extension](https://addons.mozilla.org/firefox/addon/link-to-text-fragment/)
- Apple Safari: [Link to Text Fragment extension](https://apps.apple.com/app/link-to-text-fragment/id1532224396?l=en&mt=12)## Usage
The Link to Text Fragment extension allows for the easy creation
of text fragment URLs via the context menu:1. Select the text that you want to link to.
1. Right-click and choose "Copy Link to Selected Text" from the context menu.
1. If the link creation succeeded, the selected text will be briefly highlighted in yellow.
1. Paste your link wherever you want to share it.
## Background
The [Text Fragments specification](https://wicg.github.io/ScrollToTextFragment/)
adds support for specifying a text snippet in the URL fragment.```
#:~:text=[prefix-,]textStart[,textEnd][,-suffix]
```When navigating to a URL with such a fragment, the user agent can quickly
emphasize and/or bring it to the user's attention.Try it out by clicking on this link:
https://wicg.github.io/scroll-to-text-fragment/#ref-for-fragment-directive:~:text=%23%3A~%3Atext%3D%5Bprefix%2D%2C%5DtextStart%5B%2CtextEnd%5D%5B%2C%2Dsuffix%5D.## Acknowledgements
Text Fragments was implemented and specified by
[Nick Burris](https://github.com/nickburris)
and [David Bokan](https://github.com/bokand),
with contributions from [Grant Wang](https://github.com/grantjwang).
The extension icon is courtesy of [Rombout Versluijs](https://twitter.com/romboutv).## License
The extension's source code is licensed under the terms of the Apache 2.0 license.
This is not an official Google product.
By installing this item, you agree to the Google Terms of Service and Privacy Policy at
https://www.google.com/intl/en/policies/.