Every line of 'name js photo' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
102 function getPhotoInfo(photoId, callback) { 103 var url = getApiUrl('method=' + METHOD_GETINFO + '&photo_id=' + photoId); 104 105 COG.jsonp(url, function(data) { 106 processPhotoInfo(data); 107 108 if (callback) { 109 callback(data); 110 } // if 111 }, 'jsoncallback'); 112 } // getPhotoInfo
861 function format_photo(att, id) { 862 var str_contents, att_link, att_preview, att_title; 863 str_contents = ""; 864 if (att.objectType == "photo") { 865 att_link = ""; 866 att_preview = ""; 867 att_title = ""; 868 if (att.url) { 869 att_link = att.url; 870 } 871 if (att.image) { 872 att_preview = att.image.url; 873 } 874 if (att.displayName) { 875 att_title = att.displayName; 876 } 877 if (att_link == "") { 878 if (att.fullImage) { 879 att_link = att.fullImage.url; 880 } 881 } 882 if (att_link.search("plus.google.com/photos") >= 0) { 883 if (att_title == "" && att_preview == "") { 884 att_title = att_link; 885 } 886 if (att_preview != "") { 887 str_contents += " <a href="\""">"; 888 str_contents += ""; 889 str_contents += "</a>"; 890 } 891 } 892 } 893 return str_contents; 894 }
24 function getPhotoThumbURL(photoObject) { 25 if(!photoObject) 26 return null; 27 return photoObject.url_sq; 28 }
49 function setPhoto(photo, image) { 50 return $(photo).empty().append(image); 51 }
14 function getPhotoUrl(data) { 15 return FLICK_PHOTO_URL_TEMPLATE 16 .replace('{farm-id}', data.farm) 17 .replace('{server-id}', data.server) 18 .replace('{id}', data.id) 19 .replace('{secret}', data.secret) 20 .replace('{size}', 'm'); 21 }
5 function createPhotoElement(imageUrl, postUrl) { 6 return ( 7 <div> 8 <a href="{`${postUrl}`}" target="_blank"> 9 10 </a> 11 </div> 12 ); 13 }
103 equals(photo) { 104 return this.id === photo.id; 105 }
35 export function updateUserPhoto( 36 username: string, 37 image: Blob, 38 name: string 39 ): Dispatcher { 40 return (dispatch: Dispatch) => { 41 dispatch(requestPatchUserPhoto(username)) 42 return updateProfileImage(username, image, name).then( 43 () => { 44 dispatch(receivePatchUserPhotoSuccess()) 45 }, 46 error => { 47 dispatch(receivePatchUserPhotoFailure(error)) 48 } 49 ) 50 } 51 }
71 valueOf() { 72 return this.original.toString(); 73 }
28 function photo(filePath, callback) { 29 fs.readFile(filePath, function(err, contents) { 30 if (err) return callback(new Error('Failed to read file ' + filePath)); 31 try { 32 var result = exif.create(contents).parse(); 33 } catch (ex) { 34 return callback(new Error('Failed to read EXIF from ' + filePath)); 35 } 36 callback(null, { 37 date: result.tags.DateTimeOriginal ? (result.tags.DateTimeOriginal * 1000) : null, 38 orientation: result.tags.Orientation || null, 39 caption: result.tags.ImageDescription 40 }); 41 }); 42 }