您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
add a button for download
// ==UserScript== // @name Download Vidéo TikTok // @namespace http://tampermonkey.net/ // @version 0.2 // @description add a button for download // @author MTX1 // @match https://www.tiktok.com/@*/video/* // @grant none // ==/UserScript== (function() { 'use strict'; function addDownloadButton() { let videoElement = document.querySelector("video[playsinline][preload='auto']"); if (videoElement) { let downloadSrc = videoElement.getAttribute("src"); if (downloadSrc) { let downloadButton = document.createElement("a"); downloadButton.href = downloadSrc; downloadButton.download = "video_tiktok.mp4"; downloadButton.textContent = "Télécharger la vidéo"; downloadButton.style.position = "fixed"; downloadButton.style.zIndex = "9999"; downloadButton.style.top = "10px"; downloadButton.style.right = "10px"; downloadButton.style.padding = "10px 20px"; downloadButton.style.background = "#FF0000"; downloadButton.style.color = "#FFFFFF"; downloadButton.style.borderRadius = "5px"; downloadButton.style.textDecoration = "none"; document.body.appendChild(downloadButton); } } } window.addEventListener('load', function() { addDownloadButton(); }); })();