您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
添加下载按钮,喜欢的视频(清晰度最高资源,如1080p),一键下载收入口袋,第一次运行会提示跨域请求,请允许。
当前为
// ==UserScript== // @name V电影短视频添加下载按钮 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 添加下载按钮,喜欢的视频(清晰度最高资源,如1080p),一键下载收入口袋,第一次运行会提示跨域请求,请允许。 // @author You // @match https://www.vmovier.com/*?from* // @grant GM_xmlhttpRequest // @grant GM_download // @require https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js // ==/UserScript== (function() { 'use strict'; function download(){ var url = $('iframe').attr('src') var y = url.split('/')[2] if (y!=='player.youku.com'){ GM_xmlhttpRequest({ method: "GET", url: url, onload: function(res) { console.log("请求HTML成功!") if (res.status == 200) { var find_text = res.response var re_s = /"https_url":"(\S*?)","video_bitrate"/ var find = find_text.match(re_s)[1].replace(/\\/g,'') console.log(find) $('.post-share').remove() $('.animate').remove() $(".post-share-btn").after('<div class="post-share-btn download" style="background-image: url(http://thyrsi.com/t6/380/1538632930x-1566688526.png);"><a href="'+find+'" target="_blank">下载</a></div>') } } }); } else{ console.log("优酷资源,不提供下载!") } } //主程序 download() // Your code here... })();