Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Support for longer Gist ids.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Mar 29, 2016
1 parent 5d800d9 commit 0526df1
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 4 deletions.
Binary file modified chrome/bl.ocks.chrome.crx
Binary file not shown.
2 changes: 1 addition & 1 deletion chrome/bl.ocks.chrome/blocks.js
Expand Up @@ -13,7 +13,7 @@ function redraw() {
id = parts[1],
sha = parts[2];
if (!user || user.length > 39 || !/^[a-z0-9](?:-?[a-z0-9])*$/i.test(user)) return;
if (!/^([0-9]+|[0-9a-f]{20})$/.test(id)) id = null;
if (!/^([0-9]+|[0-9a-f]{20,})$/.test(id)) id = null;
if (!/^[0-9a-f]{40}$/.test(sha)) sha = null;

var anchor = container.querySelector(".bl-ocks-button"),
Expand Down
2 changes: 1 addition & 1 deletion chrome/bl.ocks.chrome/manifest.json
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "bl.ocks.org",
"version": "1.3.9",
"version": "1.3.10",
"short_name": "bl.ocks",
"description": "View any gist on bl.ocks.org.",
"icons": {"128": "icon-128.png"},
Expand Down
Binary file modified firefox/bl.ocks.firefox.xpi
Binary file not shown.
2 changes: 1 addition & 1 deletion firefox/content/blocks.js
Expand Up @@ -18,7 +18,7 @@ window.addEventListener("load", function load() {
id = parts[1],
sha = parts[2];
if (!user || user.length > 39 || !/^[a-z0-9](?:-?[a-z0-9])*$/i.test(user)) return;
if (!/^([0-9]+|[0-9a-f]{20})$/.test(id)) id = null;
if (!/^([0-9]+|[0-9a-f]{20,})$/.test(id)) id = null;
if (!/^[0-9a-f]{40}$/.test(sha)) sha = null;

var anchor = container.querySelector(".bl-ocks-button"),
Expand Down
2 changes: 1 addition & 1 deletion firefox/install.rdf
Expand Up @@ -4,7 +4,7 @@
<Description about="urn:mozilla:install-manifest">
<em:id>extension@bl.ocks.org</em:id>
<em:name>bl.ocks.org</em:name>
<em:version>1.3.9</em:version>
<em:version>1.3.10</em:version>
<em:type>2</em:type>
<em:description>View any gist on bl.ocks.org.</em:description>
<em:creator>Mike Bostock</em:creator>
Expand Down

0 comments on commit 0526df1

Please sign in to comment.