ClipSaver for Douyin
Adds a download button to the Douyin player control bar that opens a download
Overview
ClipSaver for Douyin adds a download button to the Douyin (douyin.com) video player control bar. Clicking it opens an external download launcher pre-filled with the URL of the current video. A companion control panel page can also trigger a download for the current video and shows the running state of each action.
The Douyin web player has no built-in control to save the video you are currently watching. This script adds an in-player download button that forwards the current page URL to an external download service, so you do not have to copy the link manually.
Desktop browser users who watch videos on douyin.com, already run a userscript manager, and want a quick one-click way to send the current video to a download service.
Key features
- Injects a download button into the Douyin player control bar, styled to blend with the existing controls.
- Clicking the button opens an external downloader page pre-filled with the current video URL.
- Periodically rescans the player DOM so the button is re-added after the page or player re-renders.
- Optional companion control panel can trigger a download of the current video on demand.
- The panel can enable or disable the injected button and change the scan interval.
- Reports each panel action's progress, completion, or error back to the panel.
- Captures uncaught page errors and unhandled promise rejections into an in-memory log for troubleshooting.
- Runs at document-start and only activates on douyin.com pages.
Supported sites
- www.douyin.com
Permissions
This script requests the following userscript-manager permissions. Review them before installing.
GM_openInTabGM.openInTabGM_addStyleGM_setValueGM_getValue
How to install & use
- Install a userscript manager such as Tampermonkey or Violentmonkey for your browser.
- Click the "Download / install" button to open the script source on GitHub and install it with your userscript manager.
- Open the target site and use the script as documented.
How to use
- Install a userscript manager in your browser, then add this script.
- Open any video page on douyin.com.
- Wait for the download button to appear in the player control bar (scanning runs every 777 ms by default).
- Click the download button to open the external downloader for the current video.
- Optionally open the companion panel to toggle the injected button or adjust the scan interval.
- In the panel, use "Download current video" to trigger a download, or "Open download service" to open the downloader directly.
Limitations
- Works only on douyin.com and is disabled inside frames (@noframes).
- It does not download the video itself: the actual download is performed by the external download service, and success depends on that service and on the video being available.
- Because the button is re-injected by periodic scanning, it may briefly disappear and reappear when the player re-renders.
- The companion panel is auto-opened only once (a stored flag prevents automatic reconnection on later visits).
- Logs are kept in memory only (up to 200 entries) and are cleared when the page is refreshed; they are not persisted.
- The button is cloned from the existing fullscreen control, so its placement may not match every player layout.
FAQ
Which sites does this script work on?
Only Douyin web pages on douyin.com. It checks the host before activating and does nothing elsewhere.
Does the script download the video by itself?
No. It sends the current video's URL to an external download service; the downloading and file handling are done there.
Can I turn the injected button off?
Yes. The companion panel has an on/off switch for the injected download button and a field for the scan interval.
Where are my settings and the logs stored?
Settings and the panel-connection flag are saved through the userscript storage API, falling back to localStorage. Logs live only in memory and are cleared on refresh.
Safety & privacy
The script runs only on douyin.com pages and reads the current page URL to pass it to the external download service. It requests the userscript grants GM_openInTab / GM.openInTab / GM_addStyle / GM_setValue / GM_getValue and stores a small panel-connection flag plus panel settings. It communicates with the companion panel over postMessage and BroadcastChannel and accepts messages only from the panel's own origin, ignoring other sources. It does not read or transmit page content beyond the current URL, and its diagnostic log is held in memory only, not persisted or uploaded. The downloader and panel pages are third-party external pages; review their own privacy practices before use.