don't try to embed iframes/objects from HTTP-only services
This commit is contained in:
parent
a24f62923b
commit
6302f4a6d8
@ -145,7 +145,7 @@ Linkify =
|
|||||||
services: (link) ->
|
services: (link) ->
|
||||||
{href} = link
|
{href} = link
|
||||||
for type in Linkify.ordered_types when match = type.regExp.exec href
|
for type in Linkify.ordered_types when match = type.regExp.exec href
|
||||||
return if type.dummy
|
return if type.dummy or type.httpOnly and location.protocol isnt 'http:'
|
||||||
return [type.key, match[1], match[2], link]
|
return [type.key, match[1], match[2], link]
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -268,6 +268,7 @@ Linkify =
|
|||||||
,
|
,
|
||||||
key: 'LiveLeak'
|
key: 'LiveLeak'
|
||||||
regExp: /.*(?:liveleak.com\/view.+i=)([0-9a-z_]+)/
|
regExp: /.*(?:liveleak.com\/view.+i=)([0-9a-z_]+)/
|
||||||
|
httpOnly: true
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
el = $.el 'iframe',
|
el = $.el 'iframe',
|
||||||
width: "640",
|
width: "640",
|
||||||
@ -308,6 +309,7 @@ Linkify =
|
|||||||
,
|
,
|
||||||
key: 'pastebin'
|
key: 'pastebin'
|
||||||
regExp: /.*pastebin\.com\/(?!u\/)(?:[\w\.]+\?i\=)?(\w+).*/
|
regExp: /.*pastebin\.com\/(?!u\/)(?:[\w\.]+\?i\=)?(\w+).*/
|
||||||
|
httpOnly: true
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
div = $.el 'iframe',
|
div = $.el 'iframe',
|
||||||
src: "http://pastebin.com/embed_iframe.php?i=#{a.dataset.uid}"
|
src: "http://pastebin.com/embed_iframe.php?i=#{a.dataset.uid}"
|
||||||
@ -330,6 +332,7 @@ Linkify =
|
|||||||
,
|
,
|
||||||
key: 'StrawPoll'
|
key: 'StrawPoll'
|
||||||
regExp: /strawpoll\.me\/(?:embed_\d+\/)?(\d+(?:\/r)?)/
|
regExp: /strawpoll\.me\/(?:embed_\d+\/)?(\d+(?:\/r)?)/
|
||||||
|
httpOnly: true
|
||||||
style: 'border: 0; width: 600px; height: 406px;'
|
style: 'border: 0; width: 600px; height: 406px;'
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
$.el 'iframe',
|
$.el 'iframe',
|
||||||
@ -337,6 +340,7 @@ Linkify =
|
|||||||
,
|
,
|
||||||
key: 'TwitchTV'
|
key: 'TwitchTV'
|
||||||
regExp: /.*(?:twitch.tv\/)([^#\&\?]*).*/
|
regExp: /.*(?:twitch.tv\/)([^#\&\?]*).*/
|
||||||
|
httpOnly: true
|
||||||
style: "border: none; width: 640px; height: 360px;"
|
style: "border: none; width: 640px; height: 360px;"
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
if result = /(\w+)\/([bc])\/(\d+)/i.exec a.dataset.uid
|
if result = /(\w+)\/([bc])\/(\d+)/i.exec a.dataset.uid
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user