mirror of
https://github.com/twisterarmy/twister-calm.git
synced 2025-01-14 08:57:56 +00:00
now external images goes through ssl anonymizer
now external images goes through ssl anonymizer
This commit is contained in:
parent
f6d5096edb
commit
d7f32304a2
@ -295,9 +295,11 @@ function escapeHtmlEntities(str) {
|
|||||||
function imagePreview(post) {
|
function imagePreview(post) {
|
||||||
if (localStorage['showPreviewOpt'] == 'enable') {
|
if (localStorage['showPreviewOpt'] == 'enable') {
|
||||||
var link = post.find("a[rel='nofollow']");
|
var link = post.find("a[rel='nofollow']");
|
||||||
|
var linkAnon = 'https://ssl-proxy.my-addr.org/myaddrproxy.php/http/';
|
||||||
if (link.html() && /(\.jpg)|(\.gif)|(\.png)|(\.jpeg)/.test(link.html().toLowerCase()))
|
if (link.html() && /(\.jpg)|(\.gif)|(\.png)|(\.jpeg)/.test(link.html().toLowerCase()))
|
||||||
{
|
{
|
||||||
return "<img src='" + link.html() + "' class='image-preview' />";
|
var cleanLink = link.html().replace(/^http[s]?:\/\//i, '')
|
||||||
|
return "<img src='"+linkAnon+cleanLink+"' class='image-preview' />";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user