Skip to content

Commit

Permalink
Adds a key for use on the github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
screeley committed Dec 7, 2011
1 parent 0d090d5 commit 7ab263f
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 25 deletions.
2 changes: 1 addition & 1 deletion examples/autoplay.html
Expand Up @@ -94,7 +94,7 @@ <h2 class="code">code</h2>
$(document).ready(function() {
$(".video a").embedly({maxWidth: 500,
autoplay: true,
key : 'internal',
key : '4d1f889c20ed11e1abb14040d3dc5c07',
success : function(oembed, data){
//replace the a tag with an image
var d = $('<a href="#" class="play"><span></span></a>')
Expand Down
13 changes: 7 additions & 6 deletions examples/errors.html
Expand Up @@ -2,7 +2,7 @@
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Embedly - Embed - Example</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript" src="../jquery.embedly.js"></script>
<style>
BODY {background-color:#333333;}
Expand Down Expand Up @@ -35,16 +35,17 @@
$('ul a').bind('oembed', function(e){
$(this).after('<h2>'+$(this).data('oembed').title+'</h2>');
});
$("ul a").embedly({maxWidth: 400,
wrapElement: 'div',
$("ul a").embedly({maxWidth: 400,
wrapElement: 'div',
method: "after",
endpoint: 'oembed',
key : '4d1f889c20ed11e1abb14040d3dc5c07',
error: function(node, dict){

$(node).append(dict.error_message);
}})


});
</script>

Expand Down
9 changes: 5 additions & 4 deletions examples/photos.html
Expand Up @@ -2,7 +2,7 @@
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Embedly - Embed - Example</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript" src="../jquery.embedly.js"></script>
<style>
BODY {background-color:#333333;}
Expand Down Expand Up @@ -38,9 +38,10 @@
<script type="text/javascript">

$(document).ready(function() {
$("a").embedly({maxWidth: 300,
wrapElement: 'div',
method : "after"
$("a").embedly({maxWidth: 300,
wrapElement: 'div',
method : "after",
key : '4d1f889c20ed11e1abb14040d3dc5c07'
});
});

Expand Down
4 changes: 2 additions & 2 deletions examples/sample.html
Expand Up @@ -47,9 +47,9 @@ <h4>My favorite Memes</h4>
<script type="text/javascript">

$(document).ready(function() {
$("a").embedly({}, function(oembed, dict){
$("a").embedly({key : '4d1f889c20ed11e1abb14040d3dc5c07'}, function(oembed, dict){
if ( oembed == null)
alert("no embedly content found");
alert("no embedly content found");
var output = "<a class='embedly' href='#'><img src='"+oembed.thumbnail_url+"' /></a><span>"+oembed.title+"</span>";
output += oembed['code'];
$(dict["node"]).parent().html( output );
Expand Down
4 changes: 2 additions & 2 deletions examples/twitter.html
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Embedly - Embed - Example</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript" src="../jquery.embedly.js"></script>
<style>
BODY {background-color:#333333;}
Expand Down Expand Up @@ -47,7 +47,7 @@
arr.push(u);
}
});
$.embedly(arr, {maxWidth:500}, function(oembed){
$.embedly(arr, {maxWidth:500,key : '4d1f889c20ed11e1abb14040d3dc5c07'}, function(oembed){
if (oembed != null) {
$("#stuff").append('<li>'+(oembed.code)+'</li>');
}
Expand Down
19 changes: 10 additions & 9 deletions examples/videos.html
Expand Up @@ -2,7 +2,7 @@
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Embedly - Embed - Example</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript" src="../jquery.embedly.js"></script>
<style>
BODY {background-color:#333333;}
Expand All @@ -26,7 +26,7 @@
<li><a href="http://revision3.com/thegameshow/ff13">Video</a></li>
<li><a class="other" href="http://www.huffingtonpost.com/2010/10/05/inappropriate-halloween-costumes_n_750503.html">other</a></li>
<li><a href="http://www.dailymotion.com/video/xa7bxy_usa-09_travel">Video</a></li>
<li><a class="other" href="http://www.coolest-homemade-costumes.com/coolest-boat-from-the-deadliest-catch-costume.html">other</a></li>
<li><a class="other" href="http://www.coolest-homemade-costumes.com/coolest-boat-from-the-deadliest-catch-costume.html">other</a></li>
<li><a href="http://qik.com/video/3021330">Video</a></li>
<li><a href="http://video.google.com/videoplay?docid=-6583704503096933955&ei=7AyzS-7THqjQrAOt8o2jBg&q=embed#">Video</a></li>
<li><a href="http://screenr.com/sWM">Video</a></li>
Expand All @@ -39,19 +39,20 @@
$('ul a').bind('oembed', function(e){
$(this).after('<h2>'+$(this).data('oembed').title+'</h2>');
});
$("ul a").embedly({maxWidth: 400,
wrapElement: 'div',
$("ul a").embedly({maxWidth: 400,
wrapElement: 'div',
method: "after",
endpoint: 'oembed'
endpoint: 'oembed',
key : '4d1f889c20ed11e1abb14040d3dc5c07'
})
.css({color:"#ff0033",fontWeight:"bold",display:"block",padding:"2em"})
.animate({left: '+=50', opacity:0.25},
2000,
function(){
.animate({left: '+=50', opacity:0.25},
2000,
function(){
$(this).css({color:"#4444ee"})
.animate({opacity:0.8},
1000, function(){ }); });

});
</script>

Expand Down
2 changes: 1 addition & 1 deletion examples/youtube.html
Expand Up @@ -42,7 +42,7 @@ <h4>My favorite Memes</h4>
<script type="text/javascript">

$(document).ready(function() {
$("ul a").embedly({}, function(oembed, dict){
$("ul a").embedly({key : '4d1f889c20ed11e1abb14040d3dc5c07' }, function(oembed, dict){
if ( oembed == null)
return;
var output = "<a class='embedly' href='#'><img src='"+oembed.thumbnail_url+"' /></a><span>"+oembed.title+"</span>";
Expand Down

0 comments on commit 7ab263f

Please sign in to comment.