Created
March 8, 2011 18:27
-
-
Save bergie/860710 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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