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",
|
"appidGecko": "4chan-x@4chan-x.net",
|
||||||
"chromeStoreID": "ohnjgmpcibpbafdlkimncjhflgedgpam",
|
"chromeStoreID": "ohnjgmpcibpbafdlkimncjhflgedgpam",
|
||||||
"recaptchaKey": "6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc",
|
"recaptchaKey": "6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc",
|
||||||
"youtubeAPIKey": "AIzaSyB5_zaen_-46Uhz1xGR-lz1YoUMHqCD6CE",
|
|
||||||
"captchaServiceLinks": [
|
"captchaServiceLinks": [
|
||||||
[
|
[
|
||||||
"captcha.guru",
|
"captcha.guru",
|
||||||
|
|||||||
@ -505,15 +505,8 @@ Embedding =
|
|||||||
el.setAttribute "allowfullscreen", "true"
|
el.setAttribute "allowfullscreen", "true"
|
||||||
el
|
el
|
||||||
title:
|
title:
|
||||||
batchSize: 50
|
api: (uid) -> "https://noembed.com/embed?url=https%3A//www.youtube.com/watch%3Fv%3D#{uid}&format=json"
|
||||||
api: (uids) ->
|
text: (_) -> _.title
|
||||||
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'
|
|
||||||
preview:
|
preview:
|
||||||
url: (uid) -> "https://img.youtube.com/vi/#{uid}/0.jpg"
|
url: (uid) -> "https://img.youtube.com/vi/#{uid}/0.jpg"
|
||||||
height: 360
|
height: 360
|
||||||
|
|||||||
@ -49,7 +49,7 @@
|
|||||||
// @connect soundcloud.com
|
// @connect soundcloud.com
|
||||||
// @connect api.streamable.com
|
// @connect api.streamable.com
|
||||||
// @connect vimeo.com
|
// @connect vimeo.com
|
||||||
// @connect www.googleapis.com
|
// @connect noembed.com
|
||||||
// @connect *
|
// @connect *
|
||||||
<%=
|
<%=
|
||||||
meta.grants.map(function(grant) {
|
meta.grants.map(function(grant) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user