desktop_gifs README

The project's README from github.com/rayytor/desktop_gifs. As one markdown file: README.md.

Desktop GIFs icon

Desktop GIFs

Post GIFs in YouTube comments and replies from a desktop browser.

Version Chrome 121 or newer Firefox 140 or newer Manifest V3 License: GPL-3.0

Install · Use · Troubleshooting · Limits · How it works · Privacy

The GIF picker open above a comment box, showing search results for "cat", one of them starred as a favorite

[!WARNING] Posting GIFs is broken right now. Since 14 October 2026 YouTube refuses GIF comments sent from desktop. For most people every try fails, whether it has text or not, and whether it is a comment or a reply. The cause is on YouTube's side. Reinstalling, updating or picking another GIF will not fix it. Searching and the picker still work.

I have not found a way around it yet. If you find one, open a pull request and I will review and merge it. What is known so far, and where to report, is in #93. Please add to that issue instead of opening a new one.

YouTube's mobile app can attach a GIF to a comment; the desktop site has no button for it. Desktop GIFs adds one, next to the emoji button:

The GIF button next to the emoji button in a comment box

The screenshots show the extension's own interface on a test page that stands in for YouTube's comment box.

Install

Desktop GIFs is not on the Chrome Web Store or addons.mozilla.org yet, so it is loaded from a ZIP. There is one for each browser on the latest release.

Download for Chrome, Edge and Brave Download for Firefox

Chrome, Edge, Brave

  1. Download desktop-gifs-chromium.zip and unzip it.
  2. Open chrome://extensions and turn on Developer mode.
  3. Click Load unpacked and choose the unzipped folder, the one that has manifest.json directly inside it.

YouTube tabs that are already open get the button without a refresh.

Only Chrome is tested. Edge, Brave and other Chromium browsers should work the same way.

Firefox

  1. Download desktop-gifs-firefox.zip. There is no need to unzip it.
  2. Open about:debugging#/runtime/this-firefox.
  3. Click Load Temporary Add-on… and choose the ZIP.

YouTube tabs that are already open get the button without a refresh.

[!NOTE] Firefox removes an add-on loaded this way when it closes. That is how Firefox treats every temporary add-on. Repeat steps 2 and 3 after a restart.

From the source

The extension folder of this repository is the extension, and it loads in both browsers as it is: choose that folder in Chrome, or the manifest.json inside it in Firefox. Chromium browsers then list one harmless error about background.scripts; see Troubleshooting.

Updating

An extension loaded from a ZIP cannot update itself, so the GIF picker says when a new version is out, with a Download link to its release. To install it:

YouTube tabs that are already open switch to the new version without a refresh, and keep what you typed and the GIF attached to a comment box. Coming from 0.1.5 or older, a GIF that was already attached is still posted by the old version; refresh the tab once if anything acts up. The × on the notice hides it until the next version.

Use

  1. On a video or a Short, click Add a comment… or Reply.
  2. Click the GIF button next to the emoji button.
  3. Click a GIF. It is attached to the comment box, below your text.
  4. Write or edit your text, then click Comment (or press Ctrl+Enter).

The text in the comment box is posted together with the GIF. A comment can also be just the GIF. To take the GIF off, click the × in its corner; picking another GIF replaces it.

The picker opens with Tenor's featured GIFs. To find another one:

To keep a GIF, point at it and click the star in its corner. The ★ button next to the search field shows your favorites; click it again to go back to the search. Click a favorite's star to remove it. Favorites are shared by all your YouTube tabs and are still there after a browser restart, in Firefox too, once the add-on is loaded again. Removing the extension from the browser deletes them.

Key What it does
Enter In the search field, attaches the GIF when the picker shows exactly one, as it does after pasting a link
Ctrl+Enter In a comment box with a GIF attached, posts the comment
Esc Closes the picker

Troubleshooting

