Skip to content

Instantly share code, notes, and snippets.

View zhangolve's full-sized avatar
💭
working

zhangolve zhangolve

💭
working
  • 北京
View GitHub Profile
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("bilibili.com") {
#b_fashion,#b_promote{
display: none!important;
}
/*
.b-head,.rm-list,.index-promote{
/*@name Classypedia
@namespace http://www.runningcheese.com/firefox-v6
@description 更改浏览Wikipedia时的样式
@author runningcheese
@version 1.00
@reference https://userstyles.org/styles/93067 by @Nathan Black
https://userstyles.org/styles/56739 by @Lupurus
*/
@-moz-document domain('wikipedia.org'){
@zhangolve
zhangolve / 0_reuse_code.js
Created August 13, 2016 09:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@zhangolve
zhangolve / jianshu.css
Created August 14, 2016 04:06
简书样式及油猴脚本 样式:去除了顶部的专题搜索等我用不到的部分,调整了文章列表的宽度。脚本:屏蔽掉那些鸡汤或干货文
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("jianshu.com") {
.page-title ,#collection-categories-nav,.list-footer{
display:none!important;
}
.row-fluid .span3 {
width: 20%;
}
@zhangolve
zhangolve / e-target-id-with-jquery.js
Created August 14, 2016 05:34
用Jquery来实现事件的监听,这样就不用针对每一个<a>分别起一个名
$(document).ready(function() {
$("a").click(function(event) {
// this.append wouldn't work
$(this).append(' clicked');
});
});
//之前在我的计算器的app中,就是给每一个button都起了一个名字。
@zhangolve
zhangolve / react-form.js
Created August 14, 2016 08:11
使用react来进行表单的即时响应
var React = require('react');
var ReactDOM = require('react-dom');
var Input = React.createClass({
getInitialState:function(){
return{ userInput:''
}
},
handleUserInput: function (e) {
this.setState({
function makeFriendlyDates(arr) {
var date=['1st','2nd','3rd','21st','22nd','23rd','31st'];
var month=['January','February','March','April','May','June','July','August','September','October','November','December'] ;
var startRange=arr[0].split('-');
var endRange=arr[1].split('-');
var everymonth2=[31,29,31,30,31,30,31,31,30,31,30,31]; //区分平年和闰年,为了以后计算是否在一年以内。
var everymonth1=[31,28,31,30,31,30,31,31,30,31,30,31];
var result=[];
var str;
.circle
{
width:500px;
height:500px;
border-radius:250px;
font-size:50px;
color:#fff;
line-height:500px;
text-align:center;
background:#000
@zhangolve
zhangolve / react-style-css.js
Created September 6, 2016 09:35
在react中常见的样式应该怎么写
var ComponentExample = React.createClass(Radium.wrap({
render: function() {
return (
<button type="button" style={[styles]}>
<p>Hover Me</p>
</button>
)
}
}));
@zhangolve
zhangolve / Full-Page-Background-Image.css
Last active September 20, 2016 06:49
响应式背景图片全屏实现css
html {
background: url(images/bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}