diff --git a/src/Linkification/Linkify.coffee b/src/Linkification/Linkify.coffee
index 2582108f2..a00466fa3 100755
--- a/src/Linkification/Linkify.coffee
+++ b/src/Linkification/Linkify.coffee
@@ -266,12 +266,10 @@ Linkify =
regExp: /(http|www).*\.(gif|png|jpg|jpeg|bmp)$/
style: 'border: 0; width: auto; height: auto;'
el: (a) ->
- img = $.el 'img', src: a.dataset.href
- link = $.el 'a', {target: '_blank', href: a.dataset.href}
- div = $.el 'div'
- $.add link, img
- $.add div, link
- div
+ el = $.el 'div',
+ innerHTML: "
"
+ el.firstChild.href = el.firstChild.firstChild.src = a.dataset.href
+ el
,
key: 'InstallGentoo'
regExp: /.*(?:paste.installgentoo.com\/view\/)([0-9a-z_]+)/
@@ -314,18 +312,16 @@ Linkify =
return div.textContent = "ERROR: Not a valid filetype" unless embed
switch embed.type
when 'video/mp4', 'video/ogv'
- el.innerHTML = """
-"""
+ el.innerHTML = ''
+ el.firstChild.children[0].src = "https://mediacru.sh/#{a.dataset.uid}.mp4"
+ el.firstChild.children[1].src = "https://mediacru.sh/#{a.dataset.uid}.ogv"
when 'image/png', 'image/gif', 'image/jpeg', 'image/svg', 'image/svg+xml'
- $.add el, $.el 'a',
- target: '_blank'
- href: a.dataset.href
- innerHTML: "
"
+ el.innerHTML = '
'
+ el.firstChild.href = a.dataset.href
+ el.firstChild.firstChild.src = "https://mediacru.sh/#{file.file}"
when 'audio/mpeg'
- el.innerHTML = ""
+ el.innerHTML = ''
+ el.firstChild.firstChild.src = "https://mediacru.sh/#{file.file}"
else
el.textContent = "ERROR: No valid filetype."
el