Skip to content

Instantly share code, notes, and snippets.

View formido's full-sized avatar
🥰

Michael Terry formido

🥰
View GitHub Profile
// Workaround for https://github.com/highslide-software/highcharts.com/issues/3385
// Uses default bootstrap media query sizes.
// display_heatmap is a function that displays the heatmap once the map data has been downloaded.
// Requires enquire.js (http://wicky.nillia.ms/enquire.js/)
// Download map data and save the jqXHR promise.
var states_promise = jQuery.getJSON('http://blog.statricks.com/media/system/maps/US.min.json', {});
// Use enquire to re-render the heatmap if we change browser width
var urls = [
/* Attempt to contact emacs web server from outer context */
'http://localhost:8080/skewer',
/* Wildcard CORS enabled - Works in PhantomJS 1.9.0 */
'http://updates.html5rocks.com',
/* CORS disabled - Fails in PhantomJS 1.9.0 (and every other version) */
'http://www.google.com',
/* Hack workaround? */
/*
function(httpGet, callback) {