|
@@ -610,18 +610,17 @@ photo.deleteTag = function(photoID, index) {
|
|
|
|
|
|
photo.share = function(photoID, service) {
|
|
photo.share = function(photoID, service) {
|
|
|
|
|
|
- let link = ''
|
|
|
|
let url = photo.getViewLink(photoID)
|
|
let url = photo.getViewLink(photoID)
|
|
|
|
|
|
switch (service) {
|
|
switch (service) {
|
|
case 'twitter':
|
|
case 'twitter':
|
|
- link = `https://twitter.com/share?url=${ encodeURI(url) }`
|
|
|
|
|
|
+ window.open(`https://twitter.com/share?url=${ encodeURI(url) }`)
|
|
break
|
|
break
|
|
case 'facebook':
|
|
case 'facebook':
|
|
- link = `http://www.facebook.com/sharer.php?u=${ encodeURI(url) }&t=${ encodeURI(photo.json.title) }`
|
|
|
|
|
|
+ window.open(`http://www.facebook.com/sharer.php?u=${ encodeURI(url) }&t=${ encodeURI(photo.json.title) }`)
|
|
break
|
|
break
|
|
case 'mail':
|
|
case 'mail':
|
|
- link = `mailto:?subject=${ encodeURI(photo.json.title) }&body=${ encodeURI(url) }`
|
|
|
|
|
|
+ location.href = `mailto:?subject=${ encodeURI(photo.json.title) }&body=${ encodeURI(url) }`
|
|
break
|
|
break
|
|
case 'dropbox':
|
|
case 'dropbox':
|
|
lychee.loadDropbox(function() {
|
|
lychee.loadDropbox(function() {
|
|
@@ -629,13 +628,8 @@ photo.share = function(photoID, service) {
|
|
Dropbox.save(photo.getDirectLink(), filename)
|
|
Dropbox.save(photo.getDirectLink(), filename)
|
|
})
|
|
})
|
|
break
|
|
break
|
|
- default:
|
|
|
|
- link = ''
|
|
|
|
- break
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- if (link!=='') location.href = link
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
photo.getArchive = function(photoID) {
|
|
photo.getArchive = function(photoID) {
|