What you see What to do
No GIF button in the comment box Refresh the YouTube tab.
"Not ready in this tab yet" The tab was open before the install and the extension is still checking that it can post from it. Try again in a few seconds, or refresh the tab.
"The page hook is not running" or "The extension was reloaded" Refresh the YouTube tab.
"The GIF was not sent" YouTube did not send the comment. Press its Comment button again.
The post fails Nothing is published, and your text and the GIF stay in the box. Try again.
"YouTube is refusing GIF comments sent from desktop" Since 14 October 2026 YouTube turns down GIF comments sent from desktop. At first it refused some at random; now, for many people, it refuses every one, GIF only or with text, comment or reply. People report that it depends on where they connect from. The extension already tried up to twelve times. The GIF is not the cause, so picking another one will not help. Your text and the GIF stay in the box. The YouTube phone app may still post GIFs from the same account.
"YouTube turned it down. Trying again…" YouTube blocked the comment and the extension is retrying on its own. Wait for it to finish; there is no need to click again.
"Either Tenor does not rate the GIF G, or YouTube is refusing GIF comments" Tenor could not be asked for the GIF's rating, so the extension does not know which one it is. Try a GIF from the picker's search results: those are rated G.
"YouTube does not accept this GIF" YouTube looked the GIF up and will not take it. Pick a different GIF.
"YouTube only takes GIFs that Tenor rates G" The GIF has another rating on Tenor. The extension checks a pasted link when you pick it, and a favorite or a GIF without a rating just before posting. Pick a different GIF.
"Checking the GIF…" The GIF was picked without a rating, so the extension asks Tenor for it before posting. This takes at most five seconds; if Tenor does not answer, the comment is posted anyway.
"YouTube rejected this GIF comment" YouTube refused the comment for another reason. Its own explanation, if it gave one, follows the HTTP status. Nothing was posted.
"YouTube did not confirm this GIF comment" YouTube's answer could not be read, so the comment may or may not be up. Check the comments before posting again.
"This browser could not reach tenor.com" Open tenor.com in a tab. If it does not load there either, something on your network or computer blocks it: a firewall, a DNS filter, a VPN, or a school or work network. Once the extension has reached tenor.com one time, search keeps working through Tenor's API even when tenor.com itself is blocked.
"Desktop GIFs is not allowed to reach tenor.com" In Chrome, Edge or Brave, open the extension's Details in chrome://extensions and set Site access to On all sites, or add tenor.com. In Firefox, open about:addons, select Desktop GIFs, and turn on access to tenor.com under Permissions.
Search finds nothing in Firefox Open about:addons, select Desktop GIFs, and check under Permissions that access to tenor.com is on.
"Manifest file is missing or unreadable" The wrong folder was chosen. Choose the folder that has manifest.json directly inside it.
Chrome, Edge or Brave lists the error 'background.scripts' requires manifest version of 2 or lower The extension is installed and works. The message appears when the extension folder is loaded from the source; that key is there for Firefox. desktop-gifs-chromium.zip does not have it.
Clicking GIF does nothing in Firefox Update to 0.1.1 or newer.

If posting keeps failing, open the browser's developer tools and look for Desktop GIFs: comment not confirmed in the YouTube tab's Console; Chromium also lists it among the extension's errors. It gives the endpoint, the Tenor ID, whether the GIF was rated G, whether there was text, how YouTube answered (kind), how many tries were made, the HTTP and API status and YouTube's own message. It holds no comment text, headers, cookies or response body, so it can be pasted into a bug report as it is.

Limits

How it works

When you pick a GIF, the content script attaches it to the comment box. When you press Comment, it adds a one-time marker to the end of your text and lets YouTube's own Comment button go through. YouTube builds and signs the request as usual. The main-world script catches that request, removes the marker and adds the GIF's Tenor ID. A marker that cannot be turned into a GIF is blocked, so it never appears as comment text.

File Runs in Job
src/content.js, src/content.css YouTube page, isolated world Adds the GIF button and the picker
src/main.js YouTube page, main world Rewrites the comment request so it carries the GIF
src/sw.js Service worker (background script in Firefox) Fetches G-rated search results from Tenor; checks GitHub for a newer release; on install, update or reload, adds the two scripts above to YouTube tabs that are already open, where they take over from the old copies

