Skip to content

Instantly share code, notes, and snippets.

@bergie
Created March 8, 2011 18:27
Show Gist options
  • Save bergie/860710 to your computer and use it in GitHub Desktop.
Save bergie/860710 to your computer and use it in GitHub Desktop.
if (typeof jQuery == 'undefined') {
var jQ = document.createElement('script');
jQ.type = 'text/javascript';
jQ.onload=loadDeps;
jQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js';
document.body.appendChild(jQ);
} else {
loadDeps();
}
function loadDeps() {
jQuery.getScript('https://github.com/bergie/VIE/raw/master/underscore-min.js', function() {
jQuery.getScript('https://github.com/bergie/VIE/raw/master/backbone-min.js', function() {
jQuery.getScript('https://github.com/bergie/VIE/raw/master/vie.js', function() {
console.log("All set");
findRDFa();
});
});
});
};
function findRDFa() {
var entities = VIE.RDFa.readEntities();
console.log(entities);
var vieElement = jQuery('<div id="vie-introspection" style="z-index:9999;position:absolute;top:0px;height:300px;width:200px;overflow:auto;"><h2>Elements we found from this page:</h2></div>');
jQuery('body').append(vieElement);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment