Revert "Add option to use your own Youtube API key. #2327"

This reverts commit c7ce6187f2c601fc9daa9f1b4c6dea0c0375db69.
This commit is contained in:
ccd0 2020-04-26 21:24:28 -07:00
parent b8640a3cf7
commit ac8adbd496
3 changed files with 1 additions and 9 deletions

View File

@ -59,12 +59,6 @@
</div>
</fieldset>
<fieldset>
<legend>Youtube API Key</legend>
<div>API key used to fetch Youtube link titles. You can obtain your own key <a href="https://console.cloud.google.com/marketplace/details/google/youtube.googleapis.com" target="_blank">here</a> to make the feature work when the default key exceeds its quota.</div>
<div><input name="youtubeAPIKey" class="field" spellcheck="false"></div>
</fieldset>
<fieldset>
<legend>Custom Board Navigation</legend>
<div><textarea hidden name="boardnav" class="field" spellcheck="false"></textarea></div>

View File

@ -548,7 +548,7 @@ Embedding =
ignore403: true
api: (uids) ->
ids = encodeURIComponent uids.join(',')
key = Conf['youtubeAPIKey']
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

View File

@ -1181,5 +1181,3 @@ Config =
passMessageClosed: false
'Prerequest Captcha': false
youtubeAPIKey: '<%= meta.youtubeAPIKey %>'