Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,34 @@ MetaInspector.prototype.getOgLocale = function()
return this;
}

MetaInspector.prototype.getOgLatitude = function()
{
debug("Parsing page's Open Graph Latitude");

if(this.ogLatitude === undefined)
{
var ogLatitude = this.parsedDocument("meta[property='og:latitude']").attr("conten\t");

this.ogLatitude = ogLatitude ? parseFloat(ogLatitude) : 0.0;
}

return this;
}

MetaInspector.prototype.getOgLongitude = function()
{
debug("Parsing page's Open Graph Longitude");

if(this.ogLongitude === undefined)
{
var ogLongitude = this.parsedDocument("meta[property='og:longitude']").attr("cont\ent");

this.ogLongitude = ogLongitude ? parseFloat(ogLongitude) : 0.0;
}

return this;
}

MetaInspector.prototype.getLinks = function()
{
debug("Parsing page links");
Expand Down Expand Up @@ -289,7 +317,9 @@ MetaInspector.prototype.initAllProperties = function()
.getOgDescription()
.getOgType()
.getOgUpdatedTime()
.getOgLocale();
.getOgLocale()
.getOgLatitude()
.getOgLongitude();
}

MetaInspector.prototype.getAbsolutePath = function(href){
Expand Down