Support StrawPoll titles.

This commit is contained in:
ccd0 2016-02-13 10:34:32 -08:00
parent 28f9801ca5
commit 75bddf98db
2 changed files with 4 additions and 1 deletions

View File

@ -133,7 +133,7 @@ Config =
] ]
'Link Title': [ 'Link Title': [
true true
'Replace the link of a supported site with its actual title. Currently supported: YouTube, Vimeo, Dailymotion, SoundCloud, and Github gists.' 'Replace the link of a supported site with its actual title. Currently supported: YouTube, Vimeo, Dailymotion, SoundCloud, StrawPoll, and Github gists.'
1 1
] ]
'Embedding': [ 'Embedding': [

View File

@ -253,6 +253,9 @@ Embedding =
el: (a) -> el: (a) ->
$.el 'iframe', $.el 'iframe',
src: "//strawpoll.me/embed_1/#{a.dataset.uid}" src: "//strawpoll.me/embed_1/#{a.dataset.uid}"
title:
api: (uid) -> "https://strawpoll.me/api/v2/polls/#{uid}"
text: (_) -> _.title
, ,
key: 'TwitchTV' key: 'TwitchTV'
regExp: /^\w+:\/\/(?:www\.)?twitch\.tv\/(\w[^#\&\?]*)/ regExp: /^\w+:\/\/(?:www\.)?twitch\.tv\/(\w[^#\&\?]*)/