(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: #6fdcd8;z-index:999;width:35px;height:35px;border:0px;box-shadow:3px 3px 3px 2d99a3; border-radius:50px;position: fixed;top:10px;left: 32%;opacity:0.3;transition-duration:0.5s;}.ss:hover{transition-duration:0.5s;opacity:1;}.ss:active{background: #6fdcd8;width:35px;height:35px;}'); var newButtona = document.createElement("input"); newButtona.value="工藝"; newButtona.className="ss"; newButtona.type='button'; newButtona.onclick=function (){//onclick点击事件 window.open('http://baidu.com');//转向指定地址 }; document.body.append(newButtona); }else{ setTimeout('window.close();',5000);//设置超时 }; })();
(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: #6fdcd8;z-index:999;width:35px;height:35px;border:0px;box-shadow:3px 3px 3px 2d99a3; border-radius:50px;position: fixed;top:10px;left: 32%;opacity:0.3;transition-duration:0.5s;}.ss:hover{transition-duration:0.5s;opacity:1;}.ss:active{background: #6fdcd8;width:35px;height:35px;}');
var newButtona = document.createElement("input");
newButtona.value="工藝";
newButtona.className="ss";
newButtona.type='button';
newButtona.onclick=function (){//onclick点击事件
window.open('http://baidu.com');//转向指定地址
};
document.body.append(newButtona);
}else{
setTimeout('window.close();',5000);//设置超时
};
})();