Switch to noembed.com for Youtube titles. #2327
This commit is contained in:
parent
e8db66c516
commit
6eeb6a9c26
@ -21,7 +21,6 @@
|
||||
"appidGecko": "4chan-x@4chan-x.net",
|
||||
"chromeStoreID": "ohnjgmpcibpbafdlkimncjhflgedgpam",
|
||||
"recaptchaKey": "6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc",
|
||||
"youtubeAPIKey": "AIzaSyB5_zaen_-46Uhz1xGR-lz1YoUMHqCD6CE",
|
||||
"captchaServiceLinks": [
|
||||
[
|
||||
"captcha.guru",
|
||||
|
||||
@ -505,15 +505,8 @@ Embedding =
|
||||
el.setAttribute "allowfullscreen", "true"
|
||||
el
|
||||
title:
|
||||
batchSize: 50
|
||||
api: (uids) ->
|
||||
ids = encodeURIComponent uids.join(',')
|
||||
key = '<%= meta.youtubeAPIKey %>'
|
||||
"https://www.googleapis.com/youtube/v3/videos?part=snippet&id=#{ids}&fields=items%28id%2Csnippet%28title%29%29&key=#{key}"
|
||||
text: (data, uid) ->
|
||||
for item in data.items when item.id is uid
|
||||
return item.snippet.title
|
||||
'Not Found'
|
||||
api: (uid) -> "https://noembed.com/embed?url=https%3A//www.youtube.com/watch%3Fv%3D#{uid}&format=json"
|
||||
text: (_) -> _.title
|
||||
preview:
|
||||
url: (uid) -> "https://img.youtube.com/vi/#{uid}/0.jpg"
|
||||
height: 360
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
// @connect soundcloud.com
|
||||
// @connect api.streamable.com
|
||||
// @connect vimeo.com
|
||||
// @connect www.googleapis.com
|
||||
// @connect noembed.com
|
||||
// @connect *
|
||||
<%=
|
||||
meta.grants.map(function(grant) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user