There is no build step and there are no dependencies: the extension folder is the extension. python3 tools/package.py writes the two release ZIPs, which are that folder with the other browser's background key taken out of the manifest.

node --test tests/main.test.cjs tests/sw.test.cjs (Node.js 22 or newer) checks how comment requests are rewritten, how YouTube's answers are read and retried, and the Tenor rating check, against simulated responses. python3 tests/picker.browser.py drives the real content script in Chromium and Firefox on a local page that imitates YouTube's comment boxes and a notification reply dialog; it needs Python's playwright package and its browsers (python3 -m playwright install chromium firefox). Neither posts anything to YouTube.

Privacy

License

Copyright (C) 2026 rayytor

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3. It is distributed without any warranty. See LICENSE.

desktop_gifs (rayytor/desktop_gifs)

Searching Database…

这是什么?Desktop GIFs 是一个浏览器扩展,它会在 YouTube 评论框的表情按钮旁边添加一个 GIF 按钮,让你在电脑浏览器上给评论或回复附上 Tenor GIF——而 YouTube 的电脑版网页本身并没有这样的按钮。
它还没上架 Chrome 应用商店,那我怎么安装?从最新版本下载 desktop-gifs-chromium.zip 或 desktop-gifs-firefox.zip。如果你用的是 Chrome/Edge/Brave,先解压,然后在 chrome://extensions 页面打开开发者模式,以未打包扩展的方式加载;如果用的是 Firefox,直接在 about:debugging 里把 ZIP 作为临时附加组件加载即可。
使用它需要注册 Tenor 账号或 API 密钥吗?不需要,没有任何需要设置的东西:既不需要账号,也不需要 API 密钥,扩展本身也不做任何跟踪。
现在发布 GIF 评论真的能用吗?不能,发布功能目前是坏的:从 2026 年 10 月 14 日起,对大多数用户来说,YouTube 已开始拒绝从电脑端发出的 GIF 评论,无论是正文、评论还是回复都一样;重新安装或更新扩展也解决不了,因为问题出在 YouTube 那边。
它支持哪些浏览器?官方只在 Chrome 上做过测试,不过 Edge、Brave 和其他 Chromium 内核浏览器应该也能以同样方式使用;Firefox 也支持,但由于是以临时附加组件的方式加载,每次关闭 Firefox 它都会被移除,需要重新加载。
这个扩展会收集或存储哪些数据?除了你自己选择保留的内容之外,它什么都不收集:收藏(Favorites)保存在本地,并在你所有 YouTube 标签页之间共享;它生成的诊断错误日志里也不包含任何评论文本、请求头、Cookie 或响应内容。
我能把常用的 GIF 存起来,免得每次都要搜吗?可以,给 GIF 点星标就能把它加入收藏。收藏会在你所有 YouTube 标签页之间共享,浏览器重启后依然保留;在 Firefox 上,只要重新加载附加组件,收藏也还在。
我可以发自己电脑上的 GIF 文件,而不是 Tenor 的 GIF 吗?不行,YouTube 的 GIF 评论只接受 Tenor 的 GIF,所以你自己电脑上的本地 GIF 文件发不出去;另外只有适合全年龄段的 Tenor GIF 才会显示或被接受。
这个扩展在技术上是怎样把 GIF 塞进 YouTube 评论的?一个内容脚本(content script)会把 GIF 附加到评论框上;当你点击"评论"时,一个运行在主世界的脚本会拦截 YouTube 自己的签名请求,去掉一个临时标记,并在请求发出前插入该 GIF 的 Tenor ID。
这是 YouTube 或 Tenor 的官方功能吗?不是,这是一个非官方项目,与 YouTube、Google 或 Tenor 均无关联;它依赖一个 YouTube 电脑版网页通常不使用的字段,所以只要 YouTube 一改动就可能失效——从 2026 年 10 月 14 日起它已经失效过一次了。
Creator
rayytor
Size
1.1 MB
Stars
471
Age
6d
Commits · 90 Days