Skip to content
Browse files

added Ars Technica

  • Loading branch information...
1 parent 201ca35 commit 453d48d7f69e88f4b0c4b87c04cd44c50df762c0 @starfishmod committed Mar 19, 2012
Showing with 15 additions and 2 deletions.
  1. +2 −2 README.md
  2. +13 −0 jquery.oembed.js
View
4 README.md
@@ -176,6 +176,8 @@ Current 3rd party sources include:
http://form.jotform.co/form/20740907897868
* Urban Dictionary - YQL lookup
http://www.urbandictionary.com/define.php?term=qwerty%20nosedive&defid=6423917
+* Ars Technica - YQL Lookup
+ http://arstechnica.com/tech-policy/news/2012/03/op-ed-imminent-six-strikes-copyright-alert-system-needs-antitrust-scrutiny.ars
---
####TODO:
@@ -208,10 +210,8 @@ Current 3rd party sources include:
* fora.tv i.e. http://fora.tv/2011/09/21/GENERATOR_Turntablefm_Discussion__Demonstration
* http://cubbi.es/oembed ?Not sure how this one works
* Apple trailers
-* Ars Technica
* XKCD
* TwitLonger
-
* TED
* Spotify
* Rap Genius
View
13 jquery.oembed.js
@@ -663,6 +663,19 @@
}
}
}),
+ new $.fn.oembed.OEmbedProvider("arstechnica", "rich", ["arstechnica.com/.+/news/.+"], null,
+ {yql:{xpath:"//meta", from:'html'
+ , datareturn:function(results){
+ var data={};
+ for(var i=0, l=results.meta.length; i<l; i++){
+ var name = results.meta[i].name||results.meta[i].property||null;
+ if(name==null)continue;
+ data[name]=results.meta[i].content;
+ }
+ return '<p><b>'+data['title']+'</b><br/>'+data['description']+'</p>';
+ }
+ }
+ }),
new $.fn.oembed.OEmbedProvider("amazon", "rich", ["amzn.com/B+","amazon.com.*/(B\\S+)($|\\/.*)"], "http://rcm.amazon.com/e/cm?t=_APIKEY_&o=1&p=8&l=as1&asins=$1&ref=qf_br_asin_til&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr"
,{apikey: true,templateRegex:/.*\/(B[0-9A-Z]+)($|\/.*)/,
embedtag : {tag: 'iframe', width:'120px',height: '240px'}

0 comments on commit 453d48d

Please sign in to comment.
Something went wrong with that request. Please try again.