From 09a7bc6026d8386e9166d0d62450901adf204c77 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 3 Oct 2015 14:22:27 -0700 Subject: [PATCH] Remove link to HTTP 4chan on links not embeddable on HTTPS. #496 --- src/Linkification/Embedding.coffee | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Linkification/Embedding.coffee b/src/Linkification/Embedding.coffee index aa45b7719..de92b839a 100644 --- a/src/Linkification/Embedding.coffee +++ b/src/Linkification/Embedding.coffee @@ -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'