Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlobBuilder Update #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ GitHub is one of the most popular places to host open source code, because it's
Quick start
-----------

HTML5 Hacks Chapter 3 is a simple, Node.js application.
HTML5 Hacks Chapter 8 is a simple, Node.js application.

## Getting the Hacks

Expand Down Expand Up @@ -68,4 +68,4 @@ Start the chapter8 demo server from a different terminal window:
$ node app
</pre>

Visit [http://localhost:3000](http://localhost:3000) in a web browser.
Visit [http://localhost:3000](http://localhost:3000) in a web browser.
11 changes: 7 additions & 4 deletions views/inline.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,18 @@ <h2>Top 10 Jam Bands by talking_about_count</h2>
<script>
// Creating the BlobBuilder and adding our Web Worker code to it.
//new BlobBuilder();
var bb = new (window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder )();
bb.append(document.querySelector('#worker1').textContent);

//var bb = new (window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder )();
//bb.append(document.querySelector('#worker1').textContent);
// Above codes are obsoleted for latest specification
var tContent = document.querySelector('#worker1').textContent;
var blob = new Blob([tContent]);
// creates a simple URL string which can be used to reference
// data stored in a DOM File / Blob object.
// Psss... In Chrome, there's a nice page to view all of the
// created blob URLs: chrome://blob-internals/
var objUrl = (window.webkitURL || window.URL);
var worker = new Worker(objUrl.createObjectURL(bb.getBlob()));
//var worker = new Worker(objUrl.createObjectURL(bb.getBlob()));
var worker = new Worker(objUrl.createObjectURL(blob));

//Set Url of JSON data from the facebook graph api. make sure callback is set with a '?' to overcome the cross domain problems with JSON
var url = "https://graph.facebook.com/?ids=TheFlecktones,umphreysmcgee,govtmule,Phish,StringCheeseIncident,Moe.org,LeftoverSalmon,Prettylights,DarkStarOrchestra,YonderMountain&callback=?";
Expand Down
2 changes: 1 addition & 1 deletion views/jsonp.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ <h2>Regular</h2>
Html5Hacks={};
Html5Hacks.twitter={};
Html5Hacks.makeRequest=function(){
var url='http://search.twitter.com/search.json?q=html5&rpp=100&since_id=1';
var url='https://api.twitter.com/1.1/search/tweets.json?q=html5&count=100&since_id=1';
scriptElement = document.createElement("SCRIPT");
scriptElement.type = "text/javascript";
scriptElement.src = url + "&callback=Html5Hacks.twitter.back";
Expand Down