padmaEssay/padma.tooltip.js

24 lines
707 B
JavaScript
Raw Normal View History

2010-09-01 16:12:58 +00:00
(function($) {
var PADMA_URL = "http://pad.ma/";
$(function() {
$("a").each(function() {
var that = this;
2010-09-01 16:16:41 +00:00
$(this).attr("target", "_blank");
2010-09-01 16:12:58 +00:00
var link = $(this).attr("href");
if (link.indexOf(PADMA_URL) != -1) {
2010-11-06 00:56:06 +00:00
var linkData = parsePadmaUrl(link, PADMA_URL);
2010-09-01 16:12:58 +00:00
if (linkData) {
2010-09-01 16:14:51 +00:00
// console.log(linkData);
2010-09-01 16:12:58 +00:00
var v = new padmaVideo(linkData.videoId);
v.getAllData(setupPadmaLink, {'linkData': linkData, 'jq': that});
2010-11-05 22:51:50 +00:00
// v.getVideoData(setupSidenotes, {'linkData': linkData, 'jq': that});
2010-09-01 16:12:58 +00:00
// getPadmaData(linkData, that, {});
}
}
});
});
2010-11-05 22:51:50 +00:00
// D = parsePadmaUrl;
2010-09-01 16:12:58 +00:00
})(jQuery);