mirror of
https://github.com/twisterarmy/twister-calm.git
synced 2025-01-27 23:24:28 +00:00
Bugfixes
This commit is contained in:
parent
45f913fba3
commit
360b460ba2
BIN
img/tornado_avatar.png
Normal file
BIN
img/tornado_avatar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.3 KiB |
@ -1079,7 +1079,7 @@ if(preferredLanguage == "ru"){
|
|||||||
"Favorite": "Избранное",
|
"Favorite": "Избранное",
|
||||||
"File APIs not supported in this browser.": "Ваш браузер не поддерживает File APIs.",
|
"File APIs not supported in this browser.": "Ваш браузер не поддерживает File APIs.",
|
||||||
"Follow": "Подписаться",
|
"Follow": "Подписаться",
|
||||||
"Followed by": "Подписчик у",
|
"Followed by": "Подписан",
|
||||||
"followed_by": "%{username} подписан",
|
"followed_by": "%{username} подписан",
|
||||||
"Followers": "Читателей",
|
"Followers": "Читателей",
|
||||||
"Following": "Читаемых",
|
"Following": "Читаемых",
|
||||||
|
@ -109,14 +109,16 @@ function postToElem( post, kind ) {
|
|||||||
|
|
||||||
if (postLink && localStorage['imagesPreview'] == 'enable' && (/(\.jpg)|(\.gif)|(\.png)|(\.jpeg)|(\.jpe)/i.test(postLink) || /https:\/\/img.bi/gi.test(postLink))){
|
if (postLink && localStorage['imagesPreview'] == 'enable' && (/(\.jpg)|(\.gif)|(\.png)|(\.jpeg)|(\.jpe)/i.test(postLink) || /https:\/\/img.bi/gi.test(postLink))){
|
||||||
previewContainer.show();
|
previewContainer.show();
|
||||||
previewContainer.append(imagePreview(postLink, t));
|
previewContainer.append(imagePreview(postLink));
|
||||||
}else if(postLink && ytRegExp.test(postLink) && localStorage['youtubePreview'] === 'enable'){
|
}else if(postLink && ytRegExp.test(postLink) && localStorage['youtubePreview'] === 'enable'){
|
||||||
var ytid = postLink.match(ytRegExp) ? RegExp.$1 : false;
|
var ytid = postLink.match(ytRegExp) ? RegExp.$1 : false;
|
||||||
previewContainer.show();
|
previewContainer.show();
|
||||||
|
previewContainer.attr('data-youtube-id', ytid);
|
||||||
previewContainer.append(getYoutubePreview(postLink, ytid));
|
previewContainer.append(getYoutubePreview(postLink, ytid));
|
||||||
}else if(postLink && vimeoRegExp.test(postLink) && localStorage['vimeoPreview'] === 'enable'){
|
}else if(postLink && vimeoRegExp.test(postLink) && localStorage['vimeoPreview'] === 'enable'){
|
||||||
var vimid = postLink.match(vimeoRegExp) ? RegExp.$2 : false;
|
var vimid = postLink.match(vimeoRegExp) ? RegExp.$2 : false;
|
||||||
previewContainer.show();
|
previewContainer.show();
|
||||||
|
previewContainer.attr('data-vimeo-id', vimid);
|
||||||
previewContainer.append(getVimeoPreview(postLink, vimid));
|
previewContainer.append(getVimeoPreview(postLink, vimid));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -342,6 +344,10 @@ function getYoutubePreview(link, ytid) {
|
|||||||
};
|
};
|
||||||
localStorage['ytData'] = JSON.stringify(ytDataStorage);
|
localStorage['ytData'] = JSON.stringify(ytDataStorage);
|
||||||
|
|
||||||
|
vidPreviewTmpl.find('img').attr('src', ytDataStorage[ytid].thumbnail);
|
||||||
|
vidPreviewTmpl.find('a').text(ytDataStorage[ytid].title).attr('href', link).attr('target', '_blank');
|
||||||
|
if (ytDataStorage[ytid].description) vidPreviewTmpl.find('p').html(ytDataStorage[ytid].description+'…');
|
||||||
|
$('[data-youtube-id='+ytid+']').append(vidPreviewTmpl);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -369,6 +375,11 @@ function getVimeoPreview (link, vimid) {
|
|||||||
time: Date.now()
|
time: Date.now()
|
||||||
};
|
};
|
||||||
localStorage['vimData'] = JSON.stringify(vimDataStorage);
|
localStorage['vimData'] = JSON.stringify(vimDataStorage);
|
||||||
|
|
||||||
|
vidPreviewTmpl.find('img').attr('src', vimDataStorage[vimid].thumbnail);
|
||||||
|
vidPreviewTmpl.find('a').text(vimDataStorage[vimid].title).attr('href', link).attr('target', '_blank');
|
||||||
|
if (vimDataStorage[vimid].description) vidPreviewTmpl.find('p').html(vimDataStorage[vimid].description+'…');
|
||||||
|
$('[data-vimeo-id='+vimid+']').append(vidPreviewTmpl);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user