Skip to content

Instantly share code, notes, and snippets.

@victusfate
Forked from bergie/gist:860710
Created January 9, 2012 17:29
Show Gist options
  • Save victusfate/1584021 to your computer and use it in GitHub Desktop.
Save victusfate/1584021 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