Remove link to HTTP 4chan on links not embeddable on HTTPS. #496

This commit is contained in:
ccd0 2015-10-03 14:22:27 -07:00
parent bd73d49fca
commit 09a7bc6026

View File

@ -43,15 +43,9 @@ Embedding =
embed: (data) ->
{key, uid, options, link, post} = data
{href} = link
$.addClass link, key.toLowerCase()
return if Embedding.types[key].httpOnly and location.protocol isnt 'http:'
if Embedding.types[key].httpOnly and location.protocol isnt 'http:'
embed = $.el 'a',
href: "http://boards.4chan.org/#{post.board}/thread/#{post.thread}#p#{post}"
textContent: '(HTTP)'
title: "#{key} does not support HTTPS."
$.after link, [$.tn(' '), embed]
return
$.addClass link, key.toLowerCase()
embed = $.el 'a',
className: 'embedder'