您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Replace TikToks default "Download video" with non-watermarked download
当前为
// ==UserScript== // @name TikTok Watermarkless Video Downloader // @namespace http://tampermonkey.net/ // @version 1 // @description Replace TikToks default "Download video" with non-watermarked download // @author LukysGaming // @match https://www.tiktok.com/* // @grant GM_download // @run-at document-idle // ==/UserScript== (function() { 'use strict'; const observer = new MutationObserver(mutations => { mutations.forEach(mutation => { const downloadButton = document.querySelector('li.css-1l1tdw6-LiItemWrapper.e5bhsb11'); if (downloadButton) { const videoElement = document.querySelector('video'); if (videoElement) { const sourceURL = videoElement.querySelector('source')?.src; if (sourceURL) { downloadButton.onclick = function(event) { event.stopImmediatePropagation(); event.preventDefault(); GM_download(sourceURL, 'video.mp4'); }; const spanElement = downloadButton.querySelector('span'); if (spanElement) { spanElement.textContent = 'Download video'; } } } } }); }); observer.observe(document.body, { childList: true, subtree: true }); })();