Greasy Fork is available in English.
try to take over the world!
当前为
// ==UserScript==
// @name 下载按钮
// @namespace 一个下载按钮
// @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);
};
})();