diff --git a/player/peertube.coffee b/player/peertube.coffee index 3fab9c76..bbd96601 100644 --- a/player/peertube.coffee +++ b/player/peertube.coffee @@ -6,6 +6,8 @@ PEERTUBE_EMBED_WARNING = 'This channel is embedding PeerTube content from %link% third parties on your behalf.

If you understand the risks, wish to assume all liability, and continue to the content, click "Embed" below to allow the content to be embedded.
' +PEERTUBE_RISK = false + window.PeerPlayer = class PeerPlayer extends Player constructor: (data) -> if not (this instanceof PeerPlayer) @@ -14,6 +16,9 @@ window.PeerPlayer = class PeerPlayer extends Player @warn(data) warn: (data) -> + if USEROPTS.peertube_risk or PEERTUBE_RISK + return @load(data) + site = new URL(document.URL).hostname embedSrc = data.meta.embed.domain link = "#{embedSrc}" @@ -26,6 +31,13 @@ window.PeerPlayer = class PeerPlayer extends Player @load(data) ) .appendTo(alert.find('.alert')) + $('