Further, @cprcrack's answer, if you use jQuery in your extension and you are targeting Safari 5, you can get the version number as follows:
jQuery.get(safari.extension.baseURI + 'Info.plist', function(data){
$('dict > key', data).each(function(){
if ($(this).text() == 'CFBundleShortVersionString') {
var versionNumber = $(this).next().text();
}
});
});
source
share