适用Tampermonkey // UserScript // @name OpenGG.Clean.Player(Bae // @author Anonymous // @description 通过替换swf播放器的方式来解决优酷的黑屏广告+Bilibili黑科技 In God,We Turst. // @version 1.366.2 // @namespace http://userscripts.org/users/Kawaiiushio // @updateURL https://userscripts.org/scripts/source/162286.meta.js // @downloadURL https://userscripts.org/scripts/source/162286.user.js // @icon http://extensiondl.maxthon.cn/skinpack/ ... read more
我平时非常不喜欢在网页样式中使用图片,比如一些图标啊,背景图啊。因为即使文件再小也算一次HTTP请求,会或多或少拖慢载入速度。 下面我找到的这个网站提供一些纯CSS的背景纹理。(只支持 Firefox 3.6+, Chrome, Safari 5.1, Opera 11.10+ and IE10+.) 你可以在样例中实时编辑修改样式,查看更改后的样子。 http://lea.verou.me/css3patterns/ 从简单的斜纹横纹到复杂的光晕效果都有,比如我喜欢这种简单清新的。 这种碳纤维纹理则显得很酷: 理科专业同学一定对这种坐标纸样式不陌生。 更多样式在上面链接里有 ... read more
没事闲的做了一个简单的loading动画 js就几行,却出了问题。。chrome下成功,但在Firefox下怎么改都显示不出来。。 提示window.event is not defined,在网上搜到了解决办法。原来FF跟不支持IE的JS标准,chrome却跟IE混的,太没节操了。 代码不支持IE因为这个动画是CSS3的。 DEMO:Loading Demo HTML: CSS: #loading{ display:none; width:70px; position:fixed; top:50%; left:50%; margin-left:-40px; } .blockG{ background-color:#FFFFFF; border:3px solid #8896fa; float:left; height:50px; margin-left:7px; width:10px; opacity:0. ... read more
网上很多用php实现gz压缩输出js&css的文章,都把压缩文件存到一个文件夹里,可是却没有介绍手动删缓存的方法,每次FTP进去太麻烦了,所以就摸索着写了一个方法。 删除文件的php代码网上有 function deldir($dir) { $dh=opendir($dir); while ($file=readdir($dh)) { if($file!="." && $file!="..") { $fullpath=$dir."/".$file; if(!is_dir($fullpath)) { unlink($fullpath); } else { deldir($fullpath); } } } } 要做点安全措施。。。不能让所有人都删,得只能是登录的管理员才能删 if ( is_user_logged_in() ) { if(current_user_can('level_10')){ deldir('/home/ ... read more
比google的要快一些,毕竟google在大陆没节点。以后不用怕JQ库拖慢速度了 http://libs.baidu.com/jquery/1.9.0/jquery.js 更多公共库在这里 ... read more