From 75bddf98db40979b85c4c6db4974261cd3df0d8c Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 13 Feb 2016 10:34:32 -0800 Subject: [PATCH] Support StrawPoll titles. --- src/General/Config.coffee | 2 +- src/Linkification/Embedding.coffee | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/General/Config.coffee b/src/General/Config.coffee index b93580f0a..f243c6e89 100644 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -133,7 +133,7 @@ Config = ] 'Link Title': [ 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 ] 'Embedding': [ diff --git a/src/Linkification/Embedding.coffee b/src/Linkification/Embedding.coffee index 39508601a..6ccb29779 100644 --- a/src/Linkification/Embedding.coffee +++ b/src/Linkification/Embedding.coffee @@ -253,6 +253,9 @@ Embedding = el: (a) -> $.el 'iframe', src: "//strawpoll.me/embed_1/#{a.dataset.uid}" + title: + api: (uid) -> "https://strawpoll.me/api/v2/polls/#{uid}" + text: (_) -> _.title , key: 'TwitchTV' regExp: /^\w+:\/\/(?:www\.)?twitch\.tv\/(\w[^#\&\?]*)/