Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Updated messages, cleaned up parameters, added new preview image

ZachTRice032e6034b108
diff --git a/web/images/preview.jpg b/web/images/preview.jpg
new file mode 100644
index 000000000..9bcd93486
Binary files /dev/null and b/web/images/preview.jpg differ
diff --git a/web/index.html b/web/index.html
index 67efc1446..5d93b9c40 100644
--- a/web/index.html
+++ b/web/index.html
@@ -39,9 +39,10 @@
<meta http-equiv="Pragma" content="no-cache">
<!-- schema.org for social sharing -->
- <!-- <meta itemprop="name" content="EOSDIS Worldview"> -->
- <!-- <meta itemprop="description" content="NASA's Worldview Application"> -->
- <!-- <meta itemprop="image" content="{http://www.your_url.com/your_image.png}"> -->
+ <meta itemprop="name" content="EOSDIS Worldview">
+ <meta itemprop="description" content="NASA's Worldview Application">
+ <meta itemprop="image" content="/images/preview.jpg">
+ <meta property="og:image" content="/images/preview.jpg" />
<!-- CSS resources ==================================================== -->
diff --git a/web/js/link/wv.link.ui.js b/web/js/link/wv.link.ui.js
index ab8a9bd9f..0e9a9cc3b 100644
--- a/web/js/link/wv.link.ui.js
+++ b/web/js/link/wv.link.ui.js
@@ -71,8 +71,9 @@ wv.link.ui = wv.link.ui || function(models, config) {
// Social Sharing
var defaultLink = encodeURIComponent('http://worldview.earthdata.nasa.gov');
- var shareMessage = encodeURIComponent('Check out what I found in NASA\'s Worldview!');
- shareMessage = shareMessage.replace(/'/g, '%27');
+ var emailMessage = encodeURIComponent('Check out what I found in NASA\'s Worldview!');
+ emailMessage = emailMessage.replace(/'/g, '%27');
+ var twMessage = encodeURIComponent('Check out what I found in #NASAWorldview');
var fbAppId = 'yourFacebookAppId';
var fbRedirectUri = "https%3A%2F%2Fdevelopers.facebook.com%2Ftools%2Fexplorer";
var twitterHashTag = encodeURIComponent('#NASAWorldview');
@@ -83,13 +84,13 @@ wv.link.ui = wv.link.ui || function(models, config) {
item += "<a id='fb-share' class='icon-link fa fa-facebook fa-2x' href='https://www.facebook.com/dialog/share?app_id=" + fbAppId + "&href=" + defaultLink + "&redirect_uri=" + fbRedirectUri + "&display=popup' target='_blank' title='Share via Facebook!'></a>";
// Twitter: https://dev.twitter.com/web/tweet-button/parameters#web-intent-example
- item += "<a id='tw-share' class='icon-link fa fa-twitter fa-2x' href='https://twitter.com/intent/tweet?url=" + defaultLink + "&text=" + shareMessage + '%20' + twitterHashTag + "%20-' target='_blank' title='Share via Twitter!'></a>";
+ item += "<a id='tw-share' class='icon-link fa fa-twitter fa-2x' href='https://twitter.com/intent/tweet?url=" + defaultLink + "&text=" + twMessage + "%20-' target='_blank' title='Share via Twitter!'></a>";
// Google Plus: https://developers.google.com/+/web/share/#sharelink-endpoint
item += "<a id='gp-share' class='icon-link fa fa-google-plus fa-2x' href='https://plus.google.com/share?url=" + defaultLink + "' target='_blank' title='Share via Google Plus!'></a>";
// Email
- item += "<a id='email-share' class='icon-link fa fa-envelope fa-2x' href='mailto:?subject=" + shareMessage + "&body=" + shareMessage + "%20-%20" + defaultLink + "' target='_self' title='Share via Email!'></a>";
+ item += "<a id='email-share' class='icon-link fa fa-envelope fa-2x' href='mailto:?subject=" + emailMessage + "&body=" + emailMessage + "%20-%20" + defaultLink + "' target='_self' title='Share via Email!'></a>";
item += "</div>";
$dialog.html(item).iCheck({checkboxClass: 'icheckbox_square-grey'});
@@ -144,15 +145,15 @@ wv.link.ui = wv.link.ui || function(models, config) {
// Set Twitter
var twLink = document.getElementById("tw-share");
- twLink.setAttribute("href", "https://twitter.com/intent/tweet?url=" + shortEncodedLink + "&text=" + shareMessage + '%20' + twitterHashTag + "%20-");
+ twLink.setAttribute("href", "https://twitter.com/intent/tweet?url=" + shortEncodedLink + "&text=" + twMessage + "%20-");
// Set Google Plus
var gpLink = document.getElementById("gp-share");
- gpLink.setAttribute("href", "https://plus.google.com/share?url=" + shortLink + "");
+ gpLink.setAttribute("href", "https://plus.google.com/share?url=" + shortEncodedLink + "");
// Set Email
var emailLink = document.getElementById("email-share");
- emailLink.setAttribute("href", "mailto:?subject=" + shareMessage + "&body=" + shareMessage + "%20-%20" + shortLink + "");
+ emailLink.setAttribute("href", "mailto:?subject=" + emailMessage + "&body=" + emailMessage + "%20-%20" + shortEncodedLink + "");
return false;
} else {
error(result.status_code, result.status_txt);