4,233 Matching Annotations
  1. Apr 2015
    1. var baseUrl = document.createElement('link'); baseUrl.rel = 'sidebar'; baseUrl.href = '{{ app_uri or request.resource_url(context, 'app.html') }}'; baseUrl.type = 'application/annotator+html'; document.head.appendChild(baseUrl);

      Finally, we inject a <link rel="sidebar" type="application/annotator+html" href=".../app.html"> into the <head> of the document. This is the HTML page for the contents of the sidebar/iframe. This link will be picked up by hypothesis.js later.

    2. if (resources.length) { var url = resources.shift(); var ext = url.split('?')[0].split('.').pop(); var fn = (ext === 'css' ? injectStylesheet : injectScript); fn(url, next); }

      This loop is where we actually call injectScript() or injectStylesheet() on each of the resource URLs defined above.

    3. var injectStylesheet = inject.stylesheet || function injectStylesheet(href, fn) {

      hypothesisInstall() will use the inject.stylesheet() function passed in to it to inject stylesheets into the page or, if no function was passed in, it'll fallback on the default function defined inline here.

      The default method just uses the DOM's appendChild() method, but this method may fail if the site we're trying to annotate uses the Content Security Policy.

      That's why when we're using one of the browser plugins rather than the bookmarklet, we pass in the browser API's method for injecting a stylesheet instead.

      This is why the bookmarklet doesn't currently work on GitHub, for example, but the Chrome plugin does.

    4. embed.js

      embed.js is responsible for "embedding" the different components of the Hypothesis frontend application into the page.

      First, either bookmarklet.js or one of the browser plugins injects a <script> tag to embed.js into the page, then embed.js runs.

      This way the code in embed.js is shared across all bookmarklets and browser plugins, and the bookmarklets and plugins themselves have very little code.

  2. Mar 2015
  3. Feb 2015
    1. Questions

      Sorry cannot read the questions in full as I cannot get my sidebar to collapse. I cannot speak for developers but from my perspective the page-based group seems a good starter because it seems more straight forward and is less likely to change in the future but still shows off a hint of the full capabilities of hypothesis.

    1. I have not explained this part well. It is important so I will try again. In my opinion the way groups are set up is crucial to the development of reputation for annotators on Hypothesis. Annotators’ reputations will be strongly related to the Groups they belong. Trusted groups will need to have private annotator membership that is extended by invitation only but these groups need to be able to choose between public or private readership. Other groups will have different requirements for annotators and readers in terms of the public, private, link mix. Bridge

  4. Dec 2014
    1. Trying to embed something in here from the atlantic article

      <iframe width="640" height="360" frameborder="0" webkitallowfullscreen="webkitallowfullscreen" allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen" src="&lt;a href=" http:="" <a="" href="http://www.theatlantic.com" target="_blank" rel="nofollow noopener">www.theatlantic.com="" video="" iframe="" 384088="" "="" target="_blank" rel="nofollow noopener">http://www.theatlantic.com/video/iframe/384088/"></iframe> OK, that didn't work. How about a YouTube vid? <iframe width="640" height="360" src="//&lt;a href=" http:="" <a="" href="http://www.youtube.com" target="_blank" rel="nofollow noopener">www.youtube.com="" embed="" VX07m-wahOg"="" target="_blank" rel="nofollow noopener">www.youtube.com/embed/VX07m-wahOg" frameborder="0" allowfullscreen=""></iframe> OK, not embeds work so far. Not even images. Inserting images using the image url just gives you a link. Was hoping for the actual image.

  5. May 2014
  6. Apr 2014
  7. Feb 2014
    1. If the Riemann hypothesis is true, Im tn = 0 for all n, and the function f(u), constructed from the primes, has a discrete spectrum; that is, the support of its Fourier transform is discrete. If the Riemann hypothesis is false, this is not the case. The frequencies tn are reminiscent of the decomposition of a musical sound into its constituent harmonics. Therefore there is a sense in which we can give a one-line nontechnical statement of the Riemann hypothesis: "The primes have music in them."

      The frequencies are reminiscent of the decomposition of a musical sound into its constituent harmonics; the primes have music in them.

    1. For example, imagine you are annotating the second page of a New York Times article. You probably want to see your annotation when you are looking at the article later as a single page, right? Or perhaps you've annotated the HTML for a PLOS ONE article. Wouldn't you like to see those annotations when you are looking at the PDF version of the same article? If annotations were only associated with the URL you happened to be looking at in your browser then the scenarios above would not work, because the documents being annotated all have different URLs.

      Publisher Best Practices is a great idea that I would like to see codified in the authoring and publishing tools to make the practices commonplace by default.

      I would like to mix PBP with other techniques, though, for richer connection between source and rendering-- I have some source mapping ideas that make it possible to keep annotations linked even as the original source is edited over time.

    1. As far as I know, the major concerns of Zotero are: Storing and searching items in a library Assigning user-supplied metadata to these items Exporting the metada in some common bibliogaphic formats Additional, it appears Zotero allows to store notes. So what's the relationship to h? To the extent notes in Zotero can accommodate the richness of an annotation, it could be a storage backend for h. Notes are page-level annotations, at least. We could allow Zotero users with existing libraries to import their notes as annotations.

      The question "So what's the relationship to h?" is a good one here; in particular, where does h end and other services/apps begin? I have quite a few thoughts in this area, including possible h spin-off companies, but my first interest in thinking about integrating it with other services is more from a strategic engineering perspective: what are the best places to focus h development so that it fits that composable unix-y philosophy of "do one thing well"; and I translate that thinking from tool to person... how can h help me do one thing well? As an end-user, even though I am admittedly a power-user with a lot of tools, I actually want to use as few tools as possible. The browser-extension part of h is the single most important part of the project from my end-user perspective-- the back-end infrastructure is there to support the browser-extension doing one thing well.

      The one thing I want h to do for me that I can't do with any other tool that I know of is to allow me to rapidly track my reading and thinking and note-taking habits together. I want to be able to quickly select multiple portions of text and apply commentary and tags to the text within particular activity-based or goal-based contexts. The last part of that thought is the essential element I need that is missing. Speeding up the text selection would be very helpful in making it a tool I want to use on a daily basis for everything I do, but the contexts feature is what will make h a killer app for me.

  8. Oct 2013