您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
插入当前页视频的下载按钮
当前为
// ==UserScript== // @name 网页版抖音视频下载器 // @icon https://lf1-cdn-tos.bytegoofy.com/goofy/ies/douyin_web/public/favicon.ico // @version 1.3 // @description 插入当前页视频的下载按钮 // @author xiaofang // @match *://www.douyin.com/* // @grant none // @require http://code.jquery.com/jquery-1.11.0.min.js // @namespace http://greasyfork.icu/zh-CN/scripts/438928 // ==/UserScript== (function(){ console.log("脚本启动成功"); window.onload = function(){ $("head").prepend("<script>function download1(){$('.swiper-slide-active video').children().each(function(){var downloadURL= $(this).attr('src');console.log(downloadURL);window.open(downloadURL);return false;});}</script>") $("head").prepend("<script>function download2(){var downloadURL=$('.swiper-slide-active video').attr('src');window.open(downloadURL);console.log(downloadURL);}</script>") $("head").prepend("<script>function download3(){$('.xg-video-container video').children().each(function(){var downloadURL= $(this).attr('src');console.log(downloadURL);window.open(downloadURL);return false;});}</script>") setInterval(function(){ var aaa = ""; $('.swiper-slide-active .xgplayer-video-interaction-wrap').children().each(function(){ aaa = "true"; var cls= $(this).attr("class"); if (cls=="AAhbEl5e DownloadURL"){ aaa = "false"; return false; }; }); if (aaa=="true"){ $('.swiper-slide-active .xgplayer-video-interaction-wrap').children().each(function(index,element){ if(index==0){ $(this).after('<div class="AAhbEl5e DownloadURL" onclick="download1();download2()"><div class="kluO5VYY"><div class="_0SiYhaxA r3oG6gz3"><div class="P9gNnSUG"><svg width="42" height="36" fill="none" xmlns="http://www.w3.org/2000/svg" class="" viewBox="0 0 36 36"><path d="M23 14l-8 8-8-8h5v-12h6v12zM15 22h-15v8h30v-8h-15zM28 26h-4v-2h4v2z"></path></svg></div><div class="ioaKjF1f">下载</div></div></div></div>'); return false; }; }); }; var bbb = ""; $('.nCRS0NbY').children().each(function(){ bbb = "true"; var cls2= $(this).attr("class"); if (cls2=="H-dq9euC DownloadURL"){ bbb = "false"; return false; }; }); if (bbb=="true"){ $('.nCRS0NbY').children().each(function(index,element){ if(index==3){ $(this).after('<div class="H-dq9euC DownloadURL" onclick="download3()"><svg width="32" height="32" fill="#4F5168" xmlns="http://www.w3.org/2000/svg" class="tI80-Ts9 _3A6+KdLw" viewBox="0 0 36 36"><path d="M23 14l-8 8-8-8h5v-12h6v12zM15 22h-15v8h30v-8h-15zM28 26h-4v-2h4v2z"></path></svg><span class="iR6dOMAO">下载</span></div>'); return false; }; }); }; },1000); } })();