comparison src/sync.coffee @ 8:6fd0a307850f

check empty strings and users
author Mathias Gebbe <mgebbe@intevation.de>
date Wed, 11 Jun 2014 21:58:41 +0200
parents 2123f355ab68
children a52b5b244e51
comparison
equal deleted inserted replaced
7:2123f355ab68 8:6fd0a307850f
74 #console.log "\n" + post.id + "\n" + user.id + user.displayName 74 #console.log "\n" + post.id + "\n" + user.id + user.displayName
75 #PROFILE_LINK PROFILE_NAME PROFILE_PIC_LINK_80x80=$3 POST_LINK POST_TIME CONTENT 75 #PROFILE_LINK PROFILE_NAME PROFILE_PIC_LINK_80x80=$3 POST_LINK POST_TIME CONTENT
76 #text='<img src='$PROFILE_PIC_LINK_80x80'></img> <a href='$PROFILE_LINK'>'$PROFILE_NAME'</a> <a href='$POST_LINK'>wrotes</a> at '$POST_TIME':<br><br>'$CONTENT'' 76 #text='<img src='$PROFILE_PIC_LINK_80x80'></img> <a href='$PROFILE_LINK'>'$PROFILE_NAME'</a> <a href='$POST_LINK'>wrotes</a> at '$POST_TIME':<br><br>'$CONTENT''
77 77
78 if network is 'facebook' 78 if network is 'facebook'
79 if (user.profilePicLink?) 79 if user? and user.profilePicLink?
80 profilePicLink = user.profilePicLink.replace("50x50", "80x80") 80 profilePicLink = user.profilePicLink.replace("50x50", "80x80")
81 else 81 else
82 profilePicLink = 'http://upload.wikimedia.org/wikipedia/commons/thumb/c/c2/F_icon.svg/80px-F_icon.svg.png' 82 profilePicLink = 'http://upload.wikimedia.org/wikipedia/commons/thumb/c/c2/F_icon.svg/80px-F_icon.svg.png'
83 83
84 if post.type is 'status' 84 if post.type is 'status'
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)