From 17575a285f4804565ee24f5eaec2b1fafaa9e451 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Thu, 12 Dec 2019 23:14:02 -0800 Subject: [PATCH] Never mark Youtube videos as 'Forbidden or Private' since 403 errors are most likely from API throttling. #2327 --- src/Linkification/Embedding.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Linkification/Embedding.coffee b/src/Linkification/Embedding.coffee index e80eb5aea..45a238f67 100644 --- a/src/Linkification/Embedding.coffee +++ b/src/Linkification/Embedding.coffee @@ -215,7 +215,7 @@ Embedding = title: (req, data) -> return unless req.status - {key, uid} = data + {key, uid, link} = data {status} = req service = Embedding.types[key].title @@ -226,7 +226,7 @@ Embedding = when 404 text = "Not Found" when 403 - text = "Forbidden or Private" + text = if service.ignore403 then link.textContent else "Forbidden or Private" else text = "#{status}'d" Embedding.cb.titleText text, data @@ -539,6 +539,7 @@ Embedding = el title: batchSize: 50 + ignore403: true api: (uids) -> ids = encodeURIComponent uids.join(',') key = '<%= meta.youtubeAPIKey %>'