Greasy Fork

Greasy Fork is available in English.

下载按钮

try to take over the world!

当前为 2018-08-16 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         下载按钮
// @namespace    需要硕鼠软件。硕鼠插件新版的Chrome和Firefox都无法安装》无技术现学现卖的脚本。硕鼠请打开自动跳转和自动启动下载器,下载页面会在5秒后关闭。
// @version      0.1.1
// @description  try to take over the world!
// @author       poi
// @match        https://www.bilibili.com/bangumi/*
// @match        https://www.bilibili.com/video/*
// @match        http://www.flvcd.com/xdown.php?id=*
// @grant        none
// ==/UserScript==

(function() {
    var url=window.location.href;
    var reg=/(http:\/\/www.flvcd.com\/xdown.php\?id=)(\d{1,99})/;
    console.log(reg.test(url)+"/n"+url);
    if(!reg.test(url)){

            function loadCssCode(code){
            var style = document.createElement('style');
            style.type = 'text/css';
            style.rel = 'stylesheet';
            style.appendChild(document.createTextNode(code));
            var head = document.getElementsByTagName('head')[0];
            head.appendChild(style);
        }
        loadCssCode('.ss{background: #E8E9EB;z-index:999;width:100px;height:100px;border:0px;box-shadow:3px 3px 3px #888888; border-radius:50px;position: fixed;opacity:0.1;transition-duration:1s;}.ss:hover{transition-duration:0.5s;opacity:1;}.ss:active{background: #6f6f6f;width:95px;height:95px;}');

        var newButton = document.createElement("input");
        newButton.value="下载";
        newButton.className="ss";
        newButton.type='button';
        newButton.onclick=function (){
            window.open('http://www.flvcd.com/parse.php?format=&kw='+window.location.href);
        };
        var x=document.getElementById("banner_link");
        x.appendChild(newButton);
        var y=document.getElementById("video-page-app");
        y.appendChild(newButton);
    }else{
        setTimeout('window.close();',5000);
    };
})();