ClipSaver for TikTok
Adds a floating download button over TikTok video players that opens a download
Overview
ClipSaver for TikTok is a userscript that adds a floating download button over TikTok video players. Hover the pointer over a video to reveal the button, then click it to open an external download service preloaded with the current clip's URL. A companion panel page can control the button's appearance and trigger downloads, reporting progress back to the page.
TikTok does not offer a straightforward way to save a clip to disk, and locating the current video's URL or ID by hand is inconvenient. This script surfaces a one-click download entry point directly on the player.
TikTok viewers on desktop browsers who use a userscript manager (such as Tampermonkey or Violentmonkey) and want a quick way to hand the current clip to a download service.
Key features
- The floating circular download button appears only while the pointer is over a video player, so normal browsing stays unobstructed.
- Works with TikTok's xgplayer containers and falls back to standard video elements.
- Button placement adapts to the page: profile pages use bottom-center, while video pages use top-center or right-three-quarter depending on the layout.
- Button size, icon size, edge offset, and any of twelve preset positions are configurable.
- Resolves the current clip's numeric video ID from the player element and builds a canonical video URL, falling back to the page URL without its query string.
- An optional companion panel page can enable or disable the button, adjust settings, and start downloads, with running/done/error progress reporting.
- Sends the browser language to the download service so its page opens in a matching locale.
- A rainbow ring animation gives visual feedback when hovering the button.
Supported sites
- www.tiktok.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 the script in a userscript manager and make sure it is enabled for tiktok.com.
- Open TikTok in the browser; the script runs automatically as the page loads.
- Move the pointer over a playing video to reveal the floating download button.
- Click the button; the external download service opens in a new tab with the current clip's URL.
- Optionally open the companion panel page to change the button position or size, toggle the button on or off, or start a download directly.
- On the first run the script connects to its companion panel page once; the connection is remembered so it is not opened again automatically.
Limitations
- It matches tiktok.com pages only; it does not work on other sites or on non-TikTok embedded players.
- The script is declared with @noframes, so it does not run inside iframes.
- The actual download is performed by an external third-party service; the script only launches it and cannot guarantee service availability or the resulting file.
- The button only appears over players that pass its size and visibility checks (for example, video readyState >= 3), so very small or not-yet-ready players may not show it.
- It needs a userscript manager that supports the declared GM_* APIs; without them, opening tabs falls back to window.open and storage falls back to localStorage.
- Panel communication relies on cross-origin postMessage/BroadcastChannel; if the companion page is unavailable, only the on-page button works.
FAQ
Does the script download videos by itself?
No. It identifies the current clip's URL and opens an external download service in a new tab; the actual download is performed there.
Where does the button appear?
It appears only while the pointer is over a recognized video player, positioned according to the current TikTok page type and your configured position.
Can I change the button's size or position?
Yes, through the companion panel (button size, icon size, edge offset, and twelve preset positions), or by editing the defaults.
Does it collect my personal data?
The script stores only a small flag for the one-time panel connection and keeps runtime logs in memory; it does not read account credentials. The current clip URL is passed to the external download service when you click.
Why don't I see the button?
Make sure the script is enabled for tiktok.com, the video is playing or ready, and the player is large enough; moving the pointer directly over the player should reveal it.
Does it work in iframes?
No, the script is declared @noframes and runs only in the top-level TikTok page.
Safety & privacy
The script runs only on tiktok.com and reads the current page and player to determine the clip URL. When you click the button (or trigger a panel download action), that URL is sent to an external download service in a new tab; nothing is downloaded without your click. Runtime logs (errors and message events) are kept only in a 200-entry in-memory buffer, are not redacted, and are cleared on reload; they are not stored persistently. The only persisted value is a one-time flag indicating the companion panel was connected, kept via userscript storage when available and otherwise in localStorage. The panel bridge trusts cross-origin messages only from the companion panel origin and the current page origin, plus a window reference obtained from window.open; no account credentials or passwords are read or transmitted.