Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1') {
redirectUri = 'http://localhost:4000/'
}
var network = $(this).data('pattern-network')
var title = $(this).data('pattern-title')
var tags = $(this).data('pattern-tags')
// var tagline = $(this).data('pattern-tagline') // Unused
tags = '#' + tags
tags = ' #civicpatterns #africanCOMMONS #commons'
switch (network) {
case 'facebook-share':
VanillaSharing.fbShare({
url: url,
redirectUri: redirectUri,
hashtag: tags,
quote: title,
fbAppId: fbAppId
})
break
case 'facebook-like':
VanillaSharing.fbFeed({
url: url,
redirectUri: redirectUri,
fbAppId: fbAppId
})
break
case 'twitter':
VanillaSharing.tw({