Skip to content

bl.ocks.org content script #3

Description

@bmershon

The extension can load a content script when a user navigates to an example on bl.ocks.org:

http://bl.ocks.org/bmershon/de2b4be6063c8c6cb525

The following pieces of information seem relevant:

  • Description (e.g., "height-function")
  • Gist ID (e.g., "de2b4be6063c8c6cb525")
  • username (e.g., bmershon)
  • links to Wikipedia articles found in rendered README.md (e.g., Rips Complex)
  • meta tags in index.html
  • Other README.md information?

Here's a straw man convention for a meta tag placed in the Head of index.html:

<meta name="robots" content="noindex,nofollow">
<meta name="wikiblocks" content="index,nocache">
<meta name="tags" content="rips-complex,height function,betti numbers">
<meta name="categories" content="topology">

It's important that any new convention for blocks does not require a change in the bl.ocks.org viewer itself. The use of meta tags is an example of an easily added piece of information which could greatly help the make blocks that illustrate a particular concept able to be easily found.

See #1. Some of the information we need to find on a bl.ocks page requires the rendering of markdown and possibly syntax highlighted code. Mike Bostock uses a Mutation Observer in his bl.ocks.org Chrome extension; that might be a way to ensure the DOM has stabilized before we attempt to find links and other rendered content.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions