google-maps-reviews
Advanced tools
Comparing version 0.0.17 to 0.0.20
@@ -38,2 +38,5 @@ // Copyright (c) 2018, Simon Neutert | ||
shorten_names: true, | ||
replace_anonymous: false, | ||
anonymous_name: "A Google User", | ||
anonymous_name_replacement: "User chose to remain anonymous", | ||
show_date: false, | ||
@@ -43,3 +46,2 @@ placeId: "" | ||
settings = Object.assign({}, settings, options); | ||
var target_div = document.getElementById(elem); | ||
@@ -116,4 +118,11 @@ | ||
if (settings.show_date == true) { | ||
review = "<span class='review-date'>"+date+"</span> " + review | ||
review = "<span class='review-date'>"+date+"</span> " + review; | ||
} | ||
if (settings.replace_anonymous == true && | ||
settings.anonymous_name != "" && | ||
reviews[i].author_name.toLowerCase() == settings.anonymous_name.toLowerCase() && | ||
settings.anonymous_name_replacement != "") { | ||
name = settings.anonymous_name_replacement; | ||
} | ||
html = html + "<div class=" + style + "><div class='review-meta'><span class='review-author'>" + name + "</span><span class='review-sep'></span>" + "</div>" + stars + "<p class='review-text'>" + review + "</p></div>"; | ||
@@ -120,0 +129,0 @@ } |
{ | ||
"name": "google-maps-reviews", | ||
"version": "0.0.17", | ||
"version": "0.0.20", | ||
"description": "Display Google Reviews of a Place on Google Maps on your website", | ||
@@ -5,0 +5,0 @@ "main": "google-maps-reviews.js", |
@@ -56,2 +56,5 @@ # Display Google Reviews of a Place on Google Maps on your website | ||
shorten_names: true, // example: "Max Mustermann" -> "Max M."" | ||
replace_anonymous: false, // do not replace anonymous author_name from JSON | ||
anonymous_name: "Ein Google-Nutzer", // Google's default value depending on language used (en: "A Google User") | ||
anonymous_name_replacement: "Möchte anonym bleiben", // replacement for default (never shortens) | ||
}); | ||
@@ -58,0 +61,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
11406
222
66