Giter VIP home page Giter VIP logo

googlechromelabs / link-to-text-fragment Goto Github PK

View Code? Open in Web Editor NEW
376.0 18.0 34.0 1.58 MB

Browser extension that allows for linking to arbitrary text fragments.

Home Page: https://chrome.google.com/webstore/detail/link-to-text-fragment/pbcodcjpfjdpcineamnnmbkkmkdpajjg

License: Apache License 2.0

JavaScript 98.42% HTML 1.58%
text-fragments text-fragment text-fragment-url fragment-directive chrome-extension chrome-extensions scroll-to-text-fragment

link-to-text-fragment's Introduction

Link to Text Fragment

Installation

You can install the extension in your browser of choice:

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.
  2. Right-click and choose "Copy Link to Selected Text" from the context menu.
  3. If the link creation succeeded, the selected text will be briefly highlighted in yellow.
  4. Paste your link wherever you want to share it.

Text fragment selected on a webpage and contextmenu showing "Copy Link to Selected Text"

Background

The Text Fragments specification 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 and David Bokan, with contributions from Grant Wang. The extension icon is courtesy of Rombout Versluijs.

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/.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.