- Jan 2023
-
developer.mozilla.org developer.mozilla.org
- Dec 2022
-
w3c.github.io w3c.github.io
- Nov 2022
-
chrome.google.com chrome.google.com
-
y330.github.io y330.github.io
Tags
Annotators
URL
-
-
chromestatus.com chromestatus.com
Tags
Annotators
URL
-
-
github.com github.com
-
-
js const { generateFragment } = await import('https://unpkg.com/text-fragments-polyfill/dist/fragment-generation-utils.js'); const result = generateFragment(window.getSelection()); if (result.status === 0) { let url = `${location.origin}${location.pathname}${location.search}`; const fragment = result.fragment; const prefix = fragment.prefix ? `${encodeURIComponent(fragment.prefix)}-,` : ''; const suffix = fragment.suffix ? `,-${encodeURIComponent(fragment.suffix)}` : ''; const textStart = encodeURIComponent(fragment.textStart); const textEnd = fragment.textEnd ? `,${encodeURIComponent(fragment.textEnd)}` : ''; url += `#:~:text=${prefix}${textStart}${textEnd}${suffix}`; console.log(url); }
Tags
Annotators
URL
-
- Aug 2022
- May 2022
-
github.com github.com
-
We use the Web Annotation Protocol to sync bookmarks and last reading position across devices. At a glance it covers all the use cases here, and it's a well-defined protocol with multiple independent implementations. In particular, WAP defines a relation for discovery. Here's how we link to the annotation endpoint for a specific book in an OPDS 1.2 feed. Note the distinctive link relation and media type:
xml <link href="https://circulation.librarysimplified.org/NYNYPL/annotations/Gutenberg%20ID/40278/" type="application/ld+json; profile="http://www.w3.org/ns/anno.jsonld"" rel="http://www.w3.org/ns/oa#annotationService"/>
-
-
idpf.org idpf.org
-
A Canonical Fragment Identifier (CFI) is a similar construct to these, but expresses a location within an EPUB Publication. For example:
book.epub#epubcfi(/6/4[chap01ref]!/4[body01]/10[para05]/3:10)
Tags
Annotators
URL
-
- Apr 2022
-
datatracker.ietf.org datatracker.ietf.org
-
IMAP URL for text fragment
``` The URL: <imap://minbari.example.org/gray-council;UIDVALIDITY=385759045/; UID=20/;PARTIAL=0.1024>
may result in the following client commands and server responses:
<connect to minbari.example.org, port 143> S: * OK [CAPABILITY IMAP4rev1 STARTTLS AUTH=ANONYMOUS] Welcome C: A001 AUTHENTICATE ANONYMOUS S: + C: c2hlcmlkYW5AYmFieWxvbjUuZXhhbXBsZS5vcmc= S: A001 OK Welcome sheridan@babylon5.example.org C: A002 SELECT gray-council <client verifies the UIDVALIDITY matches> C: A003 UID FETCH 20 BODY.PEEK[]<0.1024> ```
ABNF:
abnf partial-range = number ["." nz-number] ; partial FETCH. The first number is ; the offset of the first byte, ; the second number is the length of ; the fragment.
-
-
mgearon.com mgearon.com
Tags
Annotators
URL
-
-
-
-
wicg.github.io wicg.github.io
- May 2021
-
stackoverflow.com stackoverflow.com
-
What I am attempting to do is to highlight a div with a certain id, when It has been referred to by an anchor on another page IE: User clicks link href="qw.html#test", when the page is loaded, then the div with the id="test" is highlighted so that the user can see it clearly.
-
You need to use the :target pseudo-class: :target { background-color: #ffa; }
-
-
mgearon.com mgearon.com