Merge branch 'master' into highlighter

This commit is contained in:
vita10gy
2013-04-21 14:23:27 -05:00
9 changed files with 65 additions and 25 deletions

View File

@ -105,7 +105,15 @@ window.handleDataResponse = function(data, textStatus, jqXHR) {
&& urlPortal !== ent[0]
) return;
if('imageByUrl' in ent[2] && 'imageUrl' in ent[2].imageByUrl) {
if(window.location.protocol === 'https:') {
ent[2].imageByUrl.imageUrl = ent[2].imageByUrl.imageUrl.indexOf('www.panoramio.com') !== -1
? ent[2].imageByUrl.imageUrl.replace(/^http:\/\/www/, 'https://ssl').replace('small', 'medium')
: ent[2].imageByUrl.imageUrl.replace(/^http:\/\//, '//');
}
} else {
ent[2].imageByUrl = {'imageUrl': DEFAULT_PORTAL_IMG};
}
ppp.push(ent); // delay portal render
} else if(ent[2].edge !== undefined) {