google-maps-reviews
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -74,2 +74,4 @@ // Copyright (c) 2021, Simon Neutert | ||
const shortenName = (name) => { | ||
if (name === undefined) return settings.anonymousName; | ||
if (name.split(" ").length > 1) { | ||
@@ -149,5 +151,5 @@ const splitName = name.split(" "); | ||
settings.anonymousName !== "" && | ||
(review.authorName.toLowerCase() === | ||
(review.author_name.toLowerCase() === | ||
settings.anonymousName.toLowerCase() || | ||
review.authorName === undefined) && | ||
review.author_name === undefined) && | ||
settings.anonymousNameReplacement !== "" | ||
@@ -171,7 +173,8 @@ ) { | ||
const review = reviews[i]; | ||
if (!review) return; | ||
const stars = renderStars(review.rating); | ||
const date = convertTime(review.time); | ||
let name = settings.shortenNames | ||
? shortenName(review.authorName) | ||
: review.authorName; | ||
? shortenName(review.author_name) | ||
: review.author_name; | ||
const style = | ||
@@ -178,0 +181,0 @@ review.text.length > parseInt(settings.textBreakLength, 10) |
{ | ||
"name": "google-maps-reviews", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Display Google Reviews of a Place on Google Maps on your website", | ||
@@ -5,0 +5,0 @@ "main": "google-maps-reviews.js", |
@@ -5,2 +5,4 @@ # Display Google Reviews of a Place on Google Maps on your website | ||
jQuery Version here: https://github.com/simonneutert/jquery-google-reviews | ||
## Credits | ||
@@ -7,0 +9,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13048
292
72