Skip to content
This repository has been archived by the owner on Aug 2, 2019. It is now read-only.

Commit

Permalink
Merge pull request #133 from dennisobrien/master
Browse files Browse the repository at this point in the history
Load external JS libraries using the current protocol
  • Loading branch information
wrobstory committed Jan 26, 2015
2 parents 4fc4a56 + 64f7922 commit 3245adc
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
8 changes: 4 additions & 4 deletions tests/vega_template.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<html>
<head>
<title>Vega Scaffold</title>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<script src="http://d3js.org/d3.geo.projection.v0.min.js" charset="utf-8"></script>
<script src="http://trifacta.github.com/vega/vega.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min.js" charset="utf-8"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/topojson/1.6.9/topojson.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3-geo-projection/0.2.9/d3.geo.projection.min.js" charset="utf-8"></script>
<script src="//wrobstory.github.io/vega/vega.v1.3.3.js"></script>
</head>
<body>
<div id="vis"></div>
Expand Down
8 changes: 4 additions & 4 deletions vega_template.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<html>
<head>
<title>Vega Scaffold</title>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<script src="http://d3js.org/d3.geo.projection.v0.min.js" charset="utf-8"></script>
<script src="http://trifacta.github.com/vega/vega.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min.js" charset="utf-8"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/topojson/1.6.9/topojson.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3-geo-projection/0.2.9/d3.geo.projection.min.js" charset="utf-8"></script>
<script src="//wrobstory.github.io/vega/vega.v1.3.3.js"></script>
</head>
<body>
<div id="vis"></div>
Expand Down
14 changes: 7 additions & 7 deletions vincent/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def initialize_notebook():
load_lib = """
function vct_load_lib(url, callback){
if(typeof d3 !== 'undefined' &&
url === 'http://d3js.org/d3.v3.min.js'){
url === '//cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min.js'){
callback()
}
var s = document.createElement('script');
Expand All @@ -52,10 +52,10 @@ def initialize_notebook():
);
"""
lib_urls = [
"'http://d3js.org/d3.v3.min.js'",
"'http://d3js.org/d3.geo.projection.v0.min.js'",
"'http://wrobstory.github.io/d3-cloud/d3.layout.cloud.js'",
"'http://wrobstory.github.io/vega/vega.v1.3.3.js'"
"'//cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min.js'",
"'//cdnjs.cloudflare.com/ajax/libs/d3-geo-projection/0.2.9/d3.geo.projection.min.js'",
"'//wrobstory.github.io/d3-cloud/d3.layout.cloud.js'",
"'//wrobstory.github.io/vega/vega.v1.3.3.js'"
]
get_lib = """vct_load_lib(%s, function(){
%s
Expand All @@ -77,8 +77,8 @@ def initialize_notebook():
window['topojson'] === undefined){
require.config(
{paths: {
d3: 'http://d3js.org/d3.v3.min',
topojson: 'http://d3js.org/topojson.v1.min'
d3: '//cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min',
topojson: '//cdnjs.cloudflare.com/ajax/libs/topojson/1.6.9/topojson.min'
}
}
);
Expand Down
8 changes: 4 additions & 4 deletions vincent/vega_template.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<html>
<head>
<title>Vega Scaffold</title>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<script src="http://d3js.org/d3.geo.projection.v0.min.js" charset="utf-8"></script>
<script src="http://trifacta.github.com/vega/vega.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min.js" charset="utf-8"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/topojson/1.6.9/topojson.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3-geo-projection/0.2.9/d3.geo.projection.min.js" charset="utf-8"></script>
<script src="//wrobstory.github.io/vega/vega.v1.3.3.js"></script>
</head>
<body>
<div id="vis"></div>
Expand Down

0 comments on commit 3245adc

Please sign in to comment.